« Previous - Version 7/10 (diff) - Next » - Current version
Zhen LI, 09/20/2013 03:16 pm


Generating an Input File

1. Structure of the Input file

One effective way to get a sensible input file for some kind of problem is to make modifications to the one which has already exist, such files can be found within the 'examples' folder.
We can start with a general introduction of the input. Here we list one of the input files in the terminal window.

cd /fasttmp/liz13/Albany/examples/StaticElasticity3D ----> inputTraction.xml

1) The first part of the input, the lines listed first is the general introduction of the problem want to solve.

When comes to line (5),it's the place we set up the boundary conditions on node sets or side sets.

Here are some tokens:
"DBC stands for Dirichlet Boundary Conditions"
"NBC stands for Neumann Boundary Conditions"
"NS stands for node sets"
"SS stands for side sets"
The tag(ID) of the geometric model can be figured out with Paraview.
The restriction for the direction is controlled by the setting of DOF.
EX: If we want to fix the edge(which tag is 0 for example)of the geometric in the X direction. Then we can use the following definition:
Parameter name="DBC on NS NodeSet0 for DOF X" type="double" value="0.0"

In this input we apply the tension along the X-axis on the right-end surface.

Pay attention to the notation of Neumann Boundary Conditions:

< ParameterList name="Neumann BCs" >
< Parameter name="NBC on SS SideSet1 for DOF all set (t_x, t_y, t_z)" type="Array(double)" value="{1.0, 0.0, 0.0}"/ >

2) The next part in this input is the properties of the materials, which concludes "Elastic Modulus", "Poissons Ratio". And you can put other parameters of the materials here such as "Hardening Modulus" here when you need.

3) Here we come to the mesh part. We use the internal mesh generator here to generate mesh:

< ParameterList name="Discretization">
< Parameter name="1D Elements" type="int" value="16"/ >
< Parameter name="2D Elements" type="int" value="16"/ >
< Parameter name="3D Elements" type="int" value="16"/ >
< Parameter name="Method" type="string" value="STK3D"/ >
< Parameter name="Exodus Output File Name" type="string" value="stel3d.exo"/ >
< /ParameterList >
NOTE: Links to other example: Workflow of running a "million elements" Bar_With_Hole test with Albany: http://redmine.scorec.rpi.edu/documents/32
(Parasolid model, meshes generated from Simmetrix tools)

To make a regular mesh, we just need to adjust the number of the elements to proper value. And then give a name to the output files. For example here we named it: "stel3d.exo"

The rest part of the input is more about the solver, which we might touch in later sessions. For a general problem, we can just keep that part and make no change to this.

2. Examples

Assume that we want to solve a beambending problem(in 2D/3D). Here is the way how we can generate an input file to this specific example.

1) Geometric Setting

The first example we want to show is a 2D-beambending problem,with a 200*40 rectangular shape and this information can be implemented in the corresponding "Discretization" part.

2) Chose Boundary Conditions

See if we want to fix the left face of the rectangular in both X and Y direction, and apply a traction on the right side face, along the negtive Y direction, with the value -0.001.

< ParameterList name="Dirichlet BCs" >
< Parameter name="DBC on NS NodeSet0 for DOF X" type="double" value="0.0"/ >
< Parameter name="DBC on NS NodeSet0 for DOF Y" type="double" value="0.0"/ >
< /ParameterList>
< ParameterList name="Neumann BCs" >
< Parameter name="NBC on SS SideSet1 for DOF all set (t_x, t_y, t_z)" type="Array(double)" value="{0.0, -0.001, 0.0}"/ >
< /ParameterList >
......
< /ParameterList>
< ParameterList name="Parameters" >
< Parameter name="Number" type="int" value="3"/ >
< Parameter name="Parameter 0" type="string" value="DBC on NS NodeSet0 for DOF X"/ >
< Parameter name="Parameter 1" type="string" value="DBC on NS NodeSet0 for DOF Y"/ >
< Parameter name="Parameter 2" type="string" value="NBC on SS SideSet1 for DOF all set (t_x, t_y, t_z)[0]"/ >
< /ParameterList >
< ParameterList name="Response Functions" >
< Parameter name="Number" type="int" value="1"/ >
< Parameter name="Response 0" type="string" value="Solution Average"/ >
< /ParameterList >
< /ParameterList >
< ParameterList name="Discretization" >
< Parameter name="1D Elements" type="int" value="64"/ >
< Parameter name="1D Scale" type="double" value="4"/ >
< Parameter name="2D Elements" type="int" value="16"/ >
< Parameter name="3D Elements" type="int" value="16"/ >
< Parameter name="Method" type="string" value="STK3D"/ >
< Parameter name="Exodus Output File Name" type="string" value="Scale_stel3d.exo"/ >
< /ParameterList >

Here we give the output a name "Scale_stel3d.exo". You can name it as you wish.

Pay attention to the number of the parameters when you make changes to the boundary conditions, then you have finished the modification of the input file.

inputTraction.xml Magnifier (8.28 KB) Zhen LI, 09/19/2013 03:11 pm

model.png (8.94 KB) Zhen LI, 09/19/2013 04:10 pm