2

The NDSolvevalue of MMA can well solve the finite element problems according to the displacement boundary conditions

(*FEMDocumentation/tutorial/SolvingPDEwithFEM*)

Ω=RegionDifference[Rectangle[{-1,-1},{1,1}],Rectangle[{-1/2,-1/2},{1/2,1/2}]]; op={-Derivative[0, 2][u][x, y] - Derivative[2, 0][u][x, y] - Derivative[1, 1][v][x, y], -Derivative[1, 1][u][x, y] - Derivative[0, 2][v][x, y] - Derivative[2, 0][v][x, y]}

Subscript[Γ, D]={DirichletCondition[{u[x,y]==1.,v[x,y]==0.},x==1/2&&-1/2<=y<=1/2],DirichletCondition[{u[x,y]==-1.,v[x,y]==0.},x==-1/2&&-1/2<=y<=1/2],DirichletCondition[{u[x,y]==0.,v[x,y]==-1.},y==-1/2&&-1/2<=x<=1/2],DirichletCondition[{u[x,y]==0.,v[x,y]==1.},y==1/2&&-1/2<=x<=1/2],DirichletCondition[{u[x,y]==0.,v[x,y]==0.},Abs[x]==1||Abs[y]==1]} {ufun,vfun}=NDSolveValue[{op=={0,0},Subscript[Γ, D]},{u,v},{x,y}∈Ω, StartingStepSize->0.1,MaxStepSize->0.01, WorkingPrecision->30,InterpolationOrder->All, NormFunction->(Norm[#, 1]&)] ContourPlot[ufun[x,y],{x,y}∈Ω,ColorFunction->"Temperature",AspectRatio->Automatic,PlotPoints->30,WorkingPrecision->20,Contours->30]

enter image description here

But the ndsolvevalue of MMA can not be used to solve the finite element problems according to the stress boundary conditions

      Clear["Gloabal`*"]
    Ω = 
      RegionDifference[Rectangle[{-1, -1}, {1, 1}], 
       Rectangle[{-1/2, -1/2}, {1/2, 1/2}]];
op = {D[σx[x, y], x] + D[τxy[x, y], y], 

D[τxy[x, y], x] + D[σy[x, y], y], Laplacian[σx[x, y] + σy[x, y], {x, y}]}; (∂Subscriptσ,xx/∂x+∂
Subscriptτ,xy/∂y[Equal]0 ∂Subscript[
σ,yy](x,y)/∂y+∂Subscriptτ,xy/
∂x[Equal]0
) Subscript[Γ, D] = {DirichletCondition[{σx[x, y] == 10., σy[x, y] == 0., τxy[x, y] == 0.}, Abs[x] == 1/2 && -1/2 <= y <= 1/2 || -1/2 <= x <= 1/2 && Abs[y] == 1/2], DirichletCondition[{σx[x, y] == -10., σy[x, y] == 0., τxy[x, y] == 0.}, Abs[x] == 1 || Abs[y] == 1]}

(*{ufun,vfun,wfun}=NDSolveValue[{op\[Equal]{0,0,0},Subscript[\
Γ,D]},{σx,σy,τxy},{x,0,5},{y,0,1},\
Method\[Rule]{&quot;PDEDiscretization&quot;\[Rule]{&quot;MethodOfLines&quot;,{\
&quot;SpatialDiscretization&quot;\[Rule]&quot;FiniteElement&quot;}}}]*)
{ufun, vfun, wfun} = 
 NDSolveValue[{op == {0, 0, 0}, 
   Subscript[Γ, 
    D]}, {σx, σy, τxy}, {x, 
    y} ∈ Ω, StartingStepSize -&gt; 0.1, 
  MaxStepSize -&gt; 0.01, WorkingPrecision -&gt; 20]
ContourPlot[ufun[x, y], {x, y} ∈ Ω, 
 ColorFunction -&gt; &quot;Temperature&quot;, AspectRatio -&gt; Automatic]

enter image description here

The result of this image is obviously incorrect.

Supplementary information:

Equilibrium differential equation: $$\frac {\partial \sigma _ {\text {x}}} {\partial x} +\frac {\partial \tau _ {\text {xy}}} {\partial y} =0$$

$$\frac {\partial \tau _ {\text {xy}}} {\partial x}+\frac {\partial \sigma _ {\text {y}}} {\partial y} =0$$ Deformation compatibility equation expressed by stress: $$\left( \frac{\partial ^2}{\partial x^2}+\frac{\partial ^2}{\partial y^2} \right) \left( \sigma _{\text{x}}+\sigma _{\text{y}} \right) =0 $$

Because $\frac {\partial \tau _ {\text {xy}}} {\partial y}=-\frac {\partial \sigma _ {\text {x}}} {\partial x} $ and $\frac {\partial \tau _ {\text {xy}}} {\partial x}=-\frac {\partial \sigma _ {\text {y}}} {\partial y} $, we can get $$2\frac{\partial ^2\tau _{\text{xy}}}{\partial x\partial x}=-2\left( \frac{\partial ^2\sigma _{\text{x}}}{\partial x^2}+\frac{\partial ^2\sigma _{\text{y}}}{\partial y^2} \right) $$ Therefore, the deformation compatibility equation expressed by stress ( $\frac {\partial^{2} (\sigma _ {\text {x}} - \mu \sigma _ {\text {y}})} {\partial y^{2}} + \frac {\partial^{2} (\sigma _ {\text {y}} - \mu \sigma _ {\text {x}})} {\partial x^{2}}=2(1+\mu)\frac {\partial^{2} \tau _ {\text {xy}}} {\partial x \partial y} $) can be simplified as $$\frac {\partial^{2} \sigma _ {\text {x}}} {\partial x^{2}}+\frac {\partial^{2} \sigma _ {\text {x}}} {\partial y^{2}} +\frac {\partial^{2} \sigma _ {\text {y}}} {\partial x^{2}}+\frac {\partial^{2} \sigma _ {\text {y}}} {\partial y^{2}}=0$$.

It can be abbreviated as $$\left( \frac{\partial ^2}{\partial x^2}+\frac{\partial ^2}{\partial y^2} \right) \left( \sigma _{\text{x}}+\sigma _{\text{y}} \right) =0 $$

This is also the expression of op[[3]] before the modification of my code: 2 ∂τxy(x,y)/(∂x∂y)+∂σx(x,y)/∂x^2+∂σy(x,y)/∂y^2

It's a mistake because I'm dizzy.

  • 1
    So, where is the question? – Henrik Schumacher Jan 20 '20 at 09:08
  • Because the stress boundary condition is symmetric, the result of solving by the stress boundary condition should also be symmetric, which is generally similar to the result of solving by the symmetric displacement boundary condition, but the result of solving by the stress boundary condition is obviously asymmetric – A little mouse on the pampas Jan 20 '20 at 09:15
  • Have you seen for example this this from the NeumannValue ref. page: NeumannValue #1751664584.? And as Henrik, pointed out, you should add a question? – user21 Jan 20 '20 at 09:25
  • How to use these conditions to obtain the numerical solution of symmetric stress boundary condition. – A little mouse on the pampas Jan 20 '20 at 09:31
  • 1
    You'd need to give a definition of what a symmetric stress boundary condition is. I suspect that this amortizes to a NeumannValue which you use in conjunction with an Inactive version of your stress operator. Unfortunately, I can not help you unless you explain better what you need. – user21 Jan 21 '20 at 06:13
  • 1
    This is a plane stress problem in elasticity. Because stress boundary conditions and geometric characteristics are symmetrical(op in code) , the final stress distribution result should be symmetric, but the results obtained by using NDSolve are disordered. – A little mouse on the pampas Jan 22 '20 at 03:35
  • The third equation is a consequence of the first two, so a message appears on the fine mesh LinearSolve::parpiv: Zero pivot was detected during the numerical factorization or there was a problem in the iterative refinement process. It is possible that the matrix is ill-conditioned or singular. and NDSolveValue::fempsf: PDESolve could not find a solution. On the rough mesh, NDSolve finds a solution that is erroneous. – Alex Trounev Jan 23 '20 at 18:36
  • @AlexTrounev The third equation represents the stress coordination condition.How can I modify this code to obtain symmetrical stress distribution results? – A little mouse on the pampas Jan 24 '20 at 02:28
  • @HenrikSchumacher This is a plane stress problem in elasticity. – A little mouse on the pampas Jan 25 '20 at 05:57

1 Answers1

6

Problem number 2. I do not understand why the author changed the system of equations, but for the new system there is also a symmetric solution. Differentiating op[[1]] with respect to x and op[[2]] with respect to y, we solve the resulting system using FEM, we find a solution

Ω = 
  RegionDifference[Rectangle[{-1, -1}, {1, 1}], 
   Rectangle[{-1/2, -1/2}, {1/2, 1/2}]];

op1 = {D[σx[x, y], x, x] + D[τxy[x, y], y, x], 
   D[τxy[x, y], x, y] + D[σy[x, y], y, y], 
   Laplacian[σx[x, y] + σy[x, y], {x, y}]};

Subscript[Γ, 
  D] = {DirichletCondition[{σx[x, y] == 10., σy[x, y] ==
      0., τxy[x, y] == 0.}, 
   Abs[x] == 1/2 && -1/2 <= y <= 1/2 || -1/2 <= x <= 1/2 && 
     Abs[y] == 1/2], 
  DirichletCondition[{σx[x, y] == -10., σy[x, y] == 
     0., τxy[x, y] == 0.}, Abs[x] == 1 || Abs[y] == 1]}

{ufun, vfun, wfun} = 
 NDSolveValue[{op1 == {0, 0, 0}, 
   Subscript[Γ, 
    D]}, {σx, σy, τxy}, {x, 
    y} ∈ Ω, 
  Method -> {"PDEDiscretization" -> {"FiniteElement", 
      "MeshOptions" -> {"MaxCellMeasure" -> 0.001}}}]
DensityPlot[ufun[x, y], {x, y} ∈ Ω, 
 ColorFunction -> "Rainbow", AspectRatio -> Automatic, 
 PlotRange -> All, PlotPoints -> 100, PlotLegends -> Automatic]

Figure 2

There is another system that can be deduced from the original:

op2 = {D[σx[x, y], x, x] - D[σy[x, y], y, y], 
   Laplacian[σx[x, y] + σy[x, y], {x, y}], 
   Laplacian[τxy[x, y], {x, y}] + 
    D[D[σx[x, y] + σy[x, y], x], y]};

With boundary conditions

bc2={DirichletCondition[{σx[x, y] == 10., σy[x, y] == 
     1., τxy[x, y] == 1.}, 
   Abs[x] == 1/2 && -1/2 <= y <= 1/2 || -1/2 <= x <= 1/2 && 
     Abs[y] == 1/2], 
  DirichletCondition[{σx[x, y] == -10., σy[x, y] == 
     0., τxy[x, y] == 0.}, Abs[x] == 1 || Abs[y] == 1]};

We have

{ufun, vfun, wfun} = 
 NDSolveValue[{op2 == {0, 0, 0}, 
   bc2}, {σx, σy, τxy}, {x, 
    y} ∈ Ω, 
  Method -> {"PDEDiscretization" -> {"FiniteElement", 
      "MeshOptions" -> {"MaxCellMeasure" -> 0.001}}}]
{DensityPlot[ufun[x, y], {x, y} ∈ Ω, 
  ColorFunction -> "Rainbow", AspectRatio -> Automatic, 
  PlotRange -> All, PlotPoints -> 100, PlotLegends -> Automatic], 
 DensityPlot[vfun[x, y], {x, y} ∈ Ω, 
  ColorFunction -> "Rainbow", AspectRatio -> Automatic, 
  PlotRange -> All, PlotPoints -> 100, PlotLegends -> Automatic], 
 DensityPlot[wfun[x, y], {x, y} ∈ Ω, 
  ColorFunction -> "Rainbow", AspectRatio -> Automatic, 
  PlotRange -> Automatic, PlotPoints -> 100, 
  PlotLegends -> Automatic]}

Figure 2

AsukaMinato
  • 9,758
  • 1
  • 14
  • 40
Alex Trounev
  • 44,369
  • 3
  • 48
  • 106
  • Thank you very much, but your differential equation is not the same as the differential equilibrium equation in elasticity (and lack of shear stress function). Are they equivalent? – A little mouse on the pampas Jan 25 '20 at 04:15
  • There is another disadvantage for this method, which can't deal with the boundary condition with shear stress. – A little mouse on the pampas Jan 25 '20 at 07:23
  • 1
    @PleaseCorrectGrammarMistakes I see that you have changed the equations in your question. This does not match your previous one now. Therefore, my answer looks strange. You did it on purpose to puzzle me? – Alex Trounev Jan 25 '20 at 13:13
  • 1
    @PleaseCorrectGrammarMistakes See update to my answer. – Alex Trounev Jan 25 '20 at 19:55
  • The reason why I modified the original problem is that I found that the deformation compatibility equation expressed by stress I wrote before (2 \[PartialD]\[Tau]xy(x,y)/(\[PartialD]x\[PartialD]y)+\[PartialD]\[Sigma]x(x,y)/\[PartialD]x^2+\[PartialD]\[Sigma]y(x,y)/\[PartialD]y^2) was not completely simplified.Your answer is excellent. I have corrected my question. I apologize to you for the trouble caused by my wrong statement.Thank you again for your help. – A little mouse on the pampas Jan 26 '20 at 02:02
  • @@Alex Trounev Finally, I would like to ask why this system of equations (op1 = {D[\[Sigma]x[x, y], x] + D[\[Tau]xy[x, y], y], D[\[Tau]xy[x, y], x] + D[\[Sigma]y[x, y], y], Laplacian[\[Sigma]x[x, y] + \[Sigma]y[x, y], {x, y}]};)can't be solved – A little mouse on the pampas Jan 26 '20 at 02:19
  • In addition, if you assign the shear stress({DirichletCondition[{\[Sigma]x[x, y] == 10., \[Sigma]y[x, y] == 0., \[Tau]xy[x, y] == 10.}...) in your solution, wfun is still 0, which is obviously not in accordance with the stress situation. – A little mouse on the pampas Jan 26 '20 at 02:31
  • 1
    @PleaseCorrectGrammarMistakes I answered your question about a symmetric solution for $\sigma_x$. If there is another question, then you need to open a new topic. – Alex Trounev Jan 26 '20 at 02:53
  • OK, thank you for your advice. I'll open a new topic to discuss the relevant issues at some time. – A little mouse on the pampas Jan 26 '20 at 03:00
  • @PleaseCorrectGrammarMistakes See update 2 to my answer. – Alex Trounev Jan 26 '20 at 03:27
  • Thanks a lot. If I have any other questions, I will release new topics or contact you. – A little mouse on the pampas Jan 26 '20 at 04:39
  • @AlexTrounev, I am glad you could figure out what OP wanted, I did not get it. – user21 Jan 27 '20 at 07:55