From 209a41ee463d5431adedbcab95dba70eae0ceca1 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Fri, 29 Jun 2018 17:45:27 +0200 Subject: [PATCH] nice ! --- HyperElasticity/beam.pro | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/HyperElasticity/beam.pro b/HyperElasticity/beam.pro index 00fab21..2afda84 100644 --- a/HyperElasticity/beam.pro +++ b/HyperElasticity/beam.pro @@ -4,8 +4,8 @@ DefineConstant[ ]; Group { - Left = Region[{1}]; - Top = Region[{2}]; + Left = Region[{1}]; + Top = Region[{2}]; Right = Region[{3}]; Domain_Mecha = Region[{100}]; // Mechanical domain } @@ -14,11 +14,11 @@ Flag_ExternalForce = 0; Function { DefineFunction[ FT_F, PK2, C_Tot_xx, C_Tot_xy, C_Tot_xz, C_Tot_yx, C_Tot_yy, C_Tot_yz, C_Tot_zx, C_Tot_zy, C_Tot_zz, E_g, nu_g]; - + // 1. Parameters of the problem //============================= - E = 771.0e6; - nu = 0.29; + E = 771.0e6; + nu = 0.29; //Lame parameters //=============== @@ -44,12 +44,12 @@ Function { v_TS[] = $var_TS; num_steps = 32; theta_value = 1.0; - + // Definition of parameters of the Dirichlet BCs, the dynamic problem and the external force //========================================================================================== - force_amplitude = 1.8e03; - force_ext[] = Vector[0., force_amplitude, 0.0]; + force_amplitude = 1.8e8; + force_ext[] = Vector[0., force_amplitude, 0.0]; } //Include "smp_stent_KMat_Elasticity.pro"; @@ -73,18 +73,18 @@ Function { // 3. Kinetic information : second Piola Kirchhoff [PK2] stresses //=============================================================== - // Green Lagrange strain measure GL = E = 0.5 * (C - I) and the 2nd Piola-Kirchoff stress + // Green Lagrange strain measure GL = E = 0.5 * (C - I) and the 2nd Piola-Kirchoff stress //======================================================================================= FT_F[] = Transpose[$1] * $1; // C = (F^T * F) GL[] = 0.5 * (FT_F[$1] - TensorDiag[1.0, 1.0, 1.0]); GL_Trace[] = (CompXX[GL[$1]] + CompYY[GL[#1]] + CompZZ[GL[#1]]) ; - PK2[] = (lambda * GL_Trace[$1] * TensorDiag[1.0, 1.0, 1.0] + 2 * mu * GL[$1]); + PK2[] = (lambda * GL_Trace[$1] * TensorDiag[1.0, 1.0, 1.0] + 2 * mu * GL[$1]); // 4. The nonlinear right hand side //================================= //RHS[] = PK2[$1] * Transpose[$1]; // The first Piola Kirchhoff : P = S * F^T RHS[] = $1 * PK2[$1]; // The first Piola Kirchhoff : P = F S - + // x P~{1}[] = Vector[CompXX[RHS[$1#1]], CompXY[RHS[#1]], CompXZ[RHS[#1]] ]; // y @@ -120,7 +120,7 @@ Function { - + // The material stiffness //======================== // xx @@ -213,7 +213,7 @@ Function { CompZZ[#1] * CompZX[#1], CompZZ[#1] * CompZY[#1], CompZX[#1] * CompZX[#1] + CompZY[#1] * CompZY[#1] + 2 * CompZZ[#1] * CompZZ[#1] ]; - + // 5.2.2. Material stiffness - the part resulting from "lambda" : C_Mat_lambda_ij //=============================================================================== // xx @@ -252,7 +252,7 @@ Function { C_Mat_lambda~{3}~{3}[] = lambda * Tensor[ CompZX[$1#1] * CompZX[#1], CompZX[#1] * CompZY[#1], CompZX[#1] * CompZZ[#1], CompZY[#1] * CompZX[#1], CompZY[#1] * CompZY[#1], CompZY[#1] * CompZZ[#1], CompZZ[#1] * CompZX[#1], CompZZ[#1] * CompZY[#1], CompZZ[#1] * CompZZ[#1]]; - + // 5.2. Total material stiffness : C_Mat_ij = C_Mat_lambda_ij + C_Mat_mu_ij //========================================================================== For i In {1:3} @@ -266,9 +266,9 @@ Function { Function { // 5.3 Total stiffness : C_Mat_ij + C_Geo_ij //=========================================== - For i In {1:3} + For i In {1:3} For j In {1:3} - C_Tot~{i}~{j}[] = C_Mat~{i}~{j}[$1] + C_Geo~{i}~{j}[$1]; + C_Tot~{i}~{j}[] = C_Mat~{i}~{j}[$1] + C_Geo~{i}~{j}[$1]; EndFor EndFor } @@ -308,7 +308,7 @@ Resolution { InitSolution[Sys_Mec]; Evaluate[ $var_DTime = period/(num_steps)]; Evaluate[ $var_Dt_Max = period/(num_steps)]; - + TimeLoopTheta[t_0, 1.0 * t_end, dtime[], theta_value]{ //TimeLoopNewmark[t_0, t_end, dtime[], beta, gamma] { Generate[Sys_Mec]; Solve[Sys_Mec]; Evaluate[ $syscount = $syscount + 1 ]; @@ -346,7 +346,7 @@ Resolution { } PostOperation { - { Name Mec ; NameOfPostProcessing Total_Lagrangian; + { Name Mec ; NameOfPostProcessing Total_Lagrangian; Operation { Print[ u, OnElementsOf Domain_Mecha, File "res/u.pos"] ; @@ -375,6 +375,6 @@ PostOperation { DefineConstant[ R_ = {"Mec_SMP", Name "GetDP/1ResolutionChoices", Visible 0}, - C_ = {"-solve -bin -v 3 -v2", Name "GetDP/9ComputeCommand", Visible 0}, + C_ = {"-solve -bin -v 3 -v2 -pos", Name "GetDP/9ComputeCommand", Visible 0}, P_ = { "", Name "GetDP/2PostOperationChoices", Visible 0} ]; -- GitLab