Elasticity_2D.pro
Group { DefineGroup[Domain_Disp, Domain_Force, Domain_Force_Sur, Domain_Force_Lin] ; DomainTot = Region[ {Domain_Disp, Domain_Force} ]; }
Group { DefineGroup[ DomainInf ] ; DefineVariable[ Val_Rint, Val_Rext ] ; }
Jacobian { { Name Vol ; Case { { Region DomainInf ; Jacobian VolSphShell {Val_Rint, Val_Rext} ; } { Region All ; Jacobian Vol ; } } } { Name Sur ; Case { { Region All ; Jacobian Sur ; } } } { Name Lin ; Case { { Region All ; Jacobian Lin ; } } } { Name SurLinVol ; Case { { Region Domain_Force_Sur ; Jacobian Sur ; } { Region Domain_Force_Lin ; Jacobian Lin ; } { Region All ; Jacobian Vol ; } } } }
Integration { { Name GradGrad ; Case { { Type Gauss ; Case { { GeoElement Point ; NumberOfPoints 1 ; } { GeoElement Line ; NumberOfPoints 2 ; } { GeoElement Triangle ; NumberOfPoints 4 ; } { GeoElement Quadrangle ; NumberOfPoints 4 ; } } } } } }
/* --------------------------------------------------------------------------*/
/* Mechanics - Displacement ux, uy formulations */
FunctionSpace { { Name H_u_Mec2D ; Type Vector ; BasisFunction { { Name sxn ; NameOfCoef uxn ; Function BF_NodeX ; dFunction {BF_NodeX_D12, BF_Zero} ; Support DomainTot ; Entity NodesOf[ All ] ; } { Name syn ; NameOfCoef uyn ; Function BF_NodeY ; dFunction {BF_NodeY_D12, BF_Zero} ; Support DomainTot ; Entity NodesOf[ All ] ; } } Constraint { { NameOfCoef uxn ; EntityType NodesOf ; NameOfConstraint DeplacementX ; } { NameOfCoef uyn ; EntityType NodesOf ; NameOfConstraint DeplacementY ; } } } }
/*------------------------------------------------------------------------*/
Formulation { { Name Mec2D_u ; Type FemEquation ; Quantity { { Name u ; Type Local ; NameOfSpace H_u_Mec2D ; } } Equation { Galerkin { [ C_m[] * Dof{D1 u}, {D1 u} ] ; In Domain_Disp ; Jacobian Vol ; Integration GradGrad ; } Galerkin { [ -F[] , {u} ] ; In Domain_Force; Jacobian SurLinVol; Integration GradGrad; } } } }
/*------------------------------------------------------------------------*/
Resolution { { Name Mec2D_u ; System { { Name Sys_Mec ; NameOfFormulation Mec2D_u ; } } Operation { Generate Sys_Mec ; Solve Sys_Mec ; SaveSolution Sys_Mec ; } } }
/*------------------------------------------------------------------------*/
PostProcessing { { Name Mec2D_u ; NameOfFormulation Mec2D_u ; PostQuantity { { Name u ; Value { Term { [ {u} ] ; In Domain_Disp ; } } } { Name um ; Value { Term { [Norm[{u}]] ; In Domain_Disp ; } } } { Name F ; Value { Term { [F[]] ; In Domain_Force ; } } } { Name Vm ; Value { Term { [Sqrt[ CompX[C_m[]*{D1 u}]#1^2 + CompY[C_m[]*{D1 u}]#2^2 - #1*#2 + 3*(CompZ[C_m[]*{D1 u}])^2 ] ] ; In Domain_Disp ; } } } } } }
test.pro Group { Slab = Region[1001];
Bottom = Region[111] ; Top = Region[113] ; Left = Region[114]; Right = Region[112];
PointForce1 = Region[101] ; PointForce2 = Region[102] ; PointForce3 = Region[103] ; PointForce4 = Region[104] ; Domain_Force_Sur = Region[ { Top } ]; Domain_Force = Region[ {Domain_Force_Sur} ]; //Domain_Force = Region[ {} ]; Domain_Disp = Region[ Slab ] ; }
Function { c11 = 162.0e9; c12 = 77.5e9; c22 = 166.0e9; c33 = 42.9e9;
C_m[ Slab ] = TensorSym[ c11, c12, 0, c22, 0, c33 ];
F[Top] = Vector[0, -1e12, 0 ]; }
Constraint { { Name DeplacementX ; Type Assign ; Case { //{ Region PointForce3; Value -1 ; } { Region Bottom; Value 0.0 ; } } } { Name DeplacementY ; Type Assign ; Case { //{ Region PointForce3; Value -1 ; } { Region Bottom; Value 0.0 ; } } } }
Include "Elasticity_2D.pro"
PostOperation Map_u UsingPost Mec2D_u { Print [ u, OnElementsOf Domain_Disp, File "u.pos"] ; Print [ um, OnElementsOf Domain_Disp, File "um.pos"] ; Print [ F, OnElementsOf Domain_Force, File "F.pos"] ; Print [ Vm , OnElementsOf Domain_Disp, File "Vm.pos"] ; }
test.geo
p = 0.1; a = 1; s=1.0;
Point(1) = { 0 , 0 , 0 , p/10}; Point(2) = { a , 0 , 0 , p/10}; Point(3) = { a , a , 0 , p}; Point(4) = { 0 , a , 0 , p};
Line(1) = {1,2}; Line(2) = {2,3}; Line(3) = {3,4}; Line(4) = {4,1};
Line Loop(5) = {2,3,4,1}; Plane Surface(6) = {5};
Physical Surface(1001) = { 6 }; // Slab
Physical Point(101) = {1}; // PointForce1 Physical Point(102) = {2}; // PointForce2 Physical Point(103) = {3}; // PointForce3 Physical Point(104) = {4}; // PointForce4
Physical Line(111) = {1}; // Bottom Physical Line(113) = {3}; // Top Physical Line(114) = {4}; // Left Physical Line(112) = {2}; // Right
|