Message Boards Message Boards

NDSolveValue fails to evaluate the solution for non-interger coefficient?

GROUPS:

I was trying to solve a PDE using finite element method. The first trial is successful.

op = Inactive[Div][
           Inactive[Grad][(u[x, y, z]), {x, y, z}], {x, y, z}] == 0
uif = NDSolveValue[{op, Subscript[\[CapitalGamma], O], 
        Subscript[\[CapitalGamma], A]}, u, {x, y, z} \[Element] mesh];

Later, when I introduce a non-integer coefficient to u[x,y,z], there is an error.

op = Inactive[Div][
   Inactive[Grad][(0.1*u[x, y, z]), {x, y, z}], {x, y, z}] == 0
uif = NDSolveValue[{op, Subscript[\[CapitalGamma], O], 
    Subscript[\[CapitalGamma], A]}, u, {x, y, z} \[Element] mesh];
NDSolveValue::femcnmd: The PDE coefficient 0.1` does not evaluate to a numeric matrix of dimensions {3,1} at the coordinate {-4.62595,-2.08823,-1.6828}.

However, if I replace Div and Grad by Laplacian, no error is reported.

op = Inactive[Laplacian][0.1*u[x, y, z], {x, y, z}] == 0
uif = NDSolveValue[{op, Subscript[\[CapitalGamma], O], 
    Subscript[\[CapitalGamma], A]}, u, {x, y, z} \[Element] mesh];

Also, if I pull the constant out once, it works well.

op = Inactive[Div][
   0.1*Inactive[Grad][u[x, y, z], {x, y, z}], {x, y, z}] == 0

However it fails again if the equation is in this form(with same error message):

op = 0.1*Inactive[Div][
    Inactive[Grad][u[x, y, z], {x, y, z}], {x, y, z}] == 0

Can anyone give me suggestions how to solve this problem? Since I am going to solve a PDE in the form of

Inactive[Div][(a[x, y, z] Inactive[Grad][u[x, y, z], {x, y, z}]), {x, 
   y, z}] == 0

I cannot simply use Laplacian. Thanks in advance!

POSTED BY: L C
Answer
14 days ago

The definition of mesh is missing in your post...

yehuda

POSTED BY: Yehuda Ben-Shimol
Answer
13 days ago

Group Abstract Group Abstract