Overview
Hyfeast's command-line finite element analysis program, hfAnalyzer, reads a text input file to perform analysis. The input file is composed of command blocks that start with reserved keywords beginning with *
, such as *Node
, *Element
. Below is an example input file for a simple frame analysis.
# Portal Frame Example
*Node
1, 0., 0.
2, 0.,10.
3,10.,10.
4,10., 0.
*Element, Type=B2D2H, ELSet=ALL
1, 1, 2
2, 2, 3
3, 3, 4
*Material, Type=IsoElasticity, Name=beam
210E9, 0.3, 0, 7700 # E, nu, alpha, density
*Section, Type=Beam, Name=BeamSection, Mass=Lumped
*Cell, TYPE=Rectangle, MAT=beam
0.4, 0.1
*Distribution, TYPE=Section
ALL, BeamSection
*Constraint, Type=Support, Name=BC
1, X|Y|RZ
4, X|Y|RZ
*Load, Type=Concentric, Name=LC2
2,X,100E3
*NSet, Type=SELECT, Name=23
2, 3
*NSet, Type=SELECT, Name=14
1, 4
#---------- Static analysis for odal concentric load
*Step, Type=Static, Name=Case1
*Activate, Type=Element
ALL
*Activate, Type=Constraint
BC
*Activate, Type=Load
LC2
*Output, Frequency=1
D,FN,BSF
*Print, File=Case1.prn
D@23, FN@14
#---------- Frequency extraction analysis
*Step, Type=Frequency, Name=Case2
10
*Activate, Type=Element
ALL
*Activate, Type=Constraint
BC
*Output
D # if frequency step, D means mode shape.
*Print, File=Case2.prn
This lists the general rules used in the input text file.
- If non-Ascii characters such as Korean are present, the file must be encoded in UTF-8.
- The input file is a text file and is parsed line by line in sequence.
- Blank lines are ignored, and explanations (comments) can be written using the
#
character. - The backslash
\
character can be used to concatenate with the next line. - Reserved keywords are case-insensitive, but user-defined strings (e.g., element set names) are case-sensitive.
-
Each line follows a free format such as
n1, n2, n3
orn1, ..., ID=id1, ...
. In this case, tokens used for parsing are separated by equal sign (=
) and comma (,
) characters. The program operates internally as follows:- Find the equal sign (
=
) and recognize the keyword on the left - Parse each item in free format by splitting them into tokens using comma as delimiters
- If enclosed in double quotes, treat it as a single token
- Find the equal sign (
-
For parts that are input as floating-point or integer values, simple arithmetic expressions can be used. For example,
1+2*(10+2)
is valid. If spaces are present inside the expression, it will be split into tokens and thus spaces must not be included. If spaces are present and should be treated as a single token, the expression must be enclosed in double quotes (e.g.,"1 + 2*(10+2)"
). -
Arithmetic expressions may include predefined functions and constants such as in
20*sin(30*deg)
.- Functions of the form
f(x)
:sin
,cos
,tan
,acos
,atan
,cosh
,sinh
,tanh
,abs
,exp
,log
,log10
,sqrt
,step
,sgn
- Functions of the form
f(x,y)
:pow
,max
,min
- Constant:
pi
,e
,deg
- Functions of the form
-
If a string input contains spaces, it must be enclosed in double quotes. For example:
*Material, TYPE=IsoElasticity, Name="the material"
- When a file name is provided as a string input, both relative and absolute paths are recognized. If the path contains spaces, it must be enclosed in double quotes. A relative path is resolved relative to the directory where the input file exists. For example:
*Include, File=model1.inp
*Include, File=templates/model1.inp
*Include, File="templates folder/model 1.inp" ← if spaces exist, use double quotes
*Include, File="./templates/frame model.inp" ← . means current directory
*Include, File="../frame model.inp" ← .. means parent directory
*Include, File="D:/DevProg/HFC4.0/EXAMPLE/frame model.inp" ← absolute path
Commands starting with an asterisk *
can be broadly categorized into modeling commands, analysis commands, and miscellaneous commands. The following is a summary of the commands.
Node Commands
*Node
: Define a node.*NSet
: Define a nset.*NGen
: Generate nodes with a line pattern and assign them to a nset.*NFill
: Generate nodes with a filling pattern and assign them to a nset.*NCopy
: Copy a nset.
Element Commands
*Element
: Define an element.*ELSet
: Define an elset.*ELGen
: Generate elements and assign them to an elset.*ELCopy
: Copy an elset.*Section
: Define a section.
Load and Constraint Commands
*Load
: Define a load.*Constraint
: Define a constraint.
Property Commands
*Material
: Define a material.*Function
: Define a function.*Surface
: Define surface*Construction
: Define auxilieary geometric entities – spline and construciton line.*CoordinateSystem
: Define a coordinate system.
Analysis Commands
*Step
: Define an analysis step.*Activate
: Activate elements, constraints, and loads.*Inactivate
: Inactivate elements, constraints, and loads.*Convergency
: Assign convergence criteria.*SolutionAlgorithm
: Assign the solution algorithm for equilibrium iteration.*TimeIntegration
: Assign a time integration scheme for a dynamic step.*RayleighDamping
: Assign Rayleigh damping for a dynamic step.*Modal
: Set dynamic analysis with modal analysis and assign modal damping ratios.*Field
: Set the element's field state.*Output
: Assign requests for field output for the output file (ODB file).*Print
: Assign requests for printing fields to a specified text file.*Check
: Assign requests for field checks.
Analysis Result Management Commands
*PostStep
: Generate a new step from the results of another step.*History
: Assign requests for history output.*PostHistory
: Extract history output from existing steps.*HDB
: Load HDB file(.hdb
)
Modeling Convenience Commands
*Include
: Include an external file.*DefaultParameter
: Assign a default parameter expression.*Distribution
: Assign nodal and element properties.*Model
: Generate a template model.
Other Commands
*Environment
: Setup environment*Stop
: Set up stop conditions.*TestMaterial
: Test the material model for a given strain history.