A more suitable solution can be found in the Mathematica documentation for solving plane stress in the section structural mechanics for NDEigensystem
.
Specify a plane stress PDE:
{vals, funs} =
NDEigensystem[{ps,
DirichletCondition[{u[x, y] == 0., v[x, y] == 0.}, x == 0]}, {u[x,
y], v[x, y]}, {x, y} ∈ Ω, 9];
vals
{351.293, 369.64, 495.516, 1479.33, 2021.45, 2113.61, 2171.36,
2451.13, 3434.16}
Show[{Graphics3D[
{Gray,
GraphicsComplex[{{-1, -1, 0}, {1, -1, 0}, {1, 1, 0}, {1, -1,
0}}, Line[{{1, 2, 3, 4, 1}}]]}],
Plot3D[Sqrt[Total[#^2]], {x, y} ∈ Ω,
ColorFunction -> "TemperatureMap", Axes -> False,
Mesh -> False]}, Boxed -> False] & /@ funs
The realized solution is now an arbitrary linear combination of the Eigenfunctions combined to solve the boundary conditions.
Mind I have selected material with material properties from the Mathematica example.
From FiniteElementProgramming section Coupled PDEs comes right in the example Deformation of a Beam under Load
Clear[u, v, x, y]
op = {Inactive[
Div][({{0, -((Y ν)/(1 - ν^2))}, {-((Y (1 - ν))/(
2 (1 - ν^2))), 0}}.Inactive[Grad][v[x, y], {x, y}]), {x,
y}] + Inactive[
Div][({{-(Y/(1 - ν^2)),
0}, {0, -((Y (1 - ν))/(2 (1 - ν^2)))}}.Inactive[
Grad][u[x, y], {x, y}]), {x, y}],
Inactive[
Div][({{0, -((Y (1 - ν))/(2 (1 - ν^2)))}, {-((Y ν)/(
1 - ν^2)), 0}}.Inactive[Grad][u[x, y], {x, y}]), {x,
y}] + Inactive[
Div][({{-((Y (1 - ν))/(2 (1 - ν^2))),
0}, {0, -(Y/(1 - ν^2))}}.Inactive[Grad][
v[x, y], {x, y}]), {x, y}]};
mesh["Wireframe"]
The following are all step from the example that are already abstracted for use in varied cases:
Subscript[Γ,
u] = {NeumannValue[{u[x, y] == 0.}, x^2 + y^2 == 0.1^2],
NeumannValue[{u[x, y] == 10.}, x == 1 && -1 <= y <= 1],
NeumannValue[{u[x, y] == -10.}, x == -1 && -1 <= y <= 1],
NeumannValue[{u[x, y] == 0.}, y == 1 && -1 <= x <= 1],
NeumannValue[{u[x, y] == 0.}, y == -1 && -1 <= x <= 1]};
Subscript[Γ,
v] = {NeumannValue[{v[x, y] == 0.}, x^2 + y^2 == 0.1^2],
NeumannValue[{v[x, y] == 0.}, x == 1 && -1 <= y <= 1],
NeumannValue[{v[x, y] == 0.}, x == -1 && -1 <= y <= 1],
NeumannValue[{v[x, y] == 10.}, y == 1 && -1 <= x <= 1],
NeumannValue[{v[x, y] == -10.}, y == -1 && -1 <= x <= 1]};
vd = NDSolve`VariableData[{"DependentVariables",
"Space"} -> {{u, v}, {x, y}}];
sd = NDSolve`SolutionData["Space" -> ToNumericalRegion[mesh]];
methodData = InitializePDEMethodData[vd, sd]
Length[mesh["Coordinates"]]*
Length[NDSolve`SolutionDataComponent[vd, "DependentVariables"]]
methodData["DegreesOfFreedom"]
720
diffusionCoefficients =
"DiffusionCoefficients" -> {{{{-(Y/(1 - ν^2)),
0}, {0, -((Y (1 - ν))/(2 (1 - ν^2)))}}, {{0, -((
Y ν)/(1 - ν^2))}, {-((Y (1 - ν))/(
2 (1 - ν^2))),
0}}}, {{{0, -((Y (1 - ν))/(2 (1 - ν^2)))}, {-((
Y ν)/(1 - ν^2)),
0}}, {{-((Y (1 - ν))/(2 (1 - ν^2))),
0}, {0, -(Y/(1 - ν^2))}}}} /. {Y -> 10^3, ν ->
33/100};
initCoeffs =
InitializePDECoefficients[vd, sd, {diffusionCoefficients}]
initBCs =
InitializeBoundaryConditions[vd,
sd, {Subscript[Γ, u], Subscript[Γ, v]}]
discretePDE = DiscretizePDE[initCoeffs, methodData, sd]
{load, stiffness, damping, mass} = discretePDE["SystemMatrices"]
MatrixPlot[stiffness]
split = Span @@@
Transpose[{Most[# + 1], Rest[#]} &[methodData["IncidentOffsets"]]]
{1 ;; 360, 361 ;; 720}
discreteBCs = DiscretizeBoundaryConditions[initBCs, methodData, sd]
DeployBoundaryConditions[{load, stiffness}, discreteBCs]
And now the time-consuming step. I do not have enough time to verify the boundary conditions in depths. May by my transfer from the given ones are not too suitable.
Short[solution = LinearSolve[stiffness, load]]
ufun = ElementMeshInterpolation[{mesh}, solution[[split[[1]]]]]
vfun = ElementMeshInterpolation[{mesh}, solution[[split[[2]]]]]
ContourPlot[ufun[x, y], {x, y} ∈ mesh,
ColorFunction -> "Temperature", AspectRatio -> Automatic]
ContourPlot[vfun[x, y], {x, y} ∈ mesh,
ColorFunction -> "Temperature", AspectRatio -> Automatic]
dmesh = ElementMeshDeformation[mesh, {ufun, vfun}]
Show[{
mesh["Wireframe"],
dmesh["Wireframe"[
"ElementMeshDirective" -> Directive[EdgeForm[Red], FaceForm[]]]]}]
Since after the material selection only the region, the boundary conditions have to be formulated properly it is not very much effort left after understanding what is done in the given abstracted steps from Wolfram Inc.. Vary the MaxCellMeasure value.
Excuse for the inconvenience. It seems to be an error in Mathematica 12.0, corrected in 12.1.
A workaround is presented in how-do-i-use-low-level-fem.
\[CapitalOmega] =
ImplicitRegion[-1 <= x <= 1 && -1 <= y <= 1 &&
Sqrt[x^2 + y^2] >= 0.1, {x, y}]
RegionPlot[\[CapitalOmega], PlotRange -> {{-1.1, 1.1}, {-1.1, 1.1}}]
Needs["NDSolve`FEM`"]
{state} =
NDSolve`ProcessEquations[{Laplacian[u[x, y], {x, y}] == 1,
DirichletCondition[u[x, y] == 0, True]},
u, {x, y} \[Element] \[CapitalOmega], Method -> {"FiniteElement"}];
femdata = state["FiniteElementData"]
femdata["Properties"]
methodData = femdata["FEMMethodData"];
bcData = femdata["BoundaryConditionData"];
pdeData = femdata["PDECoefficientData"];
variableData = state["VariableData"];
solutionData = state["SolutionData"][[1]];
(*FiniteElementData["<" 1387 ">"]*)
(*{"BoundaryConditionData", "FEMMethodData", "PDECoefficientData", \
"Properties", "Solution"}*)
pdeData["All"]
(*{{{{1}}, {{{{0}, {0}}}}}, {{{{{-1,
0}, {0, -1}}}}, {{{{0}, {0}}}}, {{{{0,
0}}}}, {{0}}}, {{{0}}}, {{{0}}}}*)
discretePDE = DiscretizePDE[pdeData, methodData, solutionData]
{load, stiffness, damping, mass} = discretePDE["SystemMatrices"]
(*DiscretizedPDEData["<" \!\(\*
TagBox[
TooltipBox["1387",
"\"Total degrees of freedom\"",
TooltipStyle->"TextStyling"],
Annotation[#, "Total degrees of freedom", "Tooltip"]& ]\) ">"]*)
MatrixPlot[stiffness]
discreteBCs =
DiscretizeBoundaryConditions[bcData, methodData, solutionData];
DeployBoundaryConditions[{load, stiffness}, discreteBCs]
solution = LinearSolve[stiffness, load];
[![mesh = methodData\["ElementMesh"\];
ifun = ElementMeshInterpolation\[{mesh}, solution\]][12]][12]
Plot3D of the distorted plate:
Plot3D[ifun[x, y], {x, y} \[Element] mesh]
This looks pretty much like the solution without the hole in the middle superposed with the distortion caused by the fixed whole.
Another solution is
r = ImplicitRegion[-1 <= x <= 1 && -1 <= y <= 1 &&
Sqrt[x^2 + y^2] >= 0.1, {{x, -2, 2}, {y, -2, 2}}]
op = {Inactive[
Div][{{0, -((nu*Y)/(1 - nu^2))}, {-((1 - nu)*Y)/(2*(1 - nu^2)),
0}}.Inactive[Grad][v[x, y], {x, y}], {x, y}] +
Inactive[
Div][{{-(Y/(1 - nu^2)),
0}, {0, -((1 - nu)*Y)/(2*(1 - nu^2))}}.Inactive[Grad][
u[x, y], {x, y}], {x, y}],
Inactive[
Div][{{0, -((1 - nu)*Y)/(2*(1 - nu^2))}, {-((nu*Y)/(1 - nu^2)),
0}}.Inactive[Grad][u[x, y], {x, y}], {x, y}] +
Inactive[
Div][{{-((1 - nu)*Y)/(2*(1 - nu^2)),
0}, {0, -(Y/(1 - nu^2))}}.Inactive[Grad][
v[x, y], {x, y}], {x, y}]} /. {Y -> 10^3, nu -> 33/100};
Subscript[\[CapitalGamma], D] =
DirichletCondition[{u[x, y] == 0.,
v[x, y] ==
0.}, (x == -1 && y == -1) || (x == -1 && y == 1) || (x == 1 &&
y == -1) || (x == 1 && y == 1)];
force = -40; (*stress is 20, surface area is 2*)
{ufun, vfun} =
NDSolveValue[{op == {NeumannValue[force, x == 1 || x == -1],
NeumannValue[-force, y == -1 || y == 1]},
Subscript[\[CapitalGamma], D]}, {u, v}, {x, y} \[Element] r];
Deformation in the plane:
mesh = ufun["ElementMesh"];
Show[{mesh["Wireframe"["MeshElement" -> "BoundaryElements"]],
NDSolve`FEM`ElementMeshDeformation[mesh, {ufun, vfun}][
"Wireframe"[
"ElementMeshDirective" -> Directive[EdgeForm[Red], FaceForm[]]]]}]
The first example solves with the NeumannValues set and the DirichletValues implicit. This one uses both explicit. This shows both stresses in the same direction and therefore inward and outward combined. This time the center hole moves with the deformed plate and the force is somehow appearing not so super uniform but incremental and therefore maximal in the middle of the sides. All four corners remain fixed in the response. The hole too is not deformed.
This collects the necessary questions that have to be answered to give great solution. This kind of problem belongs most often to the class of complete problems. Despite DirichletValue and NeumannValue given are other stiffnesses needed to be exact in an overall defined problem.
I presented several examples from the Mathematica documentation. Not each is great and matches the question or performs straight through.
Subscript[\[CapitalGamma], D] =
DirichletCondition[{u[x, y] == 0., v[x, y] == 0.},
Sqrt[x^2 + y^2] <= 0.1];
{ufun, vfun} =
NDSolveValue[{op == {NeumannValue[force, x == 1 || x == -1],
NeumannValue[-force, y == -1 || y == 1]},
Subscript[\[CapitalGamma], D]}, {u, v}, {x, y} \[Element] r];
mesh = ufun["ElementMesh"];
Show[{mesh["Wireframe"["MeshElement" -> "BoundaryElements"]],
NDSolve`FEM`ElementMeshDeformation[mesh, {ufun, vfun}][
"Wireframe"[
"ElementMeshDirective" -> Directive[EdgeForm[Red], FaceForm[]]]]}]
Subscript[\[CapitalGamma], D] =
DirichletCondition[{u[x, y] == 0., v[x, y] == 0.},
Sqrt[x^2 + y^2] <=
0.1 || (x == -1 && x == 1 && y == -1 && y == 1)];
gives no difference to the former definition of the DirichletValue.
Subscript[\[CapitalGamma], D] =
DirichletCondition[{u[x, y] == 0., v[x, y] == 0.},
Sqrt[x^2 + y^2] <= 0.1];
{ufun, vfun} =
NDSolveValue[{op == {NeumannValue[Sign[x]*force, x == 1 || x == -1],
NeumannValue[-Sign[y]*force, y == -1 || y == 1]},
Subscript[\[CapitalGamma], D]}, {u, v}, {x, y} \[Element] r];
mesh = ufun["ElementMesh"];
Show[{mesh["Wireframe"["MeshElement" -> "BoundaryElements"]],
NDSolve`FEM`ElementMeshDeformation[mesh, {ufun, vfun}][
"Wireframe"[
"ElementMeshDirective" -> Directive[EdgeForm[Red], FaceForm[]]]]}]
or turned by 90 degree to matched the sketch given. Or the minus of the force exerted changed in x and y.
As the path of my presentation went there is much more calculated that displacement by NDSolveValue in there runs and can be displayed.
Show[{Graphics[{Blue, Arrow[{{0, 0}, {0.1, 0}}]}], gr,
Graphics[Table[{Red, Arrow[{{k/6, -1.3}, {k/6, -1.1}}]}, {k, -6, 6,
2}]], Graphics[
Table[{Red, Arrow[{{k/6, 1.3}, {k/6, 1.1}}]}, {k, -6, 6, 2}]],
Graphics[Table[{Red, Arrow[{{-1.1, k/6}, {-1.3, k/6}}]}, {k, -6, 6,
2}]], Graphics[
Table[{Red, Arrow[{{1.1, k/6}, {1.3, k/6}}]}, {k, -6, 6, 2}]],
Graphics[{Red, Inset[Subscript[\[Sigma], x] == 10, {1.3, 0.1}],
Inset[Subscript[\[Sigma], x] == 10, {-1.3, 0.1}],
Inset[Subscript[\[Sigma], y] == -10, {0.15, 1.35}],
Inset[Subscript[\[Sigma], y] == -10, {0.15, -1.4}], Blue,
Inset[Text[Style["b", FontSize -> 24]], {0.15, 0.9}],
Inset[Text[Style["b", FontSize -> 24]], {0.15, -0.9}],
Inset[Text[Style["a", FontSize -> 24]], {-0.9, 0.15}],
Inset[Text[Style["a", FontSize -> 24]], {0.9, 0.15}],
Inset[Text[Style["r", FontSize -> 12]], {0., -0.0625}]}]}]
-sigma_y must be up or down or change sign, see my change for force.
Same for sigma_x.
Corrected version:
Show[{Graphics[{Blue, Arrow[{{0, 0}, {0.1, 0}}]}], gr,
Graphics[Table[{Red, Arrow[{{k/6, -1.3}, {k/6, -1.1}}]}, {k, -6, 6,
2}]], Graphics[
Table[{Red, Arrow[{{k/6, 1.3}, {k/6, 1.1}}]}, {k, -6, 6, 2}]],
Graphics[Table[{Red, Arrow[{{-1.1, k/6}, {-1.3, k/6}}]}, {k, -6, 6,
2}]], Graphics[
Table[{Red, Arrow[{{1.1, k/6}, {1.3, k/6}}]}, {k, -6, 6, 2}]],
Graphics[{Red, Inset[Subscript[\[Sigma], x] == 10, {1.3, 0.1}],
Inset[Subscript[\[Sigma], x] == -10, {-1.3, 0.1}],
Inset[Subscript[\[Sigma], y] == -10, {0.15, 1.35}],
Inset[Subscript[\[Sigma], y] == 10, {0.15, -1.4}], Blue,
Inset[Text[Style["b", FontSize -> 24]], {0.15, 0.9}],
Inset[Text[Style["b", FontSize -> 24]], {0.15, -0.9}],
Inset[Text[Style["a", FontSize -> 24]], {-0.9, 0.15}],
Inset[Text[Style["a", FontSize -> 24]], {0.9, 0.15}],
Inset[Text[Style["r", FontSize -> 12]], {0., -0.0625}]}]}]
x^2 + y^2 == 0.1
byx^2 + y^2 == 0.1^2
. $\endgroup$op[[3]]=op[[1]]+op[[2]]
, so we have 3 linear dependent equationsop=={0,0,0}
. It is the reason to take 2 functionsu[x,y], v[x,y]
to solve the systemop[[1]]==1, op[[2]]==0
. $\endgroup$