FEMDocumentation`
FEMDocumentation`

PDECoefficientData

PDECoefficientData[]

represents data that is used for discretizing partial differential equations.

Details

  • PDECoefficientData[] is created by InitializePDECoefficients.
  • PDECoefficientData[] can be extracted from NDSolve`StateData objects generated by NDSolve`ProcessEquations using the "FiniteElementData" and "InitializedPDECoefficients" properties.
  • In standard output format, the number of dependent variables and the space dimension are shown.
  • PDECoefficientData[] objects are used as input for DiscretizePDE.
  • PDECoefficientData[][prop] gives the property prop of the PDECoefficientData object. The following properties may be given:
  • "All"gives all the coefficients in a raw form
    "ConservativeConvectionCoefficients"gives the conservative convection coefficients
    "Constraints"lists constraints induced by PDE coefficients
    "ConvectionCoefficients"gives the convection coefficients
    "DampingCoefficients"gives the damping coefficients
    "DiffusionCoefficients"gives the diffusion coefficients
    "Discrete"extracts stationary discrete coefficients
    "IndexedDiscrete"extracts stationary indexed discrete coefficients
    "LoadCoefficients"gives the load coefficients
    "LoadDerivativeCoefficients"gives the load derivative coefficients
    "MassCoefficients"gives the mass coefficients
    "Parametric"extracts stationary parametric coefficients
    "Properties"gives the properties
    "ReactionCoefficients"gives the reaction coefficients
    "SpatialDimension"gives the space dimensions
    "Stationary"extracts stationary coefficients
    "SystemSize"gives the number of PDEs
    "Transient"extracts transient coefficients
  • The relation of the PDE coefficient names to the model PDE is described in InitializePDECoefficients.

Examples

open allclose all

Basic Examples  (1)

Load the finite element package:

Set up a NumericalRegion:

Set up variable and solution data:

Specify a Poisson equation as coefficients:

Scope  (19)

"All"  (1)

Extract all the PDE coefficients:

"ConservativeConvectionCoefficients"  (1)

Extract the conservative convection PDE coefficients:

"Constraints"  (1)

Extract constraints induced by PDE coefficients:

"ConvectionCoefficients"  (1)

Extract the convection PDE coefficients:

"DampingCoefficients"  (1)

Extract the damping PDE coefficients:

"DiffusionCoefficients"  (1)

Extract the diffusion PDE coefficients:

"LoadCoefficients"  (1)

Extract the load PDE coefficients:

"LoadDerivativeCoefficients"  (1)

Extract the load derivative PDE coefficients:

"MassCoefficients"  (1)

Extract the mass PDE coefficients:

"ReactionCoefficients"  (1)

Extract the reaction PDE coefficients:

"SpatialDimension"  (1)

Extract the spatial dimension:

"Stationary"  (3)

Extract the positions of stationary PDE coefficients:

Extract the scalar-valued stationary PDE coefficients:

Extract the matrix-valued stationary PDE coefficients:

"Parametric"  (1)

Parametric coefficients depend on parameters that need to be replaced with specific values before integrating typically through ParametricNDSolve.

In this example, there are no parametric coefficients:

"SystemSize"  (1)

Extract the system size:

The system size is essentially the number of dependent variables.

"Transient"  (3)

Extract the scalar-valued transient PDE coefficients:

Extract the matrix-valued transient PDE coefficients:

Properties & Relations  (1)

Extract the state data from the NDSolve`StateData object:

Extract the initialized PDE coefficients from the NDSolve`StateData object:

Possible Issues  (2)

To accommodate Neumann values, the "DiffusionCoefficients", the "ConservativeConvectionCoefficients", and the "LoadDerivativeCoefficients" are stored with a negative sign when extracted with the "All" property:

To extract the "DiffusionCoefficients", the "ConservativeConvectionCoefficients" and the "LoadDerivativeCoefficients" with the specified sign use:

The multiplicative factor f in front of the Laplacian is processed into a diffusion coefficient c in .(c u). When f is not a constant setting, c=f introduces an additional divergence that needs to be compensated:

Inspect the PDE coefficients. Note the compensating convection term:

Computing the divergence of the factor f that needs to be compensated: