General input layout#
HAWC2 takes as input a text file with an .htc file extension. The HAWC2 input format is written in a form that forces the user to write the input commands in a structured way so aerodynamic commands are kept together, structural commands the same, etc. The order of the blocks does not matter.
The input commands are divided into command blocks, which are defined using a begin-end syntax. Each line must end with a semi colon “;” which gives the possibility for writing comments and the end of each line after the semi colon. The command lines can be written with any desired mix of capital or small letters because inside the code all lines are transformed into small letters. This could be important if something case-sensitive is written (e.g., the name of a subroutine within a DLL).
Important! All lines in an htc file must end with a semicolon, even if they are empty. You may insert whitespace between blocks to improve readability by having a line that is just a semicolon.
In the next chapters, the input commands are explained for every part of the code. The commands are separated into “main block” commands (namely, those that belong to a begin-end command block that is not part of a higher-level begin-end block) and “sub command blocks” (those that belong to a begin-end block included within another block). An example is printed below.: “simulation” is a main command block and “newmark” is a sub command block.
begin simulation;
time_stop 100.0 ;
solvertype 2 ; (sparse newmark)
;
begin newmark;
beta 0.27;
gamma 0.51;
deltat 0.02;
end newmark;
end simulation;
Continue_in_file option#
A feature from version 6.0 and newer is the possibility of continuing reading of the main input file into another. The command word continue_in_file followed by a file name causes the program to open the new file and continue reading of input until the command word exit. When exit is read the reading will continue in the previous file. An infinite number of file levels can be used. The HAWC2 input format is written in a form that forces the user to write the input commands in a structured way so aerodynamic commands are kept together, structural commands the same etc.
Command name |
Explanation |
|---|---|
continue_in_file |
1. File name (and path) to sublevel input file |
exit |
End of input file. Input reading is continued in higher level input file. |