Skip to content

Overview

Input file

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 nodal 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

The following list summarizes the general rules for 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 or n1, ..., 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 a comma as a delimiter
    • If enclosed in double quotes, treat it as a single token
  • 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
  • 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 list summarizes the commands.

Node Commands
  • *Node: Define a node.
  • *NSet: Define an nset.
  • *NGen: Generate nodes with a line pattern and assign them to an nset.
  • *NFill: Generate nodes with a filling pattern and assign them to an nset.
  • *NCopy: Copy an nset.
  • *NProp: Define nodal properties.
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 a surface.
  • *Construction: Define auxiliary geometric entities – splines and construction lines.
  • *CoordinateSystem: Define a coordinate system.
Analysis Commands
  • *Step: Define an analysis step.
  • *Activate: Activate elements, constraints, and loads.
  • *Inactivate: Inactivate elements, constraints, and loads.
  • *Convergence: 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.
  • *State: Set the element's 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.
  • *Parameter: Assign a preset parameter expression.
  • *Distribution: Assign nodal and element properties.
  • *Model: Generate a template model.
Other Commands
  • *Environment: Set up the environment.
  • *Stop: Set up stop conditions.
  • *TestMaterial: Test the material model for a given strain history.

Execution of Analysis

hfAnalyzer is a program that runs on the Command-Line Interface (CLI). You can perform an analysis by typing hfAnalyzer followed by the input file name in the command line.

> hfAnalyzer frame.inp

There are various additional options available besides specifying the input file; these can be viewed using the -h option.

> hfAnalyzer -h

If you simply type hfAnalyzer without any arguments, the program will start in interactive mode, where you can manually enter the required information such as the input file name.

> hfAnalyzer
  ... Type the required information interactively (e.g., input file)

When the analysis is executed, several output files are generated. For example, assuming the input file is frame.inp (i.e., you run > hfAnalyzer frame.inp), the program creates an .hdb file that stores the analysis results. The .hdb file is a hfVisualizer-specific file and has two roles:

  • In pre-processing mode, it contains only the input file information (no analysis results).
  • In post-processing mode, it includes both the input file data and the analysis results.

The .hdb file can be generated in three different formats: HDF5 (default), text, and binary. The following sections summarize the files produced for each format.

When using HDF5 format (default)
> hfAnalyzer frame.inp

- frame.h5.hdb     : hdb file with hdf5 format
- frame.log        : log file
- frame.chk        : chk file (reproduced inp file)
- frame-step1.rst  : restart file for step
- frame-step2.rst
- ...
When using text format
> hfAnalyzer frame.inp -f text

- frame.text.hdb      : hdb file with text format (containing result)
- frame.text.hdb.info : hdb file with text format (containing info)
- frame.text.hdb.inp  : hdb file with text format (containing inp file)
- frame.log
- frame.chk
- frame-step1.rst
- frame-step2.rst
- ...
When using binary format
>hfAnalyzer frame.inp -f binary

- frame.bin.hdb     : hdb file with binary format
- frame.log
- frame.chk
- frame-step1.rst
- frame-step2.rst
- ...

Parameter Input Control

Basic Usage

When running hfAnalyzer from the command line, parameter input can be controlled using the -p option. The input file should be prepared in advance to use the expressions provided through this -p option.

example.inp

...
*Material. Type=IsoElasticity, Name=concrete
 <E>, 0.18

*Node, Offset=<BaseN>
 1, 10, 0, 1
...

In this case

> hfAnalyzer example.inp -p "<E>=20E9, <BaseN>=1000"

When executed, <E> and <BaseN> in the input file are replaced with the specified values, and the base name of the output files is set to example-20E9-1000 (e.g., example-20E9-1000.h5.hdb, example-20E9-1000.log, etc.).

The expression following -p must be written in the form "key=value, ..." and enclosed in double quotation marks (""). In the input file, each key is replaced with its corresponding value. To ensure that parameter keys are distinct from other text, it is recommended to surround them with uncommon symbols such as <A> or $A$. For example, if you write "<E>=20E9, <B>=7.3", then <E> will be replaced by 20E9 and <B> by 7.3. Tokens within a parameter expression can also be grouped using curly braces {}. For instance, in "<K>={R,12.3}, <B>=7.3", <K> is replaced by R,12.3.

