Skip to content

Setting up parameters

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

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

#####Parameter file

Boundary conditions, body forces, fluid and flow 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, Neumann, Slip, Tension, AtmPres, Gravity, Domain. Keywords may be followed by an integer value indicating how many such conditions of this type will be supplied.

[Dirichlet | Neumann]
nec
{label_i [vertex|edge|triangle] [f|v|n] {values}} i=1, nbc

[Slip]
nbc
{label_i [vertex|edge|triangle] {value}} i=1, nbc

[Tension | AtmPres]
nbc
{label_i {value}} i=1, nbc

[Gravity]
gx gy gz

Domain
nbm
{label_i nu rho} i=1, nbm

The character f found in Dirichlet or Neumann conditions indicates that the numerical values are associated with a file data.sol that must be specified on the command line: -s data.sol.

example 1: Dirichlet boundary condition, single fluid

Suppose you want to assign homogenous and non-homogeneous Dirichlet boundary conditions on parts of the boundary and no Neumann condition (e.g. to resolve the LID drive cavity test case). Write the following lines in the parameter file:

Dirichlet
4                 # four boundary conditions specified, one for each side of cavity
1 vertex v 0. 0.
2 vertex v 0. 0.
3 vertex v 1. 0.
4 vertex v 0. 0.

Gravity
0. -9.81

Domain
1
0 1. 1.   # fluid properties (nu and rho) for domain labelled 0 
Clone this wiki locally