Why is the Neumann boundary condition not satisfied in this FEA simulation?

  • Mathematica
  • Thread starter member 428835
  • Start date
  • Tags
    Fea Neumann
In summary, the conversation is about solving a Laplace equation in Mathematica and enforcing a Neumann boundary condition on a curved boundary. The code provided includes an analytic solution and the normal derivative of this solution along the boundary. Despite following the documentation for NeumannValue, the final plot does not match the specified boundary condition. After correction for the origin and changing the normal vector, the issue is resolved.
  • #1
member 428835
Hi PF!

I am solving ##\nabla^2\phi = 0## in Mathematica via NDSolveValue. Rather than waste your time explaining the 2D domain ##\Omega##, check out the code at the bottom of page (copy-paste into Mathematica).

Specifically, I am enforcing a Neumann BC on the curved boundary ##\Gamma## through the NeumannValue function. Since the PDE is the Laplace equation, the documentation implies NeumannValue must specify the normal derivative of ##\phi## to ##\Gamma##, or rather ##\nabla \phi \cdot \hat n|_\Gamma##.

I have an analytic solution in the code below I call ##\phi A##, and I compute its normal derivative along ##\Gamma## which I call ##dn\phi\Gamma A##. This is the value I specify the BC at along the curve ##\Gamma##. However, when I run the notebook, this BC is not satisfied, not even when I refine the mesh (see final plot after running code).

Please check out the code below and let me know what you think. I read the documentation for NeumannValue and I think everything looks good but the final plot is still incorrect. Does anyone see the issue?

h = 2;
r = 2;
yp = 1;
m = 1;
\[CapitalOmega] =
ImplicitRegion[-1 <= x <= 1 && -h <= y <=
2 && ! (x^2 + (y - yp)^2 <= r^2), {x, y}];
Region[\[CapitalOmega]]

\[Phi]A = Cos[(\[Pi] m)/2 (x + 1)] Cosh[(\[Pi] m)/2 (y + h)];
g = \[Phi]A /. y -> -Sqrt[r^2 - x^2] + yp /. x -> 1;
dn\[Phi]A = Grad[\[Phi]A, {x, y}]. ({x, y}/Sqrt[x^2 + y^2]);
dn\[Phi]\[CapitalGamma]A = dn\[Phi]A /. y -> -Sqrt[r^2 - x^2] + yp;

op = Laplacian[\[Phi]D[x, y], {x, y}];

\[CapitalGamma]NV = NeumannValue[dn\[Phi]A, x^2 + (y - yp)^2 == r^2];

\[CapitalGamma] = {DirichletCondition[\[Phi]D[x, y] == g,
x == 1 && y == -Sqrt[r^2 - 1^2] + yp]};

Needs["NDSolve`FEM`"]
mesh = ToElementMesh[\[CapitalOmega], MaxCellMeasure -> 0.001];
mesh["Wireframe"]
\[Phi] = NDSolveValue[{op == \[CapitalGamma]NV, \[CapitalGamma]}, \
\[Phi]D, {x, y} \[Element] mesh];

n = {x, y}/Sqrt[x^2 + y^2];
dn\[Phi] = Grad[\[Phi][x, y], {x, y}].n;
dn\[Phi]\[CapitalGamma] = dn\[Phi] /. y -> -Sqrt[r^2 - x^2] + yp;
Plot[{dn\[Phi]\[CapitalGamma], dn\[Phi]\[CapitalGamma]A}, {x, -1, 1},
AxesLabel -> {"x",
"\!\(\*SubscriptBox[\(\[Phi]\), \(n\)]\)\!\(\*SubscriptBox[\(|\), \
\(\[CapitalGamma]\)]\)"}, PlotStyle -> {Solid, Dotted},
PlotLegends -> {"numeric", "specified"}]
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
Answer: it did not converge because the origin to the curve ##\Gamma## was not at ##(0,0)##. Once correcting for this and changing ##\hat n## everything worked out perfectly.
 

1. Why am I getting an error message saying "FEA Neumann BC not satisfied"?

This error message usually occurs when the specified Neumann boundary conditions are not sufficiently defined or are inconsistent with the material properties and geometry of the model. It could also indicate that there are errors in the input data or the solver settings.

2. How can I resolve the "FEA Neumann BC not satisfied" error?

To resolve this error, you can try checking your input data, including the boundary conditions, material properties, and geometry, for any errors. You can also try refining the mesh in the affected area or adjusting the solver settings. Additionally, you may need to consult the user manual or seek help from experienced FEA users or support.

3. Can the "FEA Neumann BC not satisfied" error be caused by incorrect model assumptions?

Yes, this error can be caused by incorrect model assumptions, such as neglecting certain physical phenomena or using simplifications that do not accurately represent the real-world behavior of the system. It is essential to carefully consider the assumptions made in the FEA model and validate them with experimental data or analytical solutions.

4. Are there any specific boundary conditions that are prone to causing the "FEA Neumann BC not satisfied" error?

No, any Neumann boundary condition can potentially cause this error if it is not properly defined or is inconsistent with the model. However, some commonly used boundary conditions, such as point loads or distributed loads, may require more attention and verification to ensure they are correctly applied.

5. Can the "FEA Neumann BC not satisfied" error affect the accuracy of my results?

Yes, this error can significantly impact the accuracy of your results, as it indicates that the model is not adequately representing the physical behavior of the system. If this error is not resolved, it can lead to incorrect predictions and unreliable conclusions. It is crucial to address this error before proceeding with any analysis.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
697
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
2K
  • Programming and Computer Science
Replies
1
Views
945
  • Introductory Physics Homework Help
2
Replies
64
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
13
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
960
  • Special and General Relativity
Replies
2
Views
580
  • Introductory Physics Homework Help
Replies
6
Views
2K
Back
Top