I've recently started using both Mathematica and the Finite Element Method. To familiarize myself with both, I've been trying out some things based on the examples provided. In one of the tutorials, they show how to simulate bending of a beam using plane stress (it can be found under "FEMDocumentation/tutorial/SolvingPDEwithFEM"). I figured this example can be modified to be used for a compression instead, but the results confuse me. The code I used is:
Needs["NDSolve`FEM`"]
(*Plane Stress Operator*)
op = {Inactive[
Div][({{0, -((Y \[Nu])/(1 - \[Nu]^2))}, {-((Y (1 - \[Nu]))/(
2 (1 - \[Nu]^2))), 0}}.Inactive[Grad][
v[x, y], {x, y}]), {x, y}] +
Inactive[
Div][({{-(Y/(1 - \[Nu]^2)),
0}, {0, -((Y (1 - \[Nu]))/(2 (1 - \[Nu]^2)))}}.Inactive[
Grad][u[x, y], {x, y}]), {x, y}],
Inactive[
Div][({{0, -((Y (1 - \[Nu]))/(2 (1 - \[Nu]^2)))}, {-((
Y \[Nu])/(1 - \[Nu]^2)), 0}}.Inactive[Grad][
u[x, y], {x, y}]), {x, y}] +
Inactive[
Div][({{-((Y (1 - \[Nu]))/(2 (1 - \[Nu]^2))),
0}, {0, -(Y/(1 - \[Nu]^2))}}.Inactive[Grad][
v[x, y], {x, y}]), {x, y}]} /. {Y -> 10^3, \[Nu] -> 25/100};
(*Boundary Conditions*)
Subscript[\[CapitalGamma],
D] = {DirichletCondition[v[x, y] == 0., y == 0],
DirichletCondition[v[x, y] == -0.1, y == 1]};
(*Solution*)
{uif, vif} =
NDSolveValue[{op == {0, 0}, Subscript[\[CapitalGamma], D]}, {u,
v}, {x, 0, 5}, {y, 0, 1}];
(*Visualisation*)
mesh = uif["ElementMesh"];
Show[{
mesh["Wireframe"[ "MeshElement" -> "BoundaryElements"]],
ElementMeshDeformation[mesh, {uif, vif}][
"Wireframe"[
"ElementMeshDirective" -> Directive[EdgeForm[Red], FaceForm[]]]]}]
ContourPlot[uif[x, y], {x, 0, 5}, {y, 0, 1},
ColorFunction -> "Temperature", AspectRatio -> Automatic]
The graphs this produces are as follows:
The result is indeed a 10% compression as indicated by the boundary conditions. However, wouldn't one expect the sides to both have an equal lateral deformation? As it is now, the construct is mainly deformed to the right. Did I make some mistake in the code or am I misunderstanding something about the theory behind solid mechanics?