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]
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]{"PDEDiscretization"\[Rule]{"MethodOfLines",{\
"SpatialDiscretization"\[Rule]"FiniteElement"}}}]*)
{ufun, vfun, wfun} =
NDSolveValue[{op == {0, 0, 0},
Subscript[Γ,
D]}, {σx, σy, τxy}, {x,
y} ∈ Ω, StartingStepSize -> 0.1,
MaxStepSize -> 0.01, WorkingPrecision -> 20]
ContourPlot[ufun[x, y], {x, y} ∈ Ω,
ColorFunction -> "Temperature", AspectRatio -> Automatic]
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.




NeumannValueref. page: NeumannValue #1751664584.? And as Henrik, pointed out, you should add a question? – user21 Jan 20 '20 at 09:25opin code) , the final stress distribution result should be symmetric, but the results obtained by usingNDSolveare disordered. – A little mouse on the pampas Jan 22 '20 at 03:35LinearSolve::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.andNDSolveValue::fempsf: PDESolve could not find a solution.On the rough mesh,NDSolvefinds a solution that is erroneous. – Alex Trounev Jan 23 '20 at 18:36