Lib_Elasticity_u.pro (getdp-3.4.0-source.tgz) | : | Lib_Elasticity_u.pro (getdp-3.5.0-source.tgz) | ||
---|---|---|---|---|
skipping to change at line 22 | skipping to change at line 22 | |||
resPath = StrCat[modelPath, "res/"], // path for post-operation files | resPath = StrCat[modelPath, "res/"], // path for post-operation files | |||
modelDim = 2, // default model dimension (2D) | modelDim = 2, // default model dimension (2D) | |||
Flag_PlaneStress = 0, // plain stress in 2D? | Flag_PlaneStress = 0, // plain stress in 2D? | |||
Flag_Regime = 0, // static (0), harmonic (1), time-domain (2), modal (3) | Flag_Regime = 0, // static (0), harmonic (1), time-domain (2), modal (3) | |||
Freq = 1, // frequency (for harmonic simulations) | Freq = 1, // frequency (for harmonic simulations) | |||
Freq_Target = 1, // frequency target (for modal simulations) | Freq_Target = 1, // frequency target (for modal simulations) | |||
Num_Modes = 10, // number of modes (for modal simulations) | Num_Modes = 10, // number of modes (for modal simulations) | |||
TimeInit = 0, // intial time (for time-domain simulations) | TimeInit = 0, // intial time (for time-domain simulations) | |||
TimeFinal = 1/50, // final time (for time-domain simulations) | TimeFinal = 1/50, // final time (for time-domain simulations) | |||
DeltaTime = 1/500, // time step (for time-domain simulations) | DeltaTime = 1/500, // time step (for time-domain simulations) | |||
Flag_Axi = 0, // axisymmetric model? | Flag_Axi = 0 // axisymmetric model? | |||
FE_Order = 1 // finite element order | ||||
]; | ]; | |||
Group { | Group { | |||
DefineGroup[ | DefineGroup[ | |||
// Full elastic domain: | // Full elastic domain: | |||
Vol_Mec, | Vol_Mec, | |||
// Subsets of Vol_Mec: | // Subsets of Vol_Mec: | |||
Vol_F_Mec, // region with imposed force | Vol_F_Mec, // region with imposed force | |||
skipping to change at line 79 | skipping to change at line 78 | |||
} | } | |||
} | } | |||
} | } | |||
Integration { | Integration { | |||
{ Name Int; | { Name Int; | |||
Case { | Case { | |||
{ Type Gauss; | { Type Gauss; | |||
Case { | Case { | |||
{ GeoElement Point; NumberOfPoints 1; } | { GeoElement Point; NumberOfPoints 1; } | |||
{ GeoElement Line; NumberOfPoints 3; } | { GeoElement Line; NumberOfPoints 2; } | |||
{ GeoElement Triangle; NumberOfPoints 3; } | { GeoElement Triangle; NumberOfPoints 3; } | |||
{ GeoElement Quadrangle; NumberOfPoints 4; } | { GeoElement Quadrangle; NumberOfPoints 4; } | |||
{ GeoElement Tetrahedron; NumberOfPoints 4; } | { GeoElement Tetrahedron; NumberOfPoints 4; } | |||
{ GeoElement Hexahedron; NumberOfPoints 6; } | { GeoElement Hexahedron; NumberOfPoints 6; } | |||
{ GeoElement Prism; NumberOfPoints 9; } | { GeoElement Prism; NumberOfPoints 9; } | |||
{ GeoElement Pyramid; NumberOfPoints 8; } | { GeoElement Pyramid; NumberOfPoints 8; } | |||
{ GeoElement Line2; NumberOfPoints 3; } | ||||
{ GeoElement Triangle2; NumberOfPoints 6; } | ||||
{ GeoElement Quadrangle2; NumberOfPoints 7; } | ||||
{ GeoElement Tetrahedron2; NumberOfPoints 15; } | ||||
{ GeoElement Hexahedron2; NumberOfPoints 34; } | ||||
{ GeoElement Prism2; NumberOfPoints 21; } | ||||
} | } | |||
} | } | |||
} | } | |||
} | } | |||
} | } | |||
Function { | Function { | |||
If(Flag_PlaneStress) // plane stress (EPC) | If(Flag_PlaneStress) // plane stress (EPC) | |||
a[] = E[]/(1.-nu[]^2); | a[] = E[]/(1.-nu[]^2); | |||
c[] = E[]*nu[]/(1.-nu[]^2); | c[] = E[]*nu[]/(1.-nu[]^2); | |||
skipping to change at line 120 | skipping to change at line 126 | |||
C_zx[] = Tensor[ 0 ,0 ,b[], 0 ,0 ,0 , c[],0 ,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_zy[] = Tensor[ 0 ,0 ,0 , 0 ,0 ,b[], 0 ,c[],0 ]; | |||
C_zz[] = Tensor[ b[],0 ,0 , 0 ,b[],0 , 0 ,0 ,a[] ]; | C_zz[] = Tensor[ b[],0 ,0 , 0 ,b[],0 , 0 ,0 ,a[] ]; | |||
} | } | |||
FunctionSpace { | FunctionSpace { | |||
{ Name H_ux_Mec; Type Form0; | { Name H_ux_Mec; Type Form0; | |||
BasisFunction { | BasisFunction { | |||
{ Name sxn; NameOfCoef uxn; Function BF_Node; | { Name sxn; NameOfCoef uxn; Function BF_Node; | |||
Support Dom_Mec; Entity NodesOf[ All ]; } | 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 { | Constraint { | |||
{ NameOfCoef uxn; EntityType NodesOf; NameOfConstraint Displacement_x; } | { 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; | { Name H_uy_Mec; Type Form0; | |||
BasisFunction { | BasisFunction { | |||
{ Name syn; NameOfCoef uyn; Function BF_Node; | { Name syn; NameOfCoef uyn; Function BF_Node; | |||
Support Dom_Mec; Entity NodesOf[ All ]; } | 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 { | Constraint { | |||
{ NameOfCoef uyn; EntityType NodesOf; NameOfConstraint Displacement_y; } | { 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; | { Name H_uz_Mec; Type Form0; | |||
BasisFunction { | BasisFunction { | |||
{ Name syn; NameOfCoef uzn; Function BF_Node; | { Name syn; NameOfCoef uzn; Function BF_Node; | |||
Support Dom_Mec; Entity NodesOf[ All ]; } | 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 { | Constraint { | |||
{ NameOfCoef uzn; EntityType NodesOf; NameOfConstraint Displacement_z; } | { NameOfCoef uzn; EntityType NodesOf; NameOfConstraint Displacement_z; } | |||
If(FE_Order == 2) | ||||
{ NameOfCoef uzn2; EntityType EdgesOf; NameOfConstraint Displacement_z; | ||||
} | ||||
EndIf | ||||
} | } | |||
} | } | |||
} | } | |||
Formulation { | Formulation { | |||
{ Name Elasticity_u; Type FemEquation; | { Name Elasticity_u; Type FemEquation; | |||
Quantity { | Quantity { | |||
{ Name ux; Type Local; NameOfSpace H_ux_Mec; } | { Name ux; Type Local; NameOfSpace H_ux_Mec; } | |||
{ Name uy; Type Local; NameOfSpace H_uy_Mec; } | { Name uy; Type Local; NameOfSpace H_uy_Mec; } | |||
If(modelDim == 3) | If(modelDim == 3) | |||
skipping to change at line 247 | skipping to change at line 232 | |||
Resolution { | Resolution { | |||
{ Name Elasticity_u; | { Name Elasticity_u; | |||
System { | System { | |||
{ Name A; NameOfFormulation Elasticity_u; | { Name A; NameOfFormulation Elasticity_u; | |||
If(Flag_Regime == 1) | If(Flag_Regime == 1) | |||
Type Complex; Frequency Freq; | Type Complex; Frequency Freq; | |||
EndIf | EndIf | |||
} | } | |||
} | } | |||
Operation { | Operation { | |||
// uncomment this for faster assembly with high order elements | // faster assembly with 2nd order elements | |||
// SetGlobalSolverOptions["-petsc_prealloc 400"]; | SetGlobalSolverOptions["-petsc_prealloc 500"]; | |||
If(Flag_Regime == 0 || Flag_Regime == 1) | If(Flag_Regime == 0 || Flag_Regime == 1) | |||
Generate[A]; Solve[A]; SaveSolution[A]; | Generate[A]; Solve[A]; SaveSolution[A]; | |||
ElseIf(Flag_Regime == 2) | ElseIf(Flag_Regime == 2) | |||
InitSolution[A]; InitSolution[A] ; | InitSolution[A]; InitSolution[A] ; | |||
TimeLoopNewmark[TimeInit, TimeFinal, DeltaTime, 1/4, 1/2] { | TimeLoopNewmark[TimeInit, TimeFinal, DeltaTime, 1/4, 1/2] { | |||
Generate[A]; Solve[A]; SaveSolution[A]; | Generate[A]; Solve[A]; SaveSolution[A]; | |||
} | } | |||
Else | Else | |||
GenerateSeparate[A]; EigenSolve[A, Num_Modes, (2*Pi*Freq_Target)^2, 0]; | GenerateSeparate[A]; EigenSolve[A, Num_Modes, (2*Pi*Freq_Target)^2, 0]; | |||
End of changes. 10 change blocks. | ||||
29 lines changed or deleted | 11 lines changed or added |