InitializePDECoefficients::femcnsd
Details
-
- This message is generated when a PDE coefficient could not be verified or evaluated.
- Options to change the "VerificationData" are presented in the options section of InitializePDECoefficients.
- Off[message] switches off the message; On[message] switches it on. For example: Off[InitializePDECoefficients::femcnsd].
Examples
Basic Examples (3)
A forgotten symbolic expression can cause this message:
NDSolveValue[{LaplacianPDETerm[{u[r, z], {r, z}}, <|"RegionSymmetry" -> "Axisymmetric"|>] == x, DirichletCondition[...], DirichletCondition[...]}, u[r, z], {r, 0, 5}, {z, 0, 10}]Fix this by replacing the symbolic
with an independent variable
:
NDSolveValue[{LaplacianPDETerm[{u[r, z], {r, z}}, <|"RegionSymmetry" -> "Axisymmetric"|>] == r, DirichletCondition[...], DirichletCondition[...]}, u[r, z], {r, 0, 5}, {z, 0, 10}]A verification process evaluates the coefficient at a point inside the simulation domain. Should this evaluation point be, for example, at a singularity of the coefficient, then the coefficient is rejected.
Set up a coefficient
that has a singularity at
:
f[x_ ? NumericQ] := 1 / (x - 0.5)For a one-dimensional mesh with bounds from 0 to 1, the verification coordinate happens to be at
. The coefficient
is singular at the verification coordinate for this region:
NDSolveValue[{-Laplacian[u[x], {x}] == f[x], DirichletCondition[u[x] == 0, True]}, u, {x, 0, 1}]Change the verification data such that the test coordinate is not at the singularity of
:
NDSolveValue[{-Laplacian[u[x], {x}] == f[x], DirichletCondition[u[x] == 0, True]}, u, {x, 0, 1}, Method -> {"PDEDiscretization" -> {"FiniteElement", "InitializePDECoefficientsOptions" -> {"VerificationData" -> {"Coordinate" -> {0}}}}}]More information can be found in the options section of InitializePDECoefficients.
For nonlinear equations, the default initial seeding is 0. This can conflict with some equations:
vars = {Θ[x], {x}};
pars = <|"ThermalConductivity" -> 0.026, "HeatSource" -> -Exp[-1 / Θ[x]]|>;
NDSolveValue[{HeatTransferPDEComponent[vars, pars] == 0, HeatTemperatureCondition[x == 0, vars, pars, <|"SurfaceTemperature" -> 0|>]}, Θ, x∈Line[{{0}, {1}}]];
Note that the heat source term has a
term. When the initial seed is set to zero, this will fail. The solution is to use a nonzero initial seed:
NDSolveValue[{HeatTransferPDEComponent[vars, pars] == 0, HeatTemperatureCondition[x == 0, vars, pars, <|"SurfaceTemperature" -> 0|>]}, Θ, x∈Line[{{0}, {1}}], InitialSeeding -> {Θ[x] == 100}]