createpde
Create a model
Domain-specific structural, heat transfer, and electromagnetic workflows are not
recommended. New features might not be compatible with these workflows. To create a
recommended model for structural, heat transfer, or electromagnetic analysis, use
femodel
. For
help migrating your existing code to the unified finite element workflow, see Migration from Domain-Specific to Unified Workflow.
Syntax
Description
returns a PDE model
object for one equation (a scalar PDE). This syntax is equivalent to model
= createpdemodel
= createpde(1)
and model = createpde()
.
returns a structural analysis model for the specified analysis type. This model lets
you solve small-strain linear elasticity problems.structuralmodel
= createpde("structural",StructuralAnalysisType
)
returns a thermal analysis model for the specified analysis type.thermalmodel
= createpde("thermal",ThermalAnalysisType
)
returns an electromagnetic analysis model for the specified analysis type.emagmodel
= createpde("electromagnetic",ElectromagneticAnalysisType
)
Examples
Create General PDE Model
Create a model for a general linear or nonlinear single (scalar) PDE.
model = createpde
model = PDEModel with properties: PDESystemSize: 1 IsTimeDependent: 0 Geometry: [] EquationCoefficients: [] BoundaryConditions: [] InitialConditions: [] Mesh: [] SolverOptions: [1x1 pde.PDESolverOptions]
Create a PDE model for a system of three equations.
model = createpde(3)
model = PDEModel with properties: PDESystemSize: 3 IsTimeDependent: 0 Geometry: [] EquationCoefficients: [] BoundaryConditions: [] InitialConditions: [] Mesh: [] SolverOptions: [1x1 pde.PDESolverOptions]
Create Structural Model
Create a static structural model for solving a solid (3-D) problem.
staticStructural = createpde("structural","static-solid")
staticStructural = StructuralModel with properties: AnalysisType: "static-solid" Geometry: [] MaterialProperties: [] BodyLoads: [] BoundaryConditions: [] ReferenceTemperature: [] SuperelementInterfaces: [] Mesh: [] SolverOptions: [1x1 pde.PDESolverOptions]
Create a transient structural model for solving a plane-stress (2-D) problem.
transientStructural = createpde("structural","transient-planestress")
transientStructural = StructuralModel with properties: AnalysisType: "transient-planestress" Geometry: [] MaterialProperties: [] BodyLoads: [] BoundaryConditions: [] DampingModels: [] InitialConditions: [] SuperelementInterfaces: [] Mesh: [] SolverOptions: [1x1 pde.PDESolverOptions]
Create a structural model for modal analysis of a plane-strain (2-D) problem.
modalStructural = createpde("structural","modal-planestrain")
modalStructural = StructuralModel with properties: AnalysisType: "modal-planestrain" Geometry: [] MaterialProperties: [] BoundaryConditions: [] SuperelementInterfaces: [] Mesh: [] SolverOptions: [1x1 pde.PDESolverOptions]
Create a structural model for frequency response analysis of an axisymmetric problem. An axisymmetric model simplifies a 3-D problem to a 2-D problem using symmetry around the axis of rotation.
frStructural = createpde("structural","frequency-axisymmetric")
frStructural = StructuralModel with properties: AnalysisType: "frequency-axisymmetric" Geometry: [] MaterialProperties: [] BodyLoads: [] BoundaryConditions: [] DampingModels: [] SuperelementInterfaces: [] Mesh: [] SolverOptions: [1x1 pde.PDESolverOptions]
Create Thermal Model
Create a model for steady-state thermal analysis.
thermalmodel = createpde("thermal","steadystate")
thermalmodel = ThermalModel with properties: AnalysisType: "steadystate" Geometry: [] MaterialProperties: [] HeatSources: [] StefanBoltzmannConstant: [] BoundaryConditions: [] InitialConditions: [] Mesh: [] SolverOptions: [1x1 pde.PDESolverOptions]
Create a model for transient thermal analysis.
thermalmodel = createpde("thermal","transient")
thermalmodel = ThermalModel with properties: AnalysisType: "transient" Geometry: [] MaterialProperties: [] HeatSources: [] StefanBoltzmannConstant: [] BoundaryConditions: [] InitialConditions: [] Mesh: [] SolverOptions: [1x1 pde.PDESolverOptions]
Create a model for modal thermal analysis.
thermalmodel = createpde("thermal","modal")
thermalmodel = ThermalModel with properties: AnalysisType: "modal" Geometry: [] MaterialProperties: [] HeatSources: [] StefanBoltzmannConstant: [] BoundaryConditions: [] InitialConditions: [] Mesh: [] SolverOptions: [1x1 pde.PDESolverOptions]
Create a transient thermal model for solving an axisymmetric problem. An axisymmetric model simplifies a 3-D problem to a 2-D problem using symmetry around the axis of rotation.
thermalmodel = createpde("thermal","transient-axisymmetric")
thermalmodel = ThermalModel with properties: AnalysisType: "transient-axisymmetric" Geometry: [] MaterialProperties: [] HeatSources: [] StefanBoltzmannConstant: [] BoundaryConditions: [] InitialConditions: [] Mesh: [] SolverOptions: [1x1 pde.PDESolverOptions]
Create Electromagnetic Model
Create a model for electrostatic analysis.
emagE = createpde("electromagnetic","electrostatic")
emagE = ElectromagneticModel with properties: AnalysisType: "electrostatic" Geometry: [] MaterialProperties: [] Sources: [] BoundaryConditions: [] VacuumPermittivity: [] Mesh: []
Create an axisymmetric model for magnetostatic analysis. An axisymmetric model simplifies a 3-D problem to a 2-D problem using symmetry around the axis of rotation.
emagMA = createpde("electromagnetic","magnetostatic-axisymmetric")
emagMA = ElectromagneticModel with properties: AnalysisType: "magnetostatic-axisymmetric" Geometry: [] MaterialProperties: [] Sources: [] BoundaryConditions: [] VacuumPermeability: [] Mesh: []
Create a model for harmonic analysis.
emagH = createpde("electromagnetic","harmonic")
emagH = ElectromagneticModel with properties: AnalysisType: "harmonic" Geometry: [] MaterialProperties: [] Sources: [] BoundaryConditions: [] VacuumPermittivity: [] VacuumPermeability: [] Mesh: [] FieldType: "electric"
Create a model for DC conduction analysis.
emagDC = createpde("electromagnetic","conduction")
emagDC = ElectromagneticModel with properties: AnalysisType: "conduction" Geometry: [] MaterialProperties: [] BoundaryConditions: [] Mesh: []
Input Arguments
N
— Number of equations
1
(default) | positive integer
Number of equations, specified as a positive integer. You do not need to
specify N
for a model where
N = 1
.
Example: model = createpde
Example: model = createpde(3);
Data Types: double
StructuralAnalysisType
— Type of structural analysis
"static-solid"
| "static-planestress"
| "static-planestrain"
| "static-axisymmetric"
| "transient-solid"
| "transient-planestress"
| "transient-planestrain"
| "transient-axisymmetric"
| "modal-solid"
| "modal-planestress"
| "modal-planestrain"
| "modal-axisymmetric"
| "frequency-solid"
| "frequency-planestress"
| "frequency-planestrain"
| "frequency-axisymmetric"
Type of structural analysis, specified as one of the following values.
For static analysis, use these values:
"static-solid"
— Creates a structural model for static analysis of a solid (3-D) problem."static-planestress"
— Creates a structural model for static analysis of a plane-stress problem."static-planestrain"
— Creates a structural model for static analysis of a plane-strain problem."static-axisymmetric"
— Creates an axisymmetric (2-D) structural model for static analysis.
For transient analysis, use these values:
"transient-solid"
— Creates a structural model for transient analysis of a solid (3-D) problem."transient-planestress"
— Creates a structural model for transient analysis of a plane-stress problem."transient-planestrain"
— Creates a structural model for transient analysis of a plane-strain problem."transient-axisymmetric"
— Creates an axisymmetric (2-D) structural model for transient analysis.
For modal analysis, use these values:
"modal-solid"
— Creates a structural model for modal analysis of a solid (3-D) problem."modal-planestress"
— Creates a structural model for modal analysis of a plane-stress problem."modal-planestrain"
— Creates a structural model for modal analysis of a plane-strain problem."modal-axisymmetric"
— Creates an axisymmetric (2-D) structural model for modal analysis.
For frequency response analysis, use these values:
"frequency-solid"
— Creates a structural model for frequency response analysis of a solid (3-D) problem."frequency-planestress"
— Creates a structural model for frequency response analysis of a plane-stress problem."frequency-planestrain"
— Creates a structural model for frequency response analysis of a plane-strain problem."frequency-axisymmetric"
— Creates an axisymmetric (2-D) structural model for frequency response analysis.
For axisymmetric models, the toolbox assumes that the axis of rotation is the vertical axis passing through r = 0.
Example: model =
createpde("structural","static-solid")
Data Types: char
| string
ThermalAnalysisType
— Type of thermal analysis
"steadystate"
| "steadystate-axisymmetric"
| "transient"
| "transient-axisymmetric"
| "modal"
| "modal-axisymmetric"
Type of thermal analysis, specified as one of these values:
"steadystate"
— Creates a steady-state thermal model. If you do not specifyThermalAnalysisType
for a thermal model,createpde
creates a steady-state model."steadystate-axisymmetric"
— Creates an axisymmetric (2-D) thermal model for steady-state analysis."transient"
— Creates a transient thermal model."transient-axisymmetric"
— Creates an axisymmetric (2-D) thermal model for transient analysis."modal"
— Creates a thermal model for modal analysis. Modal solutions enable you to speed up transient thermal analysis by using the reduced-order modeling (ROM) technique."modal-axisymmetric"
creates an axisymmetric (2-D) thermal model for modal analysis.
For axisymmetric models, the toolbox assumes that the axis of rotation is the vertical axis passing through r = 0.
Example: model =
createpde("thermal","transient")
Data Types: char
| string
ElectromagneticAnalysisType
— Type of electromagnetic analysis
"electrostatic"
| "magnetostatic"
| "harmonic"
| "conduction"
| "electrostatic-axisymmetric"
| "magnetostatic-axisymmetric"
| "harmonic-axisymmetric"
Type of electromagnetic analysis, specified as one of these values:
"electrostatic"
— Creates a model for electrostatic analysis."magnetostatic"
— Creates a model for magnetostatic analysis."harmonic"
creates a model for harmonic electromagnetic analysis."conduction"
— Creates a model for DC conduction analysis."electrostatic-axisymmetric"
— Creates an axisymmetric (2-D) model for electrostatic analysis."magnetostatic-axisymmetric"
— Creates an axisymmetric (2-D) model for magnetostatic analysis."harmonic-axisymmetric"
— Creates an axisymmetric (2-D) model for harmonic electromagnetic analysis.
For axisymmetric models, the toolbox assumes that the axis of rotation is the vertical axis passing through r = 0.
Example: model =
createpde("electromagnetic","electrostatic")
Data Types: char
| string
Output Arguments
model
— PDE model
PDEModel
object
PDE model, returned as a PDEModel
object.
Example: model = createpde(2)
structuralmodel
— Structural model
StructuralModel
object
Structural model, returned as a StructuralModel
object.
Example: structuralmodel =
createpde("structural","static-solid")
thermalmodel
— Thermal model
ThermalModel
object
Thermal model, returned as a ThermalModel
object.
Example: thermalmodel =
createpde("thermal","transient")
emagmodel
— Electromagnetic model
ElectromagneticModel
object
Electromagnetic model, returned as an ElectromagneticModel
object.
Example: emagmodel =
createpde("electromagnetic","magnetostatic")
Version History
Introduced in R2015aR2021a: Electromagnetic analysis
createpde
now can create a model for electromagnetic
analysis.
R2020a: Axisymmetric analysis
createpde
now can create a model for axisymmetric thermal and
structural analyses. Axisymmetric analysis simplifies 3-D structural and thermal
problems to 2-D using their symmetry around the axis of rotation.
R2017b: Structural analysis
createpde
now can create a model for structural
analysis.
R2017a: Thermal analysis
createpde
now can create a model for thermal analysis.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)