-
Notifications
You must be signed in to change notification settings - Fork 5
/
tensile-test.fin
27 lines (21 loc) · 1.24 KB
/
tensile-test.fin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# tensile test example for Fino, see https://caeplex.com/p/41dd1
MESH FILE_PATH tensile-test.msh # mesh file in Gmsh format (either version 2.2 or 4.x)
# uniform properties given as scalar variables
E = 200e3 # [ MPa ] Young modulus = 200 GPa
nu = 0.3 # Poisson’s ratio
# boundary conditions ("left" and "right" come from the names in the mesh)
PHYSICAL_GROUP left BC fixed # fixed end
PHYSICAL_GROUP right BC Fx=1e4 # [ N ] load in x+
FINO_SOLVER PROGRESS_ASCII # print ascii progress bars (optional)
# FINO_SOLVER KSP mumps # try to use mumps (if it is not available gamg+gmres is used)
FINO_STEP # solve
# compute reaction force at fixed end
FINO_REACTION PHYSICAL_GROUP left RESULT R
# write results (Von Mises, principal and displacements) in a VTK file
MESH_POST FILE_PATH tensile-test.vtk delta_sigma sigma sigma1 sigma2 sigma3 VECTOR u v w
# print some results (otherwise output will be null)
PRINT SEP " " "displ_max =" %.3f displ_max "mm"
PRINT SEP " " "sigma_max = (" %.1f sigma_max "±" delta_sigma_max ") MPa"
PRINT SEP " " "principal1 at center = (" %.5f sigma1(0,0,0) "±" delta_sigma(0,0,0) ") MPa"
PRINT SEP " " "reaction = [" %.3e R "] Newtons"
PRINT FILE_PATH tensile-sigma.dat %.0f sigma(0,0,0)