Illustrating Cauchy And Engineering Strain Deformation in 3D

Manipulate[
Module[{g,p1,p2,p3,p4,p5,p6,p7,p8,e=ee*10^9,σx=σxx*10^6,σy=σyy*10^6,σz=σzz*10^6,τxy=τxyxy*10^6,τyz=τyzyz*10^6,τzx=τzxzx*10^6},

g=(e/(2(1+ν)));
ϵx=((σx)/e)-(ν/e)(σy+ σz);
ϵy=((σy)/e)-(ν/e)(σx+ σz);
ϵz=((σz)/e)-(ν/e)(σy+ σx);
γxy=τxy/g;
γyz=τyz/g;
γzx=τzx/g;

{p1,p2,p3,p4,p5,p6,p7,p8}=getCoordinates[strainType,ϵx,ϵy,ϵz,γxy,γyz,γzx,k];

Style[Framed@Graphics3D[
Rotate[
{
If[plotStyle==1,
{
{EdgeForm[{Thick,Red}],FaceForm[Opacity[.3]],

Polygon[{ p1,p2,p3,p4}],
Polygon[{ p5,p6,p7,p8}],
Polygon[{ p4,p3,p7,p8}],
Polygon[{ p1,p2,p6,p5}],
Polygon[{ p2,p6,p7,p3}],
Polygon[{ p4,p8,p5,p1}]
}
},
{
{FaceForm[{Opacity[0.3]},White],
Polygon[{ p1,p2,p3,p4}],
Polygon[{ p5,p6,p7,p8}],
Polygon[{ p4,p3,p7,p8}],
Polygon[{ p1,p2,p6,p5}],
Polygon[{ p2,p6,p7,p3}],
Polygon[{ p4,p8,p5,p1}]
}
}
],

If[showOriginal,
{Gray,Dashed,
Line[{{-1/2,-1/2,1/2},{1/2,-1/2,1/2},{1/2,-1/2,-1/2},{-1/2,-1/2,-1/2},{-1/2,-1/2,1/2}}],
Line[{{-1/2,1/2,1/2},{1/2,1/2,1/2},{1/2,1/2,-1/2},{-1/2,1/2,-1/2},{-1/2,1/2,1/2}}],
Line[{{-1/2,-1/2,-1/2},{-1/2,1/2,-1/2}}],
Line[{{1/2,-1/2,-1/2},{1/2,1/2,-1/2}}],
Line[{{-1/2,-1/2,1/2},{-1/2,1/2,1/2}}],
Line[{{1/2,-1/2,1/2},{1/2,1/2,1/2}}]
},
{}
],

If[showAxes,
{
{Arrowheads[.02],
Arrow[{{0,0,0},#}]&/@{{.25,0,0},{0,0.25,0},{0,0,0.25 }}
}
,
{Text[Style["x",Italic,FontSize->Scaled[.04]],{.28,0,0}],Text[Style["y",Italic,FontSize->Scaled[.04]],{0,0.28,0}],Text[Style["z",Italic,FontSize->Scaled[.04]],{0,0,.28}]
}
},
{}
]

},90Degree,{1,0,0}
],
PlotRange->{{-1.3, 1.3},{-1.4,1.4},{-1.4,1.4}},
Boxed->False,
ImagePadding->.1,
ImageMargins->0,
SphericalRegion->True,
ViewPoint->{4.86215,-27.5746,5},
If[plotStyle==1,
Lighting->{{"Ambient",White}},
Lighting->Automatic
],
ViewAngle->2*Pi/180,
PreserveImageOptions->If[reset,reset=False;False,True],
ImageSize->{280,420}
],Antialiasing->True]
],

Text@Grid[{
{Grid[{
{Spacer[39],
TraditionalForm@HoldForm[(Subscript[σ, x])],
Control[{{σxx,0,""},-500,500,1,ImageSize->Tiny}],
Spacer[1],
Dynamic@AccountingForm[σxx,
3,NumberSigns->{"-","+"},NumberPadding->{"0","0"},SignPadding->True],
Spacer[3],
"MPa",
Button["zero",σxx=0,Appearance->"Palette",Background->LightBlue,ImageSize->{45,20}],
Spacer[47]
},

{
Spacer[1],
TraditionalForm@HoldForm[(Subscript[σ, y])],
Control[{{σyy,0,""},-500,500,1,ImageSize->Tiny}],
Spacer[1],
Dynamic@AccountingForm[σyy,
3,NumberSigns->{"-","+"},NumberPadding->{"0","0"},SignPadding->True],
Spacer[3],
"MPa",
Button["zero",σyy=0,Appearance->"Palette",Background->LightBlue,ImageSize->{45,20}],
Spacer[1]
},

{
Spacer[1],
TraditionalForm@HoldForm[(Subscript[σ, z])],
Control[{{σzz,0,""},-500,500,1,ImageSize->Tiny}],
Spacer[1],
Dynamic@AccountingForm[σzz,
3,NumberSigns->{"-","+"},NumberPadding->{"0","0"},SignPadding->True],
Spacer[3],
"MPa",
Button["zero",σzz=0,Appearance->"Palette",Background->LightBlue,ImageSize->{45,20}],
Spacer[1]
},

{
Spacer[1],
TraditionalForm@HoldForm[(Subscript[τ, x,y])],
Control[{{τxyxy,300,""},-500,500,1,ImageSize->Tiny}],
Spacer[1],
Dynamic@AccountingForm[τxyxy,
3,NumberSigns->{"-","+"},NumberPadding->{"0","0"},SignPadding->True],
Spacer[3],
"MPa",
Button["zero",τxyxy=0,Appearance->"Palette",Background->LightBlue,ImageSize->{45,20}],Spacer[1]
},

{
Spacer[1],
TraditionalForm@HoldForm[(Subscript[τ, y,z])],
Control[{{τyzyz,0,""},-500,500,1,ImageSize->Tiny}],
Spacer[1],
Dynamic@AccountingForm[τyzyz,
3,NumberSigns->{"-","+"},NumberPadding->{"0","0"},SignPadding->True],
Spacer[3],
"MPa",
Button["zero",τyzyz=0,Appearance->"Palette",Background->LightBlue,ImageSize->{45,20}],Spacer[1]
},

{
Spacer[1],
TraditionalForm@HoldForm[(Subscript[τ, z,x])],
Control[{{τzxzx,0,""},-500,500,1,ImageSize->Tiny}],
Spacer[1],
Dynamic@AccountingForm[τzxzx,
3,NumberSigns->{"-","+"},NumberPadding->{"0","0"},SignPadding->True],
Spacer[3],
"MPa",
Button["zero",τzxzx=0,Appearance->"Palette",Background->LightBlue,ImageSize->{45,20}],Spacer[1]
}

},Alignment->Left,Spacings->{.4,.2},Frame->False,FrameStyle->Directive[Thickness[.005],Gray]]
},

{
Grid[{
{Button["reset view",reset=True,ImageSize->{95,28}],Spacer[3],Button["reset stress",σxx=0;σyy=0;σzz=0;τxyxy=0;τyzyz=0;τzxzx=0,ImageSize->{95,28}]}
}]
},


{
Grid[{
{Spacer[23],Style["shear strain type",12],
RadioButtonBar[Dynamic[strainType],{"cauchy"->Style["Cauchy",12],"eng"->Style["engineering",12]}],
Spacer[22]
}
},Alignment->Left,Spacings->{.5,.5},Frame->False,FrameStyle->Directive[Thickness[.005],Gray]]
},

{
Grid[{
{
Spacer[46],
Style["Young's modulus E",11],
Control[{{ee,90,""},90,260,1,ImageSize->Tiny}],
Spacer[3],
Dynamic@AccountingForm[ee,
3,NumberSigns->{"",""},NumberPadding->{"0","0"},SignPadding->True],
Spacer[3],
"GPa",
Spacer[46]
},

{
Spacer[3],
Style["poisson ratio ν",11],
Control[{{ν,.3,""},.01,.5,.01,ImageSize->Tiny}],
Spacer[1],
Dynamic@AccountingForm[ν,
{2,2},NumberSigns->{"",""},NumberPadding->{"0","0"},SignPadding->True],
SpanFromLeft
},

{
Spacer[3],
Style["exaggeration factor",11],
Control[{{k,25,""},1,35,1,ImageSize->Tiny}],
Spacer[1],
Dynamic@AccountingForm[k,
2,NumberSigns->{"",""},NumberPadding->{"0","0"},SignPadding->True],
SpanFromLeft
}
},Alignment->Left,Spacings->{0,.8},Frame->True,FrameStyle->Directive[Thickness[.005],Gray]
]
},

{
Grid[{
{Spacer[11],Style["stress tensor (MPa)",11],Spacer[11]},
{
Style[Row[{Text@Style[TraditionalForm@HoldForm[{{(Subscript[σ, x]),(Subscript[τ, x,y]),(Subscript[τ, x,z])},{(Subscript[τ, y,x]),(Subscript[σ, y]),(Subscript[τ, y,z])},{(Subscript[τ, z,x]),(Subscript[τ, z,y]),(Subscript[σ, z])}}]]," = ",
Dynamic@TraditionalForm[{
{AccountingForm[σxx,
3,NumberSigns->{"-","+"},NumberPadding->{"0","0"},SignPadding->True],AccountingForm[τxyxy,
3,NumberSigns->{"-","+"},NumberPadding->{"0","0"},SignPadding->True],AccountingForm[τzxzx,
3,NumberSigns->{"-","+"},NumberPadding->{"0","0"},SignPadding->True]
},
{AccountingForm[τxyxy,
3,NumberSigns->{"-","+"},NumberPadding->{"0","0"},SignPadding->True],AccountingForm[σyy,
3,NumberSigns->{"-","+"},NumberPadding->{"0","0"},SignPadding->True],AccountingForm[τyzyz,
3,NumberSigns->{"-","+"},NumberPadding->{"0","0"},SignPadding->True]
},
{AccountingForm[τzxzx,
3,NumberSigns->{"-","+"},NumberPadding->{"0","0"},SignPadding->True],AccountingForm[τyzyz,
3,NumberSigns->{"-","+"},NumberPadding->{"0","0"},SignPadding->True],AccountingForm[σzz,
3,NumberSigns->{"-","+"},NumberPadding->{"0","0"},SignPadding->True]
}
}]
}],11],SpanFromLeft
}
},Alignment->Center,Spacings->{6.5,.8},Frame->False,FrameStyle->Directive[Thickness[.005],Gray]]
},


{
Grid[{
{Style["strain tensor",11]},
{
Style[Row[{Text@Style[TraditionalForm@HoldForm[{
{(Subscript[ϵ, x]),
Dynamic@If[strainType=="eng",Spacer[12],Style["1/2",8]]((Subscript[γ, x,y])),Dynamic@If[strainType=="eng",Spacer[12],Style["1/2",8]](Subscript[γ, x,z])},{Dynamic@If[strainType=="eng",Spacer[12],Style["1/2",8]](Subscript[γ, y,x]),(Subscript[ϵ, y]),Dynamic@If[strainType=="eng",Spacer[12],Style["1/2",8]](Subscript[γ, y,z])},{Dynamic@If[strainType=="eng",Spacer[12],Style["1/2",8]](Subscript[γ, z,x]),Dynamic@If[strainType=="eng",Spacer[12],Style["1/2",8]](Subscript[γ, z,y]),
(Subscript[ϵ, z])}}]]," = ",
Dynamic@TraditionalForm[{
{padIt1[100*ϵx,{5,4}],
((padIt1[180/Pi*If[strainType=="eng",γxy,γxy/2],{5,4}])^Degree),
((padIt1[180/Pi*γzx/If[strainType=="eng",1,2],{5,4}])^Degree)
},
{((padIt1[180/Pi*γxy/If[strainType=="eng",1,2],{5,4}])^Degree),
padIt1[100*ϵy,{5,4}],
((padIt1[180/Pi*γyz/If[strainType=="eng",1,2],{5,4}])^Degree)
},
{((padIt1[180/Pi*γzx/If[strainType=="eng",1,2],{5,4}])^Degree),
((padIt1[180/Pi*γyz/If[strainType=="eng",1,2],{5,4}])^Degree),
padIt1[100*ϵz,{5,4}]
}
}]
}],11]
}
},Alignment->Center,Spacings->{0.3,1},Frame->False,FrameStyle->Directive[Thickness[.005],Gray]
]
},

{
Grid[{
{
Row[{Text@Style["show original",12],Control[{{showOriginal,True,""},{True,False}}]}],
Row[{Text@Style["show axes",12],Control[{{showAxes,True,""},{True,False}}]}],
Row[{Style["select 3D style",12],RadioButtonBar[Dynamic[plotStyle],{1,2}]}]
}
},Alignment->Left,Spacings->{1,.4},Frame->True,FrameStyle->Directive[Thickness[.005],Gray]
]
}


},Alignment->Center
],

{{strainType,"eng"},None},
{{plotStyle,2},None},
{{reset,False},None},
{{ϵx,0},None},
{{ϵy,0},None},
{{ϵz,0},None},
{{γxy,0},None},
{{γyz,0},None},
{{γzx,0},None},

ControlPlacement->Left,
SynchronousUpdating->True,
SynchronousInitialization->True,
ContinuousAction->True,
Alignment->Center,
ImageMargins->0,
FrameMargins->0,
Paneled->True,
Frame->False,
TrackedSymbols:>{σxx,σyy,σzz,τxyxy,τyzyz,τzxzx,strainType,k,ee,ν,reset,showOriginal,showAxes,plotStyle},
Initialization:> 
(
(*definitions used for parameter checking*)
integerStrictPositive=(IntegerQ[#]&&#>0&);
integerPositive=(IntegerQ[#]&&#≥0&);
numericStrictPositive=(Element[#,Reals]&&#>0&);
numericPositive=(Element[#,Reals]&&#≥0&);
numericStrictNegative=(Element[#,Reals]&&#<0&);
numericNegative=(Element[#,Reals]&&#≤0&);
bool=(Element[#,Booleans]&);
numeric=(Element[#,Reals]&);
integer=(Element[#,Integers]&);
(*--------------------------------------------*)
padIt1[v_?numeric,f_List]:=AccountingForm[v,
f,NumberSigns->{"-","+"},NumberPadding->{"0","0"},SignPadding->True];
(*--------------------------------------------*)
padIt1[v_?numeric,f_Integer]:=AccountingForm[Chop[v],
f,NumberSigns->{"-","+"},NumberPadding->{"0","0"},SignPadding->True];
(*--------------------------------------------*)
padIt2[v_?numeric,f_List]:=AccountingForm[v,
f,NumberSigns->{"",""},NumberPadding->{"0","0"},SignPadding->True];
(*--------------------------------------------*)
padIt2[v_?numeric,f_Integer]:=AccountingForm[Chop[v],
f,NumberSigns->{"",""},NumberPadding->{"0","0"},SignPadding->True];
(*--------------------------------------------*)

getCoordinates[strainType_String,ϵx_?numeric,ϵy_?numeric,ϵz_?numeric,γxy_?numeric,γyz_?numeric,γzx_?numeric,k_?integerStrictPositive]:=Module[{p1,p2,p3,p4,p5,p6,p7,p8,aτxy,aτyz,aτzx},

aτxy=Sin[γxy/2];
aτyz=Sin[γyz/2];
aτzx=Sin[γzx/2];

(*set coordinates of 8 corners of cube based on type of strain*)
If[strainType=="eng",
p1={-1/2+k(-ϵx/2+aτzx),-1/2+k(-ϵy/2-aτxy),1/2+k(ϵz/2-aτyz)};
p2={1/2+k(ϵx/2+aτzx),-1/2+k(-ϵy/2+aτxy),1/2+k(ϵz/2-aτyz)};
p3={1/2+k(ϵx/2+aτzx),1/2+k(ϵy/2+aτxy),1/2+k(ϵz/2+aτyz)};
p4={-1/2+k(-ϵx/2+aτzx),1/2+k(ϵy/2-aτxy),1/2+k(ϵz/2+aτyz)};
p5={-1/2+k(-ϵx/2-aτzx),-1/2+k(-ϵy/2-aτxy),-1/2+k(-ϵz/2-aτyz)};
p6={1/2+k(ϵx/2-aτzx),-1/2+k(-ϵy/2+aτxy),-1/2+k(-ϵz/2-aτyz)};
p7={1/2+k(ϵx/2-aτzx),1/2+k(ϵy/2+aτxy),-1/2+k(-ϵz/2+aτyz)};
p8={-1/2+k(-ϵx/2-aτzx),1/2+k(ϵy/2-aτxy),-1/2+k(-ϵz/2+aτyz)}
,
p1={-1/2+k(-ϵx/2-aτxy/2+aτzx/2),-1/2+k(-ϵy/2-aτxy/2+aτyz/2),1/2+k(ϵz/2-aτyz/2-aτzx/2)};
p2={1/2+k(ϵx/2-aτxy/2+aτzx/2),-1/2+k(-ϵy/2+aτxy/2+aτyz/2),1/2+k(ϵz/2-aτyz/2+aτzx/2)};
p3={1/2+k(ϵx/2+aτxy/2+aτzx/2),1/2+k(ϵy/2+aτxy/2+aτyz/2),1/2+k(ϵz/2+aτyz/2+aτzx/2)};
p4={-1/2+k(-ϵx/2+aτxy/2+aτzx/2),1/2+k(ϵy/2-aτxy/2+aτyz/2),
1/2+k(ϵz/2+aτyz/2-aτzx/2)};
p5={-1/2+k(-ϵx/2-aτxy/2-aτzx/2),-1/2+k(-ϵy/2-aτxy/2-aτyz/2),
-1/2+k(-ϵz/2-aτyz/2-aτzx/2)};
p6={1/2+k(ϵx/2-aτxy/2-aτzx/2),-1/2+k(-ϵy/2+aτxy/2-aτyz/2),
-1/2+k(-ϵz/2-aτyz/2+aτzx/2)};
p7={1/2+k(ϵx/2+aτxy/2-aτzx/2),1/2+k(ϵy/2+aτxy/2-aτyz/2),
-1/2+k(-ϵz/2+aτyz/2+aτzx/2)};
p8={-1/2+k(-ϵx/2+aτxy/2-aτzx/2),1/2+k(ϵy/2-aτxy/2-aτyz/2),
-1/2+k(-ϵz/2+aτyz/2-aτzx/2)}

];

{p1,p2,p3,p4,p5,p6,p7,p8}
]
)

]

Given a unit volume represented by 3D cube of an isotropic material, you can apply normal and shear stresses and observe the strain deformation. You can select either Cauchy or engineering strain deformation. The stress and strain tensor is updated dynamically as you adjust the stress levels. You can change the material's modulus of elasticity E and the Poisson's ratio. The units for stress are in MPa (mega Pascal) and the unit for E is in GPa (Giga Pascal). Shear strain values in the strain tensor are converted to degree from radian for convenience. Direct strain is given in percentage.

Positive stress is tension and positive strain is extension. Since actual strain deformation (direct and shear) is too small to observe using real scale, you can use the exaggeration slider to multiply the actual strain by a factor. This is only for display purposes and does not affect the values shown in the tensors. Setting the exaggeration factor to 1 shows the actual strain.

You can use the mouse to move the cube around for better view. You can use the buttons to remove all stresses and return to original configuration.

references

[1] A.C. Ugural, S.K. Fenster, Advanced Strength and Applied Elasticity, New York: Elsevier, 1987.

[2] http://www.efunda.com/formulae/solid_mechanics/mat_mechanics/strain.cfm

[3] http://en.wikipedia.org/wiki/Infinitesimal_strain_theory

Contributed by: Nasser M. Abbasi