Commit 33079d70 authored by Christophe Geuzaine's avatar Christophe Geuzaine

first pass at interactive elasticity

parent 9f774414
This diff is collapsed.
......@@ -22,7 +22,8 @@ DefineConstant[
"e: electric field [V/m]",
"d: electric displacement field [C/m²]",
"v: scalar electric potential (e = -grad v) [V]",
"rho: free charge density [C/m³]",
"εr: relative dielectric permittivity [-]",
"ρ: free charge density [C/m³]",
"q: free charge [C]"],
Name "Model/01Formulation"},
modelDim = GetNumber["Gmsh/Model dimension"],
......@@ -149,38 +150,38 @@ Function {
Choices{ 0="Constant", 1="Function" },
Name StrCat[volPath, name~{i}, "/4rho preset"],
Label "Source choice"},
rho~{i} = {1, Visible (source~{i} == 1 && rho_preset~{i} == 0),
rho_cst~{i} = {1, Visible (source~{i} == 1 && rho_preset~{i} == 0),
Name StrCat[volPath, name~{i}, "/5rho value"],
Label "ρ [C/m³]", Help "Charge density"},
rho_fct~{i} = {"1", Visible (source~{i} == 1 && rho_preset~{i} == 1),
Name StrCat[volPath, name~{i}, "/5rho function"],
Label "ρ [C/m³]", Help "Charge density"},
epsr_preset~{i} = {#linearDielectricMaterials() > 2 ? 2 : 0,
material_preset~{i} = {#linearDielectricMaterials() > 2 ? 2 : 0,
Visible (material~{i} == 0),
Choices{ 0:#linearDielectricMaterials()-1 = linearDielectricMaterials() },
Name StrCat[volPath, name~{i}, "/1epsr preset"],
Label "Material choice"}
epsr~{i} = {1, Visible (material~{i} == 0 && epsr_preset~{i} == 0),
epsr_cst~{i} = {1, Visible (material~{i} == 0 && material_preset~{i} == 0),
Name StrCat[volPath, name~{i}, "/2epsr value"],
Label "εr [-]", Help "Relative dielectric permittivity"},
epsr_fct~{i} = {"1", Visible (material~{i} == 0 && epsr_preset~{i} == 1),
epsr_fct~{i} = {"1", Visible (material~{i} == 0 && material_preset~{i} == 1),
Name StrCat[volPath, name~{i}, "/2epsr function"],
Label "εr [-]", Help "Relative dielectric permittivity"}
];
// rho[]
If(source~{i} == 1 && rho_preset~{i} == 0) // constant
str = StrCat[str, "rho", reg, Sprintf[" = %g; ", rho~{i}]];
str = StrCat[str, "rho", reg, Sprintf[" = %g; ", rho_cst~{i}]];
ElseIf(source~{i} == 1 && rho_preset~{i} == 1) // function
str = StrCat[str, "rho", reg, " = ", rho_fct~{i}, "; "];
EndIf
// epsr[]
If(material~{i} == 0 && epsr_preset~{i} == 0) // constant
str = StrCat[str, "epsr", reg, Sprintf[" = %g;", epsr~{i}]];
ElseIf(material~{i} == 0 && epsr_preset~{i} == 1) // function
If(material~{i} == 0 && material_preset~{i} == 0) // constant
str = StrCat[str, "epsr", reg, Sprintf[" = %g;", epsr_cst~{i}]];
ElseIf(material~{i} == 0 && material_preset~{i} == 1) // function
str = StrCat[str, "epsr", reg, " = ", epsr_fct~{i}, ";"];
ElseIf(material~{i} == 0 && epsr_preset~{i} > 1) // preset
str = StrCat[str, "epsr", reg, " = ", linearDielectricMaterials(epsr_preset~{i}),
"_epsilonr;"];
ElseIf(material~{i} == 0 && material_preset~{i} > 1) // preset
str = StrCat[str, "epsr", reg, " = ", linearDielectricMaterials(material_preset~{i}),
"_relative_dielectric_permittivity;"];
ElseIf(material~{i} == 1) // infinite air region
str = StrCat[str, "epsr", reg, " = 1;"];
EndIf
......
......@@ -155,13 +155,13 @@ Function{
Choices{ 0="Constant", 1="Function" },
Name StrCat[volPath, name~{i}, "/7hc preset"],
Label "Source choice"},
hcx~{i} = {920000, Visible (source~{i} == 1 && hc_preset~{i} == 0),
hcx_cst~{i} = {920000, Visible (source~{i} == 1 && hc_preset~{i} == 0),
Name StrCat[volPath, name~{i}, "/8hcx value"],
Label "hcx [A/m]", Help "Coercive magnetic field along x-axis"},
hcy~{i} = {0, Visible (source~{i} == 1 && hc_preset~{i} == 0),
hcy_cst~{i} = {0, Visible (source~{i} == 1 && hc_preset~{i} == 0),
Name StrCat[volPath, name~{i}, "/8hcy value"],
Label "hcy [A/m]", Help "Coercive magnetic field along y-axis"},
hcz~{i} = {0, Visible (source~{i} == 1 && hc_preset~{i} == 0 && dim~{i} == 3),
hcz_cst~{i} = {0, Visible (source~{i} == 1 && hc_preset~{i} == 0 && dim~{i} == 3),
Name StrCat[volPath, name~{i}, "/8hcz value"],
Label "hcz [A/m]", Help "Coercive magnetic field along z-axis"},
hc_fct~{i} = {"Vector[92000, 0, 0]",
......@@ -172,90 +172,90 @@ Function{
Choices{ 0="Constant", 1="Function" },
Name StrCat[volPath, name~{i}, "/7js preset"],
Label "Source choice"},
jsx~{i} = {0, Visible (source~{i} == 2 && js_preset~{i} == 0 && dim~{i} == 3),
jsx_cst~{i} = {0, Visible (source~{i} == 2 && js_preset~{i} == 0 && dim~{i} == 3),
Name StrCat[volPath, name~{i}, "/8jx value"],
Label "jsx [A/m²]", Help "Current density along x-axis"},
jsy~{i} = {0, Visible (source~{i} == 2 && js_preset~{i} == 0 && dim~{i} == 3),
jsy_cst~{i} = {0, Visible (source~{i} == 2 && js_preset~{i} == 0 && dim~{i} == 3),
Name StrCat[volPath, name~{i}, "/8jy value"],
Label "jsy [A/m²]", Help "Current density along y-axis"},
jsz~{i} = {1, Visible (source~{i} == 2 && js_preset~{i} == 0),
jsz_cst~{i} = {1, Visible (source~{i} == 2 && js_preset~{i} == 0),
Name StrCat[volPath, name~{i}, "/8jz value"],
Label "jsz [A/m²]", Help "Current density along z-axis"},
js_fct~{i} = {"Vector[0, 0, 1]",
Visible (source~{i} == 2 && js_preset~{i} == 1),
Name StrCat[volPath, name~{i}, "/8js function"],
Label "js [A/m²]", Help "Current density"},
mur_preset~{i} = {#linearMagneticMaterials() > 2 ? 2 : 0,
material_preset~{i} = {#linearMagneticMaterials() > 2 ? 2 : 0,
Visible (material~{i} == 0),
Choices{ 0:#linearMagneticMaterials()-1 = linearMagneticMaterials() },
Name StrCat[volPath, name~{i}, "/1mur preset"],
Label "Material choice"}
mur~{i} = {1, Visible (material~{i} == 0 && mur_preset~{i} == 0),
mur_cst~{i} = {1, Visible (material~{i} == 0 && material_preset~{i} == 0),
Name StrCat[volPath, name~{i}, "/2mur value"],
Label "μr [-]", Help "Relative magnetic permeability"},
mur_fct~{i} = {"1", Visible (material~{i} == 0 && mur_preset~{i} == 1),
mur_fct~{i} = {"1", Visible (material~{i} == 0 && material_preset~{i} == 1),
Name StrCat[volPath, name~{i}, "/2mur function"],
Label "μr [-]", Help "Relative magnetic permeability"},
bh_preset~{i} = {#nonlinearMagneticMaterials() > 2 ? 2 : 0,
nl_material_preset~{i} = {#nonlinearMagneticMaterials() > 2 ? 2 : 0,
Visible (material~{i} == 1),
Choices{ 0:#nonlinearMagneticMaterials()-1 = nonlinearMagneticMaterials() },
Name StrCat[volPath, name~{i}, "/1bh preset"],
Label "Material choice"}
b_list~{i} = {"{0,0.3,0.7,1,1.4,1.7,2.2}",
Visible (material~{i} == 1 && bh_preset~{i} == 0),
Visible (material~{i} == 1 && nl_material_preset~{i} == 0),
Name StrCat[volPath, name~{i}, "/3b values"]},
h_list~{i} = {"{0,30,90,2e2,6e2,4e3,7e5}",
Visible (material~{i} == 1 && bh_preset~{i} == 0),
Visible (material~{i} == 1 && nl_material_preset~{i} == 0),
Name StrCat[volPath, name~{i}, "/2h values"]},
nu_fct~{i} = {"100. + 10. * Exp[1.8*SquNorm[$1]]",
Visible (material~{i} == 1 && bh_preset~{i} == 1),
Visible (material~{i} == 1 && nl_material_preset~{i} == 1),
Name StrCat[volPath, name~{i}, "/2nu function"],
Label "ν(b) [m/H]", Help "Magnetic reluctivity"},
dnudb2_fct~{i} = {"18. * Exp[1.8*SquNorm[$1]]",
Visible (material~{i} == 1 && bh_preset~{i} == 1),
Visible (material~{i} == 1 && nl_material_preset~{i} == 1),
Name StrCat[volPath, name~{i}, "/3dnudb2 function"],
Label "dν(b)/db²"},
mu_fct~{i} = {"***", Visible (material~{i} == 1 && bh_preset~{i} == 1),
mu_fct~{i} = {"***", Visible (material~{i} == 1 && nl_material_preset~{i} == 1),
Name StrCat[volPath, name~{i}, "/4mu function"],
Label "μ(h) [H/m]", Help "Magnetic permeability"},
dmudh2_fct~{i} = {"***", Visible (material~{i} == 1 && bh_preset~{i} == 1),
dmudh2_fct~{i} = {"***", Visible (material~{i} == 1 && nl_material_preset~{i} == 1),
Name StrCat[volPath, name~{i}, "/5dmudh2 function"],
Label "dμ(h)/dh²"}
];
// hc[] and js[]
If(source~{i} == 1 && hc_preset~{i} == 0) // magnet, constant
str = StrCat[str, "hc", reg,
Sprintf[" = Vector[%g, %g, %g]; ", hcx~{i}, hcy~{i}, hcz~{i}]];
Sprintf[" = Vector[%g, %g, %g]; ", hcx_cst~{i}, hcy_cst~{i}, hcz_cst~{i}]];
ElseIf(source~{i} == 1 && hc_preset~{i} == 1) // magnet, function
str = StrCat[str, "hc", reg, " = ", hc_fct~{i}, "; "];
ElseIf(source~{i} == 2 && js_preset~{i} == 0) // current source, constant
str = StrCat[str, "js", reg, " = ",
Sprintf["Vector[%g, %g, %g]; ", jsx~{i}, jsy~{i}, jsz~{i}]];
Sprintf["Vector[%g, %g, %g]; ", jsx_cst~{i}, jsy_cst~{i}, jsz_cst~{i}]];
ElseIf(source~{i} == 2 && js_preset~{i} == 1) // current source, function
str = StrCat[str, "js", reg, " = ", js_fct~{i}, "; "];
EndIf
// mu[], nu[], dhdb[], etc.
If(material~{i} == 0 && mur_preset~{i} == 0) // linear material, constant
If(material~{i} == 0 && material_preset~{i} == 0) // linear material, constant
str = StrCat[str,
"mu", reg, " = ", Sprintf["%g", mur~{i}], "*mu0; ",
"nu", reg, " = 1/(", Sprintf["%g", mur~{i}], "*mu0); "];
ElseIf(material~{i} == 0 && mur_preset~{i} == 1) // linear material, function
"mu", reg, " = ", Sprintf["%g", mur_cst~{i}], "*mu0; ",
"nu", reg, " = 1/(", Sprintf["%g", mur_cst~{i}], "*mu0); "];
ElseIf(material~{i} == 0 && material_preset~{i} == 1) // linear material, function
str = StrCat[str,
"mu", reg, " = (", mur_fct~{i}, ")*mu0; ",
"nu", reg, " = 1/((", mur_fct~{i}, ")*mu0); "];
ElseIf(material~{i} == 0 && mur_preset~{i} > 1) // linear material, preset
n = Str[ linearMagneticMaterials(mur_preset~{i}) ];
ElseIf(material~{i} == 0 && material_preset~{i} > 1) // linear material, preset
n = Str[ linearMagneticMaterials(material_preset~{i}) ];
str = StrCat[str,
"mu", reg, " = ", n, "_mur*mu0; ",
"nu", reg, " = 1/(", n, "_mur*mu0); "];
"mu", reg, " = ", n, "_relative_magnetic_permeability*mu0; ",
"nu", reg, " = 1/(", n, "_relative_magnetic_permeability*mu0); "];
ElseIf(material~{i} == 1) // nonlinear material
If(bh_preset~{i} == 0) // data points
If(nl_material_preset~{i} == 0) // data points
n = Sprintf["UserMaterialPts_%g", i];
str = StrCat[str,
n, "_b_list() = ", b_list~{i}, "; ",
n, "_h_list() = ", h_list~{i}, "; ",
n, "_magnetic_flux_density_list() = ", b_list~{i}, "; ",
n, "_magnetic_field_list() = ", h_list~{i}, "; ",
"_materialName = '", n, "'; Call DefineMaterialFunctions; "];
ElseIf(bh_preset~{i} == 1) // function
ElseIf(nl_material_preset~{i} == 1) // function
n = Sprintf["UserMaterialFct_%g", i];
str = StrCat[str,
n, "_nu[] = ", nu_fct~{i}, "; ",
......@@ -264,7 +264,7 @@ Function{
n, "_dmudh2[] = ", dnudb2_fct~{i}, "; ",
"_materialName = '", n, "'; Call DefineMaterialFunctions; "];
Else // preset
n = Str[ nonlinearMagneticMaterials(bh_preset~{i}) ];
n = Str[ nonlinearMagneticMaterials(nl_material_preset~{i}) ];
EndIf
// need second string due to possible macro call in str
str2 = StrCat[
......
// Lib_Elasticity_u.pro
//
// Template library for elastostatics, elastodynamics and modal analysis using a
// displacement (u) formulation, in both 2D (plane stress or plain strain) and
// 3D.
// Default definitions of constants, groups and functions that can/should be
// redefined from outside the template:
DefineConstant[
modelPath = "", // default path of the model
resPath = StrCat[modelPath, "res/"], // path for post-operation files
modelDim = 2, // default model dimension (2D)
Flag_PlaneStress = 0, // plain stress in 2D?
Flag_Regime = 0, // static (0), harmonic (1), time-domain (2), modal (3)
Freq = 1, // frequency (for harmonic simulations)
Freq_Target = 1, // frequency target (for modal simulations)
Num_Modes = 10, // number of modes (for modal simulations)
Flag_Axi = 0, // axisymmetric model?
FE_Order = 1 // finite element order
];
Group {
DefineGroup[
// Full elastic domain:
Vol_Mec,
// Subsets of Vol_Mec:
Vol_F_Mec, // region with imposed force
// Boundaries:
Sur_Neu_Mec // surfaces with Neumann boundary conditions (pressure)
];
Dom_Mec = Region[ {Vol_Mec, Sur_Neu_Mec} ];
}
Function{
DefineFunction[
E, // Young modulus (in Vol_Mec)
nu, // Poisson coefficient (in Vol_Mec)
rho, // mass density (in Vol_Mec)
f, // applied force per unit volume (in Vol_Force_Mec)
p // applied pressure (on Sur_Neu_Mec)
];
}
// End of definitions.
Jacobian {
{ Name Vol;
Case {
If(Flag_Axi && modelDim < 3)
{ Region All; Jacobian VolAxiSqu; }
Else
{ Region All; Jacobian Vol; }
EndIf
}
}
{ Name Sur;
Case {
If(Flag_Axi && modelDim < 3)
{ Region All; Jacobian SurAxi; }
Else
{ Region All; Jacobian Sur; }
EndIf
}
}
}
Integration {
{ Name Int;
Case {
{ Type Gauss;
Case {
{ GeoElement Point; NumberOfPoints 1; }
{ GeoElement Line; NumberOfPoints 3; }
{ GeoElement Triangle; NumberOfPoints 3; }
{ GeoElement Quadrangle; NumberOfPoints 4; }
{ GeoElement Tetrahedron; NumberOfPoints 4; }
{ GeoElement Hexahedron; NumberOfPoints 6; }
{ GeoElement Prism; NumberOfPoints 9; }
{ GeoElement Pyramid; NumberOfPoints 8; }
}
}
}
}
}
Function {
If(Flag_PlaneStress) // plane stress (EPC)
a[] = E[]/(1.-nu[]^2);
c[] = E[]*nu[]/(1.-nu[]^2);
Else // plane strain (EPD) or 3D
a[] = E[]*(1.-nu[])/(1.+nu[])/(1.-2.*nu[]);
c[] = E[]*nu[]/(1.+nu[])/(1.-2.*nu[]);
EndIf
b[] = E[]/2./(1.+nu[]); // = mu = G
C_xx[] = Tensor[ a[],0 ,0 , 0 ,b[],0 , 0 ,0 ,b[] ];
C_xy[] = Tensor[ 0 ,c[],0 , b[],0 ,0 , 0 ,0 ,0 ];
C_xz[] = Tensor[ 0 ,0 ,c[], 0 ,0 ,0 , b[],0 ,0 ];
C_yx[] = Tensor[ 0 ,b[],0 , c[],0 ,0 , 0 ,0 ,0 ];
C_yy[] = Tensor[ b[],0 ,0 , 0 ,a[],0 , 0 ,0 ,b[] ];
C_yz[] = Tensor[ 0 ,0 ,0 , 0 ,0 ,c[], 0 ,b[],0 ];
C_zx[] = Tensor[ 0 ,0 ,b[], 0 ,0 ,0 , c[],0 ,0 ];
C_zy[] = Tensor[ 0 ,0 ,0 , 0 ,0 ,b[], 0 ,c[],0 ];
C_zz[] = Tensor[ b[],0 ,0 , 0 ,b[],0 , 0 ,0 ,a[] ];
}
FunctionSpace {
{ Name H_ux_Mec; Type Form0;
BasisFunction {
{ Name sxn; NameOfCoef uxn; Function BF_Node;
Support Dom_Mec; Entity NodesOf[ All ]; }
If(FE_Order == 2)
{ Name sxn2; NameOfCoef uxn2; Function BF_Node_2E;
Support Dom_Mec; Entity EdgesOf[ All ]; }
EndIf
}
Constraint {
{ NameOfCoef uxn; EntityType NodesOf; NameOfConstraint Displacement_x; }
If(FE_Order == 2)
{ NameOfCoef uxn2; EntityType EdgesOf; NameOfConstraint Displacement_x; }
EndIf
}
}
{ Name H_uy_Mec; Type Form0;
BasisFunction {
{ Name syn; NameOfCoef uyn; Function BF_Node;
Support Dom_Mec; Entity NodesOf[ All ]; }
If(FE_Order == 2)
{ Name syn2; NameOfCoef uyn2; Function BF_Node_2E;
Support Dom_Mec; Entity EdgesOf[ All ]; }
EndIf
}
Constraint {
{ NameOfCoef uyn; EntityType NodesOf; NameOfConstraint Displacement_y; }
If(FE_Order == 2)
{ NameOfCoef uyn2; EntityType EdgesOf; NameOfConstraint Displacement_y; }
EndIf
}
}
{ Name H_uz_Mec; Type Form0;
BasisFunction {
{ Name syn; NameOfCoef uzn; Function BF_Node;
Support Dom_Mec; Entity NodesOf[ All ]; }
If(FE_Order == 2)
{ Name szn2; NameOfCoef uzn2; Function BF_Node_2E;
Support Dom_Mec; Entity EdgesOf[ All ]; }
EndIf
}
Constraint {
{ NameOfCoef uzn; EntityType NodesOf; NameOfConstraint Displacement_z; }
If(FE_Order == 2)
{ NameOfCoef uzn2; EntityType EdgesOf; NameOfConstraint Displacement_z; }
EndIf
}
}
}
Formulation {
{ Name Elasticity_u; Type FemEquation;
Quantity {
{ Name ux; Type Local; NameOfSpace H_ux_Mec; }
{ Name uy; Type Local; NameOfSpace H_uy_Mec; }
If(modelDim == 3)
{ Name uz; Type Local; NameOfSpace H_uz_Mec; }
EndIf
}
Equation {
Integral { [ -C_xx[] * Dof{d ux}, {d ux} ];
In Vol_Mec; Jacobian Vol; Integration Int; }
Integral { [ -C_xy[] * Dof{d uy}, {d ux} ];
In Vol_Mec; Jacobian Vol; Integration Int; }
If(modelDim == 3)
Integral { [ -C_xz[] * Dof{d uz}, {d ux} ];
In Vol_Mec; Jacobian Vol; Integration Int; }
EndIf
Integral { [ -C_yx[] * Dof{d ux}, {d uy} ];
In Vol_Mec; Jacobian Vol; Integration Int; }
Integral { [ -C_yy[] * Dof{d uy}, {d uy} ];
In Vol_Mec; Jacobian Vol; Integration Int; }
If(modelDim == 3)
Integral { [ -C_yz[] * Dof{d uz}, {d uy} ];
In Vol_Mec; Jacobian Vol; Integration Int; }
EndIf
If(modelDim == 3)
Integral { [ -C_zx[] * Dof{d ux}, {d uz} ];
In Vol_Mec; Jacobian Vol; Integration Int; }
Integral { [ -C_zy[] * Dof{d uy}, {d uz} ];
In Vol_Mec; Jacobian Vol; Integration Int; }
Integral { [ -C_zz[] * Dof{d uz}, {d uz} ];
In Vol_Mec; Jacobian Vol; Integration Int; }
EndIf
If(Flag_Regime)
Integral { DtDtDof [ rho[] * Dof{ux} , {ux} ];
In Vol_Mec ; Jacobian Vol ; Integration Int ; }
Integral { DtDtDof [ rho[] * Dof{uy} , {uy} ];
In Vol_Mec ; Jacobian Vol ; Integration Int ; }
If(modelDim == 3)
Integral { DtDtDof [ rho[] * Dof{uz} , {uz} ];
In Vol_Mec ; Jacobian Vol ; Integration Int ; }
EndIf
EndIf
If(Flag_Regime != 3)
Integral { [ CompX[f[]] , {ux} ];
In Vol_F_Mec; Jacobian Vol; Integration Int; }
Integral { [ CompY[f[]] , {uy} ];
In Vol_F_Mec; Jacobian Vol; Integration Int; }
If(modelDim == 3)
Integral { [ CompZ[f[]] , {uy} ];
In Vol_F_Mec; Jacobian Vol; Integration Int; }
EndIf
Integral { [ CompX[p[]] , {ux} ];
In Sur_Neu_Mec; Jacobian Sur; Integration Int; }
Integral { [ CompY[p[]] , {uy} ];
In Sur_Neu_Mec; Jacobian Sur; Integration Int; }
If(modelDim == 3)
Integral { [ CompZ[p[]] , {uz} ];
In Sur_Neu_Mec; Jacobian Sur; Integration Int; }
EndIf
EndIf
}
}
}
Resolution {
{ Name Elasticity_u;
System {
{ Name A; NameOfFormulation Elasticity_u;
If(Flag_Regime == 1)
Type Complex; Frequency Freq;
EndIf
}
}
Operation {
InitSolution[A];
If(Flag_Regime == 0 || Flag_Regime == 1)
Generate[A]; Solve[A]; SaveSolution[A];
ElseIf(Flag_Regime == 2)
Error["Time-domain not done yet"];
Else
GenerateSeparate[A]; EigenSolve[A, Num_Modes, (2*Pi*Freq_Target)^2, 0];
SaveSolutions[A];
EndIf
}
}
}
PostProcessing {
{ Name Elasticity_u; NameOfFormulation Elasticity_u;
PostQuantity {
{ Name u; Value {
If(modelDim == 3)
Term { [ Vector[ {ux}, {uy}, {uz} ]]; In Vol_Mec; Jacobian Vol; }
Else
Term { [ Vector[ {ux}, {uy}, 0 ]]; In Vol_Mec; Jacobian Vol; }
EndIf
}
}
{ Name sigma; Value {
If(modelDim == 3)
Term { [ TensorV[ C_xx[]*{d ux} + C_xy[]*{d uy} + C_xz[]*{d uz},
C_yx[]*{d ux} + C_yy[]*{d uy} + C_yz[]*{d uz},
C_zx[]*{d ux} + C_zy[]*{d uy} + C_zz[]*{d uz} ] ];
In Vol_Mec; Jacobian Vol; }
Else
Term { [ TensorV[ C_xx[]*{d ux} + C_xy[]*{d uy},
C_yx[]*{d ux} + C_yy[]*{d uy},
Vector[0,0,0]] ];
In Vol_Mec; Jacobian Vol; }
EndIf
}
}
}
}
}
PostOperation {
{ Name Elasticity_u; NameOfPostProcessing Elasticity_u;
Operation {
CreateDir[resPath];
Print[ sigma, OnElementsOf Vol_Mec, File StrCat[resPath, "sigma.pos"] ];
Print[ u, OnElementsOf Vol_Mec, File StrCat[resPath, "u.pos"] ];
}
}
}
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment