This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

PDEModel

PDE model object

Description

A PDEModel object contains information about a PDE problem: the number of equations, geometry, mesh, and boundary conditions.

Creation

Create a PDEModel object using createpde. Initially, the only nonempty property is PDESystemSize. It is 1 for scalar problems.

Properties

expand all

Number of equations, N, returned as a positive integer. See Equations You Can Solve Using PDE Toolbox.

Example: 1

Data Types: double

PDE boundary conditions, returned as a vector of BoundaryCondition Properties objects. You create boundary conditions using the applyBoundaryCondition function

Geometry description, returned as a geometry object.

Mesh for solution, returned as an FEMesh Properties object. You create the mesh using the generateMesh function.

Indicator if model is time-dependent, returned as 1 (true) or 0 (false). The property is true when the m or d coefficient is nonzero, and is false otherwise.

PDE coefficients, returned as a vector of CoefficientAssignment Properties objects. See specifyCoefficients.

Initial conditions or initial solution, returned as a GeometricInitialConditions Properties or NodalInitialConditions Properties object.

In case of GeometricInitialConditions, for time-dependent problems, you must give one or two initial conditions: one if the m coefficient is zero, and two if the m coefficient is nonzero. For nonlinear stationary problems, you can optionally give an initial solution that solvepde uses to start its iterations. See setInitialConditions.

In case of NodalInitialConditions, you use the results of previous analysis to set the initial conditions or initial guess. The geometry and mesh of the previous analysis and current model must be the same.

Algorithm options for the PDE solvers, returned as a PDESolverOptions Properties object. The properties of PDESolverOptions include absolute and relative tolerances for internal ODE solvers, maximum solver iterations, and so on.

Object Functions

applyBoundaryConditionAdd boundary condition to PDEModel container
generateMeshCreate triangular or tetrahedral mesh
geometryFromEdgesCreate 2-D geometry
geometryFromMeshCreate geometry from mesh
importGeometryImport geometry from STL data
setInitialConditionsGive initial conditions or initial solution
specifyCoefficientsSpecify coefficients in a PDE model
solvepdeSolve PDE specified in a PDEModel
solvepdeeigSolve PDE eigenvalue problem specified in a PDEModel

Examples

collapse all

Create and populate a PDEModel object.

Create a container for a scalar PDE (N = 1).

model = createpde()
model = 
  PDEModel with properties:

           PDESystemSize: 1
         IsTimeDependent: 0
                Geometry: []
    EquationCoefficients: []
      BoundaryConditions: []
       InitialConditions: []
                    Mesh: []
           SolverOptions: [1x1 PDESolverOptions]

Include a torus geometry, zero Dirichlet boundary conditions, coefficients for Poisson's equation, and the default mesh.

importGeometry(model,'Torus.stl');
applyBoundaryCondition(model,'dirichlet','face',1,'u',0);
specifyCoefficients(model,'m',0,...
                          'd',0,...
                          'c',1,...
                          'a',0,...
                          'f',1);
generateMesh(model);

Solve the PDE.

results = solvepde(model)
results = 
  StationaryResults with properties:

    NodalSolution: [12913x1 double]
       XGradients: [12913x1 double]
       YGradients: [12913x1 double]
       ZGradients: [12913x1 double]
             Mesh: [1x1 FEMesh]

Introduced in R2015a