Skip to content

Setting up parameters

Pascal FREY edited this page Feb 7, 2016 · 6 revisions

This section contains information on how to setup an elastic parameter file file.elas.

Parameter file

Boundary conditions, traction forces, body forces and linear elastic material properties can be easily specified in a file associated with the problem to solve. The syntax is very simple: it is based on keywords and numerical values. The set of admissible keywords is the following: Dirichlet, Load, Lame, Young, Gravity. All keywords, except for Gravity, must be directly followed by an integer value indicating how many such conditions, parameters or properties will be supplied. Then, follows the description of the label, the type of entity and the numerical value of the boundary condition or the traction force.

[Dirichlet|Load]
nbc
{reference_i [vertex|edge|triangle] [f|v|n] {values}} i=1, nbc 

[Gravity]
gx gy gz

[Lame|Young]
nbm
{label_i [lambda mu|E nu]} i=1, nbm

if the character f is specified for Dirichlet or Load conditions, numerical values are to be found in a file data.sol that must be specified on the command line: -s data.sol.

example 1: 2d Dirichlet conditions, single body

Suppose you want to assign homogenous and non-homogeneous Dirichlet boundary conditions on parts of the boundary and no Neumann condition. Write the following lines in the parameter file:

Dirichlet
2                 # two boundary conditions specified
1 vertex v 0 0    # vertices labelled '1' set value (0,0) to displacement
2 vertex v 0 -1
Gravity
0.0 -9.81
Lame
1
0 186000. 3400.   # material properties assigned to triangles labelled '0' 

and enter the command line: elastic essai.mesh.

example 2: mixed conditions

In this case, your parameter file must contains lines like:

Dirichlet
1
2 edge v 0. 0.  # homogeneous Dirichlet bc
Load
1
1 edge n 1.0    # traction force normal to the surface, unit modulus
Lame
1
0 10. 0.01

likewise, enter the commande line: elastic essai.mesh.

example 3: file specifications

If the boundary conditions are defined in a file (this option may be useful for discretizing analytical conditions), you need to build a parameter file accordingly:

Dirichlet
1
10 vertex f
Gravity
0 -9.81
Lame 
1 
0 10. 0.001

and add the name of the file on the commande line: elastic essai.mesh -s data.sol -o essai.sol.

Clone this wiki locally