Anatomy of an input file¶
Before reading the record reference it helps to see a whole input file at once.
The file below is tests/regression/sm/patch100.in: a linear static analysis
of five plane-stress quadrilaterals in pure compression. It is complete — this
is everything OOFEM needs.
1patch100.out
2Patch test of PlaneStress2d elements -> pure compression
3LinearStatic nsteps 1
4domain 2dPlaneStress
5OutputManager tstep_all dofman_all element_all
6ndofman 8 nelem 5 ncrosssect 1 nmat 1 nbc 3 nic 0 nltf 1 nset 3
7node 1 coords 3 0.0 0.0 0.0
8node 2 coords 3 0.0 4.0 0.0
9node 3 coords 3 2.0 2.0 0.0
10node 4 coords 3 3.0 1.0 0.0
11node 5 coords 3 8.0 0.8 0.0
12node 6 coords 3 7.0 3.0 0.0
13node 7 coords 3 9.0 0.0 0.0
14node 8 coords 3 9.0 4.0 0.0
15PlaneStress2d 1 nodes 4 1 4 3 2 NIP 1
16PlaneStress2d 2 nodes 4 1 7 5 4 NIP 1
17PlaneStress2d 3 nodes 4 4 5 6 3 NIP 1
18PlaneStress2d 4 nodes 4 3 6 8 2 NIP 1
19PlaneStress2d 5 nodes 4 5 7 8 6 NIP 1
20Set 1 elementranges {(1 5)}
21Set 2 nodes 2 1 2
22Set 3 nodes 2 7 8
23SimpleCS 1 thick 1.0 width 1.0 material 1 set 1
24IsoLE 1 d 0. E 15.0 n 0.25 talpha 1.0
25BoundaryCondition 1 loadTimeFunction 1 dofs 2 1 2 values 1 0.0 set 2
26BoundaryCondition 2 loadTimeFunction 1 dofs 1 2 values 1 0.0 set 3
27NodalLoad 3 loadTimeFunction 1 dofs 2 1 2 components 2 2.5 0.0 set 3
28ConstantFunction 1 f(t) 1.0
Reading it line by line¶
The first six lines are the header. They are positional: each one must appear exactly once, in exactly this order.
- Line 1 — output file
The path of the output file, with no keyword. An existing file of the same name is overwritten. See Output file record.
- Line 2 — job description
Free text describing the job, with no keyword. It is copied into the output file. See Job description record.
- Line 3 — analysis
LinearStatic nsteps 1selects the analysis type and its parameters. The record keyword is the name of the engineering model; here one solution step is requested, i.e. one load case. See Analysis record.- Line 4 — domain
domain 2dPlaneStressfixes the default number of degrees of freedom per node and their physical meaning — here two displacements, u and v. See Domain record.- Line 5 — output manager
OutputManager tstep_all dofman_all element_allasks for all nodes and all elements to be printed in every solution step. See Output manager record.- Line 6 — components size
ndofman 8 nelem 5 ...declares how many records of each kind follow. These counts must match the records actually present, or the analysis stops. See Components size record.
Everything after the header is a component record. Component records are grouped by kind, and within each group the number following the keyword is the component’s label:
- Lines 7–14 — dof managers
node 8 coords 3 ...— eight nodes, each with three coordinates. The3aftercoordsis the array size, not a coordinate; see Attribute types. See Dof manager records.- Lines 15–19 — elements
PlaneStress2d 1 nodes 4 1 4 3 2 NIP 1— element 1 is a four-node quadrilateral on nodes 1, 4, 3, 2 with one integration point. Element types and their parameters are documented in the Element Library Manual. See Element records.- Lines 20–22 — sets
A set names a group of nodes, elements, edges or surfaces so that cross sections and boundary conditions can be attached to it.
Set 1is all five elements,Set 2the two nodes on the left edge,Set 3the two on the right. See Set records.- Line 23 — cross section
SimpleCS 1 thick 1.0 width 1.0 material 1 set 1gives the section properties and binds material 1 to the elements of set 1. See Cross section records.- Line 24 — material
IsoLE 1 d 0. E 15.0 n 0.25 talpha 1.0— isotropic linear elastic material with zero density, \(E = 15\), \(\nu = 0.25\). Material models are documented in the Material Library Manual. See Material type records.- Lines 25–27 — boundary conditions and loads
BoundaryConditionprescribes a value (here zero displacement) on the DOFs listed indofsfor the nodes of the given set;NodalLoadapplies a concentrated force. Each refers to a time function throughloadTimeFunction. See Load and boundary condition records.- Line 28 — time function
ConstantFunction 1 f(t) 1.0— the multiplier used by the boundary conditions above, constant and equal to one. See (Time) function records.
Things worth knowing early¶
- Input is case-insensitive, except inside quotes
Every input line is converted to lower case before parsing, so
node,NodeandNODEare the same keyword. This manual capitalises record keywords for readability only. Text between double quotes is left untouched, which matters for file paths and for Python expressions (see (Time) function records).- Arrays carry their own length
Every integer or real array starts with its size.
dofs 2 1 2is “two DOFs, numbers 1 and 2” — a frequent source of confusion. See Attribute types.- Component numbers are labels
Nodes and elements may be numbered arbitrarily, even non-contiguously; the number is a label by which the component is referenced. Cross sections, materials, boundary conditions, initial conditions and time functions, however, must be numbered from 1 to n without gaps.
- Attribute order within a record is free
Only the order of the records is fixed.
- One record per line, unless continued
End a line with
\to continue a record onto the next line, and start a line with#to write a comment.
Where to go next¶
Syntax and general rules — the full record order and the notation used in the reference sections.
Analysis record — the analysis types OOFEM can run.
Examples — further complete input files, including parallel ones.
The Element Library Manual and Material Library Manual document the element and material records themselves, which this manual only frames.