Parameter expressions can also be used in the *Include command within the input file. For example:

example.inp

...
*Include, File=Mat, P="<E>=20E9, <DEN>=2300"
...

mat.inp

*Material. Type=IsoElasticity, Name=concrete
 <E>, 0.18, ,<DEN>

Advanced Usage

In the top-level input file (not those included via *Include), the *Parameter command allows for more advanced parameter handling.

example.inp

...

*Parameter, Name=Concrete, "<E>=25E9, <nu>=0.16, <den>=2450", Default
*Parameter, Name=Steel, "<E>=200E9, <nu>=0.3, <den>=7850"

*Material. Type=IsoElasticity, Name=Wall
 <E>, <nu>, 0., <den>
...

*Parameter can be understood as a predefined parameter expression. The name of a *Parameter expression must be unique and cannot be duplicated. The Default option specifies the expression used when hfAnalyzer is run without the -p option. Therefore, if multiple *Parameter statements exist, only one may use Default. Example command executions:

> hfAnalyzer example.inp
  → The parameter expression with the Default attribute is applied (here: Concrete)
  → The output file base name is example (e.g., example-Concrete.h5.hdb, ...)
> hfAnalyzer example.inp -p "Concrete"
  → The parameter expression named "Concrete" is applied
  → The output file base name is example-Concrete (e.g., example-Concrete.h5.hdb, ...)
> hfAnalyzer example.inp -p "Steel"
  → The parameter expression named "Steel" is applied
  → The output file base name is example-Steel (e.g., example-Steel.h5.hdb, ...)
> hfAnalyzer example.inp -p "<E>=20E9, <nu>=0.16, <den>=2300"
  → *Parameter statements are not used
  → The output file base name is example-20E9-0.16-2300 (e.g., example-20E9-0.16-2300.h5.hdb, ...)
> hfAnalyzer example.inp -p "Concrete:<E>=30E9"
  → The parameter expression named "Concrete" is applied, but <E> is overridden with 30E9
  → The output file base name is example-Concrete (e.g., example-Concrete.h5.hdb, ...)

A special placeholder <PARAMETER> can also be used within the input file.

example.inp

...

*Parameter, Name=Concrete, "<E>=25E9, <nu>=0.16, <den>=2450", Default
*Parameter, Name=Steel, "<E>=200E9, <nu>=0.3, <den>=7850"

*Material. Type=IsoElasticity, Name=Wall
 <E>, <nu>, 0., <den>
...

*Step, TYPE=Static, Name=SelfWeight
...
*Print, File=<DB>-<PARAMETER>-<STEP>.prn
...

Here, <DB> represents the input file name, <PARAMETER> represents the name of the parameter expression, and <STEP> represents the current analysis step name. If the analysis is run with the Default parameter expression, the generated print file will be named example-Concrete-SelfWeight.prn.

Note that even when the Default parameter expression is used (i.e., when -p is not specified), <PARAMETER> is still replaced accordingly.

> hfAnalyzer example.inp
  → The Default parameter expression is applied (here: Concrete)
  → The output file base name is example (e.g., example-Concrete.h5.hdb, ...)
  → The print file name is example-Concrete-SelfWeight.prn
> hfAnalyzer example.inp -p "Concrete"
  → The parameter expression named "Concrete" is applied
  → The output file base name is example-Concrete (e.g., example-Concrete.h5.hdb, ...)
  → The print file name is example-Concrete-SelfWeight.prn
> hfAnalyzer example.inp -p "Steel"
  → The parameter expression named "Steel" is applied
  → The output file base name is example-Steel (e.g., example-Steel.h5.hdb, ...)
  → The print file name is example-Steel-SelfWeight.prn

When running hfAnalyzer, the output file name can also be overridden using the -o option. The following examples show how the output file name can be redefined:

> hfAnalyzer example.inp -o output -p "<C>=I, <K>=12.3, <P>=7"
  → output.h5.hdb, ...
> hfAnalyzer example.inp -o "output-<PARAMETER>" -p "WT"
  → output-WT.hdb, ...
> hfAnalyzer example.inp -o "output-<PARAMETER>-<K>" -p "WT:<K>=12.3"
  → output-WT-12.3.h5.odb, ...
> hfAnalyzer example.inp -o "output-<K>" -p "WT:<K>=12.3"
  → output-12.3.h5.odb