InitializePDECoefficients::femnlmdor
Details
Examples
Basic Examples
Related Links
NDSolve`FEM`
InitializePDECoefficients::femnlmdor
Details
-
- This message is generated when a nonlinear PDE coefficient has higher-than-first-order derivates of the dependent variable.
- More information can be found in the Finite Element Usage Tips tutorial.
- Off[message] switches off the message; On[message] switches it on. For example: Off[InitializePDECoefficients::femnlmdor].
Examples
Basic Examples (3)
In this case, the PDE evaluates to have a higher-than-first-order derivative depending on the dependent variable:
Needs["NDSolve`FEM`"]NDSolveValue[{Div[{{-Derivative[1][u][x]}}. Grad[u[x], {x}], {x}] == 1, DirichletCondition[u[x] == 1., x == 0], DirichletCondition[u[x] == 0., x == 1]}, u, {x}∈Line[{{0}, {1}}], InitialSeeding -> {u[x] == 1 - x}]The solution in this case is to use a formal PDE:
NDSolveValue[{Inactive[Div][{{-Derivative[1][u][x]}}.Inactive[ Grad][u[x], {x}], {x}] == 1, DirichletCondition[u[x] == 1., x == 0], DirichletCondition[u[x] == 0., x == 1]}, u, {x}∈Line[{{0}, {1}}], InitialSeeding -> {u[x] == 1 - x}]More information can be found in the Finite Element Usage Tips tutorial.
Consider the equation
with boundary conditions
and for this example
:
c[x_] := x ^ 2 + 3;
NDSolveValue[{D[c[x] * D[u[x], x] ^ 3, x] == Sin[x], DirichletCondition[u[x] == 0, True]}, u, Element[{x}, Line[{{0}, {1}}]]];To solve, rewrite the equation in inactive form to
:
NDSolveValue[{Inactive[Div][(c[x] * D[u[x], x] ^ 2) Inactive[Grad][u[x], {x}], {x}] == Sin[x], DirichletCondition[u[x] == 0, True]}, u, Element[{x}, Line[{{0}, {1}}]]]Compute the solution to a less nonlinear problem (
):
guess = NDSolveValue[{Inactive[Div][c[x] Inactive[Grad][u[x], {x}], {x}] == Sin[x], DirichletCondition[u[x] == 0, True]}, u, Element[{x}, Line[{{0}, {1}}]]];Use the computed solution of the less nonlinear problem (
) as an initial seed to solve the original equation (
):
NDSolveValue[{Inactive[Div][(c[x] * D[u[x], x] ^ 2) Inactive[Grad][u[x], {x}], {x}] == Sin[x], DirichletCondition[u[x] == 0, True]}, u, Element[{x}, Line[{{0}, {1}}]], InitialSeeding -> {u[x] == guess[x]}]Nonlinear PDE coefficients with higher-than-first-order derivatives depending on the dependent variable cannot be solved in this version of NDSolve:
NDSolveValue[{Inactive[Div][{{-Derivative[2][u][x]}}.Inactive[ Grad][u[x], {x}], {x}] == 1, DirichletCondition[u[x] == 1, x == 0], DirichletCondition[u[x] == 0., x == 1]}, u, {x}∈Line[{{0}, {1}}], InitialSeeding -> {u[x] == 1 - x}]