Home Search Reference Manuals Up Return
Introduction
General information on input.
Error statements.
Memory dump.
Predefined variables.
Redirection of input data reading.
Definition and input of substructures.
Definition and input of substructures.
Command line options
Description of the main calculation programs
FRESP Frequencyresponse analysis.
MODAL Modal analysis.
QUASI Quasistatical analysis.
TSIM Numerical integration.
Local coordinate systems.
Couplings.
Search command by operation
Input data commands
Examples
Export of results
The program CALC is the central calculation program in GENSYS. The program can be started with four different scripts depending on which type of analysis is required. The different scripts are:
The program is a general variable processing program. All the major functions
in the program are labeled variables. The variables are dependent on each
other according to a specific system described in the input data. The input
data model can be builtup of local coordinate systems, bodies, couplings, and
mathematical functions. The mathematical functions are defined by the main
command 'func' and are very powerful. In addition to creating new variables in
the memory, they can also transfer output data in existing variables.
Word and worddelimiters
Input data consists of word and worddelimiters, and is read in free format. Worddelimiters are: "="(equal sign), " "(space),"→"(tab), ","(comma) and "↵"(carriage return). All other characters are considered to be commands or input data.
Newline
Program Gensys ignores newlines in the input data file. An input data command can be given on one line or divided into many lines.
Case sensitivity
Main and sub commands are case insensitive. Other input data are case sensitive. I.e variable VKMH is not the same variable as vkmh.
Structure of input data commands
Almost all input data commands consists of the following four items:
Prefixes of variables used in this manual
In order to differentiate between different types of input data in this manual. Variables has been marked with different prefixes. The prefixes have the following meanings:
Formulas
If the variable consists of a +, , *, /, ( or )  sign.
Program CALC assumes that a formula has been written.
Program CALC will evaluate the value of the formula and use the result as input data.
The user can force Gensys to evaluate an expression as a formula, if the expression is enclosed in ` ` accents.
Fallback Values
Variables containing an "_" (underscore) in its name has a special meaning.
The underscore sign indicates that the name of the variable has "fallback values".
Example:
In the input data file variable mu_1 is defined.
This variable shall be used for the friction coefficient between wheel and rail.
When the first coupling between wheel and rail cp1_111r is about to be created,
and Gensys starts to search for the friction coefficient between wheel and rail.
Program Gensys will in its first attempt search for a variable named mu_111r1.
If this variable not can be found the program will search for the following variables:
mu_111r
mu_111
mu_11
mu_1
At last Gensys finds mu_1 and for the first contact point on the right wheel of the first wheelset,
program Gensys will use this variable as friction coefficient.
By using the Fallback Value technique it is easy to create different friction coefficients on different contact surfaces,
different wheel profiles on different wheels, different stiffnesses in different springs,,, etc. etc.
End of input data reading
The input data file is concluded with the characters E0F to mark that the file has come to an end. The reason why it is done in this way is to enable the main program to determine whether the expansion of all inserted files and substructures has succeeded or not.
CALC separates fatal errors, where execution cannot continue, from nonfatal
errors, where only a warning text appears. A fatal error has the following
fundamental appearance:
***ERROR*** In in_s_var > error Variable foo cannot be found. line no: 93 s_var sngl kyy2.d s_var sngl kyy2.F s_var sngl cyy2.d s_var sngl cyy2.F s_var sngl foo ^ s_var name= foo s_var type= sngl Input data reading has stopped at line= 93 in file= runf/ex_20_2b.tsimf cannot be stored, skip the rest of datagroup
In the end of the first line, after the ***ERROR***text.
Gensys shows which subroutine has written the statement.
The output can consists of many subroutines, separated by ">"signs.
This list shows the trace back of the error.
Then the error message and which file that caused the error message.
A nonfatal error has the following fundamental appearance:
* warning * In in_operp > check_name
Variable point.y is already defined.
Will be overwritten by command: func operp
Line 102 File runf/ex_20_2b.tsimf
After the * warning * text, gensys displays which subroutine has generated the statement.
Then the warning message and which file that caused the warning message.
Every command in the input data file creates a number of memory cells in the program's memory. The different commands occupy a different number of cells in the memory. The variables, which are created with the main command func, occupy the least space, whilst the main command lsys and mass can occupy up to 80 memory cells. Printing of the memory's content can be ordered if the input data 'idebug' is assigned any other value than zero. The memory dump has fundamentally the following appearance:
No  Refers to the number of the memory cell  
Irel  Refers to the relative address within each input data group  
It  Refers to the type of data which is stored in the memory cell


Name  Refers to the name of the variable  
Var  Is the memory cell 
Program CALC creates the first 49 variables in the memory before the input data is read. The first 49 variables contain the following information:
No Irel It Name Var Explanation  1 0 0 time 0.00000000000E+000 Time variable for TSIM 2 1 0 timestep 1.00000000000E003 See command tstep. 3 2 0 timestep_err 0.00000000000E+000 Numerical error in TSIM for each timestep 4 3 0 freq 5.00000000000E002 Frequency variable for FRESP 5 4 0 fstep 1.04000000000E+000 Frequency step in FRESP 6 5 0 accel.x 0.00000000000E+000 Longitudinal acceleration in fsys 7 6 0 accel.y 0.00000000000E+000 Lateral acceleration in fsys. 8 7 0 accel.z 9.81000000000E+000 Vertical acceleration in fsys 9 8 0 timeout 1.25000000000E002 See command tout. 10 9 0 zero 0.00000000000E+000 Variable containing the value zero 11 10 0 calc_type 5.00000000000E+000 Variable indicating type of analysis 12 11 0 max_tstep 1.50000000000E003 Max allowable timestep 13 12 0 min_tstep 1.00000000000E009 Min allowable timestep 14 13 0 0.00000000000E+000 Degree of freedom which controls the timestep 15 14 0 timestart 0.00000000000E+000 Start time 16 15 0 timestop 1.00000000000E+001 Stop time 17 16 0 Pval 1.00000000000E003 Following variables will get values if an 18 17 0 Ival 0.00000000000E+000 integrator with a variable time step control 19 18 0 Dval 0.00000000000E+000 is used. 20 19 0 max_tstep_dyn 1.00000000000E003 " 21 20 0 timestep_velo_f10 0.00000000000E+000 " 22 21 0 timestep_f10 1.00000000000E+000 " 23 22 0 timestep_err_f10 0.00000000000E+000 " 24 23 0 tstep_lpass 5.00000000000E004 " 25 24 0 timestep_err_lpass 0.00000000000E+000 " 26 25 0 Pival 0.00000000000E+000 " 27 26 0 Iival 0.00000000000E+000 " 28 27 0 Dival 0.00000000000E+000 " 29 28 0 terr_sign 0.00000000000E+000 " 30 29 0 terr_time 0.00000000000E+000 " Following variables will get values if command eval_compute_time has been given in input data: 31 30 0 ttout 0.00000000000E+000 Total time spend between two tout 32 31 0 tlsys 0.00000000000E+000 Time spent on positioning the coordinate systems 33 32 0 tcoupl 0.00000000000E+000 Time spent on calculating forces in all couplings 34 33 0 tfunc 0.00000000000E+000 Time spent on evaluating all funccommands 35 34 0 tmass 0.00000000000E+000 Time spent on calculating the acceleration of all masses 36 35 0 tcnstr 0.00000000000E+000 Time spent on evaluating all constraints 37 36 0 tinteg 0.00000000000E+000 Time spent by the integrator 38 37 0 tkdiag 0.00000000000E+000 Time spent on calculating forces in couplings of type "k", "k_l" and "k_r" 39 38 0 tkmat 0.00000000000E+000 Time spent on calculating forces in couplings of type "k3", "k3_l" and "k3_r" 40 39 0 tkcdia 0.00000000000E+000 Time spent on calculating forces in couplings of type "kc", "kc_l" and "kc_r" 41 40 0 tcdiag 0.00000000000E+000 Time spent on calculating forces in couplings of type "c", "c_l" and "c_r" 42 41 0 tcreep 0.00000000000E+000 Time spent on calculating forces in couplings of type "creep_*" 43 42 0 tfunc_wr_coupl_p 0.00000000000E+000 Time spent on calculating forces in functions of type "wr_coupl_*" 44 43 0 tkuser 0.00000000000E+000 Time spent on calculating forces in couplings of type "cuser*" 45 44 0 tkfdia 0.00000000000E+000 Time spent on calculating forces in couplings of type "kf", "kf2" & "kf3" 46 45 0 timeoutp 1.00000000000E010 Value of next tout 47 46 0 itout 0.00000000000E+000 Indicator showing the number of time steps taken since last tout 48 0 4 CalcType Addr= 1 Value= TSIM Character variable indicating type of analysis 49 1 1 char 1.00000000000000000E+000
The charactervariable CalcType is a variable indicating type of analysis being currently performed. It is an information for the user if he or she like to write input data which shall be different depending on type of analysis. The charactervariable CalcType can have the following values:
FRESP FrequencyResponse analysis MODAL Modal analysis QUASI Quasistatical analysis TSIM Time domain integration analysis NPICK Picking flexible mode shapes from a FEManalysis PREDAT Create stiffnesses and damping from preferred eigenvalues GPLOT Geometry plot program RUNF_INFO Input data file information program
In input data the user can use the CalcTypevariable in the following example:
## ## Read flexible parameters for the carbody ## ========================================================== if_then_char_init CalcType .ne. NPICK insert file npickr/$IDENT.npickr endif
In the above example file npickr/$IDENT.npickr is not read when current analysis type is NPICK. We don't want program NPICK to read that file because program NPICK is supposed to create that file.
Reference Manuals Calc menu
In the command 'insert file <insfil>', input reading will be
redirected to file insfil. The insertcommand can also be given in the
inserted file to further redirect the input reading.
In command 'insert format' <format> <insfil>, the
input data file and its contents will be expanded from a predefined
ASCIIfile insfile, according to the format specification <format>.
The file will be inserted into the main file in the exact same form. The
format statement which is given in input data, is used in FORTRAN's read
statement which reads <insfil>.
During the input phase, there are two valid format specifications which are:
a(character) and x(skip). Almost all format specifications contain commas,
which is why the format specification must be enclosed in accents. Otherwise
the comma will be interpreted as a delimiter. Moreover, the format
specifications must also be set in parentheses.
Example:
Read the column positions 110 and 2130 from the file "testfile".
insert format '(a10,10x,a10)' testfil
Please see further details under main command "insert"
Reference Manuals Calc menu
If the same input data shall be repeated several times with only minor
differences in the actual data, the input data can easily be formulated in a
substructure with arguments.
When the substructure is later called, the
different values can be entered into the substructure's argument.
Users, who are acquainted with programming in FORTRAN or Pascal, will see
great similarities with FORTRAN's substructures and/or Pascal's procedures.
Users, who have worked with UNIXscripts may see similarities between a
substructure in CALCinput data and a UNIXscript.
Below follows a description using a simple example.
A substructure is defined with the command:
substruct struct_name [ . . . . input data commands containing arguments $1, $2, etc. . . . . ]
Every substructure is given a name "struct_name", and the content of the
substructure is defined within brackets [ ].
This substructure is now stored in an temporary file for later use in the directive in_substruct.
Like in a UNIXscript the substructure has arguments $1, $2 etc. up to $9.
When the command in_substruct is given,
this argument must be replaced by a character string or a number.
The routine which inserts the argument into the substructure is a simple text editor.
If a number is given as argument in the summons of a substructure, it
will still be treated as a text string which replaces the symbol $1 in the
substructure.
The following command initiates the input of a defined substructure:
in_substruct struct_name [ arg1, arg2, etc. ]
The definition of the argument to the substructure is given in brackets.
The definition of the substructure not has been given in a previous substructcommand. Program CALC looks for the definition in the following files:"<struct_name>.ins" 
"ins/<struct_name>.ins" 
"vhedat/<struct_name>.ins" 
"$gensys/calc/insert_files/<struct_name>.ins" 
Example:
A wheelrail geometry function to describe wheels with constant conicity.
# # # WHEELRAIL GEOMETRY FUNCTION for ideally conic wheels #  # $1 = name or number of the vehicle # $2 = the conicity of the wheel # substruct kpf_rkona [ func intpl_r drkp_r$1 1.000 $2 1.000 $2 func intpl_r gamkph_r$1 1.000 $2 1.000 $2 func intpl_r gamkpv_r$1 1.000 $2 1.000 $2 func intpl_r zkp_r$1 1.000 $2 1.000 $2 func intpl_r rohr_r$1 1.000 2.222222 1. 2.222222 ]
It is now possible to use the different conicities for the different carriages
in a train unit of the same substructure. This can be done in the following
way using the substructure commands:
in_substruct kpf_rkona [ 1 0.1 ] in_substruct kpf_rkona [ 2 0.200 ] in_substruct kpf_rkona [ 111 0.3 ]
The output data from the abovementioned commands will give a wheelrail profile with a conicity of 0.1 in the vehicle named 1, 0.2 in the vehicle named 2, and conicity 0.3 in the vehicle named 111. All the wheels are given a lateral curvature variance of 2.222 (m).
The output data after expansion is as follows:func intpl_r drkp_r1 1.000 0.1 1.000 0.1 func intpl_r gamkph_r1 1.000 0.1 1.000 0.1 func intpl_r gamkpv_r1 1.000 0.1 1.000 0.1 func intpl_r zkp_r1 1.000 0.1 1.000 0.1 func intpl_r rohr_r1 1.000 2.222222 1. 2.222222 func intpl_r drkp_r2 1.000 0.200 1.000 0.200 func intpl_r gamkph_r2 1.000 0.200 1.000 0.200 func intpl_r gamkpv_r2 1.000 0.200 1.000 0.200 func intpl_r zkp_r2 1.000 0.200 1.000 0.200 func intpl_r rohr_r2 1.000 2.222222 1. 2.222222 func intpl_r drkp_r111 1.000 0.3 1.000 0.3 func intpl_r gamkph_r111 1.000 0.3 1.000 0.3 func intpl_r gamkpv_r111 1.000 0.3 1.000 0.3 func intpl_r zkp_r111 1.000 0.3 1.000 0.3 func intpl_r rohr_r111 1.000 2.222222 1. 2.222222Reference Manuals Calc menu
For program CALC a number of command line options are available. The user can put his or hers favorite options in a file named .gen_conf. Program CALC searches primarily for the .gen_conffile in the local working directory. If the file not can be found in the local working directory, program CALC searches for the .gen_conffile in the users homedirectory. At last if no .gen_conffile can be found program CALC reads the file $gensys/bin/gen_conf. Following options are understood:
addarg  Prompt for more arguments before calculation starts 
no_addarg  Do not prompt for more arguments 
debug  Don't remove temporary work files after execution 
no_debug  Keep temporary work files after execution 
nice "val"  Select niceness to run CALC in. val can be given values between 0 and 19. Where 0 gives the highest priority and 19 gives the lowest priority. 
help  Print this help information 
overwrite  Overwrite old results without questions. 
no_overwrite  Prompt the user before old results are overwritten. 
qident  Ask for an ident before starting the execution 
no_qident  Use the base name of the input data file as the identstring. 
save_expf  Save the expanded runffile 
no_save_expf  Do not save copies of the expanded runffiles. 
save_runf  Save the runffile in a file named .runc 
no_save_runf  Do not save copies of the runffiles. 
no_queue  Do not run the job in the queue system. 
at_queue "time"  Run program CALC under at and send a mail when the job is finished. Under time the user can specify when the calculation shall start. If time is set equal to now, the calculations will start immediately. 
batch_queue "time"  Run program CALC under batch and send a mail when the job is finished.
Under time the user can specify when the calculation shall start.
If time is set equal to now, the calculations will start immediately. The difference between at and batch is that in batch the execution of program CALC only starts when the system load level is below 0.8. N.B. batch only works under the LINUX operating system. 
nohup_queue  Run program CALC under nohup and send a mail when the job is finished. 
short_queue  Run calculation in the short queue. Script $gensys/bin/q_sys starts your queuesystem. 
long_queue  Run calculation in the long queue. Script $gensys/bin/q_sys starts your queuesystem. 
night_queue  Run calculation in the night queue. Script $gensys/bin/q_sys starts your queuesystem. 
arg(1)  Input datafile 
arg(2)  Ident 
The four main calculation programs are: FRESP, MODAL, QUASI and TSIM. The extension of the input data file governs which type of calculation that will take place. File extension .frespf leads to a frequencyresponse analysis. File extension .modalf leads to a modal analysis. File extension .quasif leads to a quasistatical analysis. File extension .tsimf leads to a numerical integration in time domain. Input data for the four programs shall be stored in a directory called "runf". The directory level above "runf" is in Gensys called project level.
FRESP is the mode in program CALC which performs the frequency response analysis.
The user can choose between different types of frequency response analysis in command
fresp_param.
The excitation of the model in mode FRESP is defined in command fexcit.
Before the analysis starts in FRESP the model must be linearized,
because the frequency response analysis is performed in the frequency domain.
The linearization process is made automatically in FRESP, the user must not
change anything in the input data.
FRESP linearizes the model by moving each degree of freedom an amount epsilon and
measure the response in all other degrees of freedom in the model.
In this way, a socalled "Jacobian matrix" is formed which describes the properties of the model for small
movements around the actual position of the model.
The actual position around which the linearization takes place can be changed by giving
the model an initial offset by the initval command.
When the Jacobian matrix is created program FRESP uses the matrix for creating the frequency response
by stepping from fstart to fstop
in steps controlled by fstep.
If the frequency response type in command fresp_param equals to Fourier_CG1
the answer will be complex,
in this case FRESP will store the results in the following way:
mass.x  (the position of a degree of freedom)  stores the real part of the complex spectra 
mass.vx  (the velocity of a degree of freedom)  stores the imaginary part of the complex spectra 
If the user only is interested in the absolute value of the frequency response spectra,
he or she can use the function cabs available in program
MPLOT,
in order to make the complex frequency response spectra a real frequency response spectra.
If the user is interested in knowing the time shift for a frequency in the spectra
the user shall look at the phase angle of the spectra.
The phase angle is defined as atan2( mass.vx, mass.x),
and can be calculated by function atan2 in
MPLOT.
The output data from the frequency response analysis is presented in two different files:
$ident.modjac
The Jacobian matrix is presented in the output data file with the extension .modjac.
The file is written in ASCIIformat and can be viewed directly in a editor.
$ident.id
The frequency response spectra are stored as complex vectors on the output data file with the extension.id.
The storing of the vectors for further post processing is specified in command
s_var sngl.
The file is written in MPdatformat
so that it can be read by the post processor MPLOT.
MODAL is the mode in program CALC calculating the eigenvalues and modal shapes of the model. In command modal_param the user can choose between different types of methods in the modal analysis procedure. In modal analysis there is no need for excitation of the model. Before the analysis starts in MODAL the model must be linearized, because the search for eigenvalues is performed in the frequency domain.
The linearization process is made automatically in MODAL, the user must not change anything in the input data. MODAL linearizes the model by moving each degree of freedom an amount epsilon and measure the response in all other degrees of freedom in the model. In this way, a socalled "Jacobian matrix" is formed which describes the properties of the model for small movements around the actual position of the model. The actual position around which the linearization takes place can be changed by giving the model an initial offset by the initval command.
When the Jacobian matrix is created program MODAL uses the matrix for calculating the eigenvalues. The analysis in program MODAL will be complex because large damping in the model is considered.
The deduction of the complex eigenvalue for a onedimensional mass is shown in the document Eigen_Freq_Deduce.html
The output data from the modal analysis is presented in five different files:
$ident.modjac
The Jacobian matrix is presented in the output data file with the extension .modjac.
The file is written in ASCIIformat and can be viewed directly in a editor.
$ident.mode
All the eigenvalues are presented in the output data file with the extension .mode.
The file is in ASCIIformat and can be printed directly on a laser printer.
$ident.modf
All the modal shapes are presented on the output data file with the extension .modf.
The file is in ASCIIformat and can be printed directly on a laser printer.
On the file, the modal shapes are scaled so that the largest component is equal to
the complex number (1,0).
Furthermore, the modal shapes are listed so that the modal shape's largest component
is listed first and is then followed by the remaining components in order of size.
$ident.id
All the eigenfrequencies are stored as complex scalars on the output data file with the extension.id.
The file is written in MPdatformat so that it can be read by the plot program MPLOT.
The complex scalars are stored with names taken from the degree of freedom which has the
predominant modal shape.
It is not possible to determine whether an eigenfrequency belongs to a certain degree of freedom,
but the scalars must have a name to make reference possible in MPLOT,
so therefore the MODAL program has been provided with this namegiving generator.
On certain occasions the namegiving generator can assign an unfortunate name to an eigenfrequency,
so in order to determine the actual physiognomy of an eigenfrequency,
it is recommended that the forms' appearance is plotted out in the program GPLOT.
However, it can be practical to assign a name to the forms when a parameter variation is executed,
and the forms' appearance does not greatly vary between each parameter change.
The namegenerator will then assign the same name to the same forms,
even if the output data is derived from different calculations.
$ident.gp
All the eigenvalues and eigenmodes will be stored in GPdatformat on the output data file with extension .gp.
The file can be read in program GPLOT for plotting and animating the different mode shapes.
QUASI is the mode in program CALC calculating the quasistatical position of the model.
In command quasi_param the user can choose between
different types of methods in the quasistatical analysis procedure.
Program mode QUASI operates on the full nonlinear model,
searching the position where internal forces are balanced with respect to
external forces and acceleration fields.
The output data from the quasistatical analysis is presented in two different files:
$ident.id
The frequency response spectra are stored as complex vectors on the output data file with the extension.id.
The file is written in MPdatformat so that it can be read by the plot program MPLOT.
All the eigenfrequencies are stored as complex scalars on the output data file with the extension.id.
The file is written in MPdatformat so that it can be read by the plot program MPLOT.
The complex scalars are stored with names taken from the degree of freedom which has the
predominant modal shape.
It is not possible to determine whether an eigenfrequency belongs to a certain degree of freedom,
but the scalars must have a name to make reference possible in MPLOT,
so therefore the MODAL program has been provided with this namegiving generator.
On certain occasions the namegiving generator can assign an unfortunate name to an eigenfrequency,
so in order to determine the actual physiognomy of an eigenfrequency,
it is recommended that the forms' appearance is plotted out in the program GPLOT.
However, it can be practical to assign a name to the forms when a parameter variation is executed,
and the forms' appearance does not greatly vary between each parameter change.
The namegenerator will then assign the same name to the same forms,
even if the output data is derived from different calculations.
$ident.gp
All the eigenvalues and eigenmodes will be stored in GPdatformat on the output data file with extension .gp.
The file can be read in program GPLOT for plotting and animating the different mode shapes.
QUASI is the command and subprogram which searches the position of all degree of freedoms where internal forces are balanced with respect to external forces, acceleration fields and track irregularities. The program is useful for many things. For example:
The output data from the calculation is loaded onto a file in GPdatformat
using the name $ident.gp. This data can be retrieved by CALC using the
directive initval read_gpdat. The GPdatfile can also be loaded into the
plotting program GPLOT for graphic presentation of the vehicle's position.
The output data can also be stored as scalars in a file written in MPdatformat.
In order to save scalars to the MPdatfile, please use the commands:
s_var scalar_0 or
s_var var_0.
TSIM is the command and subprogram which executes time simulations. The
program advances in time with the help of a numerical integrator which is
selected in the command tsim_param.
The integrator performs the commands in the same order as the input data has builtup the model.
It is, therefore, important that the input data is entered in the right time order,
so that the calculations will also be executed in the right order.
All ingoing variables must be defined before they can be used.
All new variables, which are defined in the program,
are checked that their names have not been defined earlier,
if so a warning or error message will appear.
Further information about execution order can be found in TSIM order
Local coordinate systems, bodies and couplings cannot be redefined in the input data file,
the data will be taken from the first definition.
If the user tries to redefine an existing coordinate system, body or coupling,
program CALC will not read the new data, only a warning message will be printed.
In command FUNC however it is the opposite because command FUNC writes directly on the
variable when the input data line is read.
If the variable does not exist it will be created, and if it exists it will be overwritten.
During simulation results are temorarily stored in RAM,
for later storing on harddrive when the simulation ends.
Results are stored every time tout is passed.
All variables that shall be saved are listed with the s_varcommand.
Because of this all results are lost if the user stops the simulation abnormally.
In order to stop the calculation without loosing the results,
there are three possible methods:
When creating models in GENSYS the user have access to three types of coordinate systems:
fsys  =  A fixed coordinate system located at origin 
esys  =  A moving coordinate system which take large angles into consideration 
lsys  =  A moving coordinate system which only consider linear rotations 
The coordinate systems are connected to each other according to the following figure:
bsys is the body fixed coordinate system, which describes the position of the mass relative to its lsys.
Positive coordinate directions are:
Name:  Direction:  Positive: 
X  Longitudinal  Forward 
Y  Lateral  To the right 
Z  Vertical  Downwards 
φ  Xrot Roll  See http://en.wikipedia.org/wiki/Righthand_rule 
χ  Yrot Pitch  See http://en.wikipedia.org/wiki/Righthand_rule 
ψ  Zrot Yaw  See http://en.wikipedia.org/wiki/Righthand_rule 
If the longitudinal coordinate of the track consists of many digits i.e. more digits than can be read in single precision. The user has the possibility to shift the whole trainset in longitudinal direction, including the track irregularities and the designed track geometry. In order to shift the whole model in longitudinal direction a variable with the name "Shift_Xposition" must exit. If the starting position of the model has a coordinate bigger than 100000 or less than 100000 the user will be prompted to define the "Shift_Xposition"variable.
Reference Manuals Calc menu
The couplings between the different bodies are defined with the command
'coupl'. They can include stiffness, viscous dampers, friction dampers,
viscous dampers in series with stiffness, and rolling friction coupling
between wheel and rail.
If the coupling's direction is equal to x, y, z, f, k, p, or m, the
displacement of the coupling will be calculated in the following way: the
position of the coupling's attachment point in body 2 is subtracted by the
position of the coupling's attachment in body 1. The attachment points'
positions are calculated in the esys which was specified in the input data of
the coupling. If a coupling has been used which lacks the input data argument
for esys, the connected bodies must both belong to the same esys, otherwise an
error print will occur.
If the coupling's direction is equal to 'c' or 'cu', the variable 'coupl.d' is
written with a plus sign when the coupling is extended, and with a minus sign
when the coupling is compressed. The coupling's force 'coupl.F' is calculated
as 'coupl.d' multiplied by the stiffness' characteristic.
The same rationale, as stated above, also applies for dampers. However,
instead of the coupling's deformation, the coupling's deformation velocity is
used.
Acceleration  accp_bodyf  Calculates body fixed accelerations from forces acting on the mass 
accp_bodyfix  Calculates bodyfix ed accelerations by numerical derivation  
Addition  add  Add variables together 
add_vect_scal  Add the value of a variable(scalar) to every component in a vector  
add_vect_vect  Add vectors together  
operp  Addition can be made in an operp expression  
incr  Increases a variable's value with another value  
Algebraic  abs  Calculates the absolute value of a variable 
inv  Inversion of a variable  
power  The first variable to the power of the second  
sign2  Transfers the sign of one number to another  
sqrt  Calculates the square root of a variable  
Averaging  mean_r  Calculate the average of a memory field 
mean_r2  Calculate the average of a memory field, with range selection  
Character  char  Creates a character constant in the memory 
Constants  const  Create a variable in memory assign its value only once 
const_block  Create many variables in memory, assign their values only once  
copy  Create a variable in memory assign its value every timestep  
copy_init  Create a variable in memory assign its value only once  
cr_mem  Create a memory field in memory assign its value only once  
Cosimulation  command  Send a command to the UNIXsystem 
Derivation  deriv  Numerical derivation of a variable 
intpl_r + create_d  Points are defined in a field by intpl_r, linear derivation between the points is made in create_d  
Discretization  discrete  Digitization of a variable with desired time steps 
Filtering  hpass1  First order highpass filter 
hpass1_0  First order highpass filter, zero initial value  
hpass2  Second order highpass filter  
hpass2_0  Second order highpass filter, zero initial value  
lpass1  First order lowpass filter  
lpass1_0  First order lowpass filter, zero initial value  
lpass2  Second order lowpass filter  
lpass2_0  Second order lowpass filter, zero initial value  
Butterworth  Designing higher order Butterworth filter  
deriv  First order highpass filter, infinite cutoff frequency  
integ  First order lowpass filter, zero cutoff frequency  
Integration  integ  Integration of a variable 
Interpolation  intpl_l  Definition of points and linear interpolation are both defined in intpl_l 
intpl_s  Definition of points and spline interpolation are both defined in intpl_s  
intpl_r + create_l  Points are defined in intpl_r, linear interpolation is made in create_l  
intpl_r + create_s  Points are defined in intpl_r, spline interpolation is made in create_s  
intpl_r3 + crehex1  3Dpoints are defined in intpl_r3, interpolation in space is made in crehex1  
Limitation  l_lim  Limits a variable downwards 
u_lim  Limits a variable upwards  
Minimization  min  Calculate the min. value of two variables 
min_r  Picks up the minvalue in a field  
min_r2  Picks up the minvalue in a field, with range selection  
Multiplication  mul  Multiply variables together 
operp  subtraction can be made in an operp expression  
mul_vect_scal  Multiply the value of a variable to every component in a vector  
smul_vect_vect  Scalar multiplication of two vectors  
Position  pos_rlsys1  Calculate the position of a point attached to a body 
pos_rlsys2  As pos_rlsys1 but in another lsys  
Sign  sign2  Transfers the sign of one number to another 
Subtraction  sub  Subtract variables 
sub_vect_scal  Subtract the value of a variable(scalar) from every component in a vector  
sub_vect_vect  Subtract vectors  
decr  Decreases a variable's value with another value  
operp  Subtraction can be made in an operp expression  
Time delay  fifo_mem + create_l  Store the variable in a memory field, interpolate the required time delay in create_l 
lpass1  Time delay in a first order lowpass filter equals to 1/(2.*pi*f_{0})  
Transcendental  acos  Calculates the arccosinus of a variable 
asin  Calculates the arcsinus of a variable  
atan  Calculates the arctangent of a variable  
cos  Calculates the cosine of a variable  
sin  Calculates the sinus of a variable  
tan  Calculates tangent of a variable 
Summary of all main commands:
`accel`  =  Definition of an external acceleration field 
`body`  =  Definition of the physical size and shape of a mass 
`check_if_then_at_0`  =  Always check if_thenstatements, even at time=tstart 
`constr`  =  Setting constraints to integrated variables 
`cosim_server`  =  Make a cosimulation using TCP. 
`cosim_server_udp`  =  Make a cosimulation using UDP. 
`coupl`  =  Definition of a coupling property or a coupling between two masses 
`eof`  =  Marks the end of the input data file 
`eval_compute_time`  =  Evaluate the computation time in every time step 
`fexcit`  =  Definition of excitation points for frequencyresponse analysis 
`force`  =  Definition of external forces 
`fresp`  =  Order the CALCprogram to perform a frequencyresponse analysis 
`fresp_param`  =  Defines different parameters for the frequencyresponse analysis 
`fstart`  =  Specifies the start frequency in frequencyresponse analysis 
`fstep`  =  Specifies the frequency steps in frequencyresponse analysis 
`fstop`  =  Specifies the stop frequency in frequencyresponse analysis 
`func`  =  Definition of a function 
`head`  =  Definition of head lines 
`idebug`  =  Definition of different levels of debug printing 
`idebug_file`  =  The name of the file to where the idebug information will be written 
`idebug_file_read`  =  Read input data model from idebug_file. 
`if_then`  =  Definition of an if_thenblock 
`if_then_char_init`  =  Definition of an if_then_char_initblock 
`if_then_init`  =  Definition of an if_then_initblock 
`else`  =  Precedes an elseblock 
`elseif_then_init`  =  Continuation of an if_then_initblock. 
`elseif_then_char_init`  =  Continuation of an if_then_char_initblock 
`endif`  =  End of an if_then, if_then_char_init or if_then_initblock 
`in_substruct`  =  Insertion of a substructure. 
`initval`  =  Input reading of initial values 
`insert`  =  Definition of includefiles 
`invert_massmatrix`  =  Controls the inversion of the mass matrix 
`loop_beg`  =  Definition of an algebraic loop 
`loop_end`  =  End of algebraic loop defined by loop_beg 
`loop_beg2`  =  Definition of an algebraic loop with two arguments 
`loop_end2`  =  End of algebraic loop defined by loop_beg2 
`lsys`  =  Definition of a local coordinate system 
`mass`  =  Definition of a mass 
`max_exec_time`  =  Setting max length of execution time. 
`modal`  =  Order the CALCprogram to perform a modal analysis 
`modal_param`  =  Defines different parameters for the modal analysis 
`no_warning`  =  Suppresses warning messages from command func 
`overwrite_property`  =  This command makes it possible to overwrite an existent property in the memory. 
`post_process`  =  Execute an UNIXcommand after the calculation 
`pre_process`  =  Execute an UNIXcommand before starting the calculation 
`quasi`  =  Order the CALCprogram to perform a quasistatical analysis 
`quasi_param`  =  Defines different parameters for the quasistatical analysis 
`s_var`  =  Variables to be stored on MPdatfile for postprocessing. 
`s_var_filter`  =  Antialiasing filter before writing variables to MPdatfile. 
`substruct`  =  Definition of a substructure. 
`tout`  =  Specifies the output steps to the MPdatfile in time integration analysis 
`tsim`  =  Order the CALCprogram to perform a time integration analysis 
`tsim_param`  =  Defines different parameters for the time integration analysis 
`tstart`  =  Specifies the start time in time integration analysis 
`tstep`  =  Specifies the time steps in time integration analysis 
`tstop`  =  Specifies the stop time in time integration analysis 
`update_mass_matrix`  =  Keyword that forces an update of the mass matrix in every time step 
`wlog_beg`  =  Specifies start of input data which is to be logged on a log file 
`wlog_end`  =  Ends the writing into a log file beginning with command wlog_beg 
`wlog_store`  =  Specifies whether the log file will be saved or not. 
`write_ca_file`  =  During timedomain simulations, write results to the harddisk. 
`write_id_file`  =  During timedomain simulations, split up the results in many idfiles. 
For backward compatibility reasons, old and obsolete input data commands has been kept in the program. However the use of old input data commands is not encourenged, therefore they have been removed from the list above. If you have an old input data file contaning old commands that is not documented in this manual, you can search for your command in Old_input_calc.html.
Definition of an external acceleration field.
Input data consists of subcommand `a_type`, and a number of input data arguments depending on the chosen subcommand.
The acceleration field is applied to all the bodies in the model. The coordinate directions are set according to every body's individual lsys.
accel local_all ax ay az
Three values are read (ax,ay,az), one value for each direction of the coordinate axes. Default values are ax=0., ay=0. and az=9.81.
Definition of the physical size and shape of a mass.
Data describing the physical size and shape of a mass can be given in the input data file,
but it's contents will not be read by program CALC.
The size and shape of the mass is intended for the graphic postprocessor GPLOT.
For the description of available bodycommands please look in the users manual of
program GPLOT.
Always check the test in if_thenstatements, even at time= tstart.
If not check_if_then_at_0 is set, all statements in all if_thenendifblocks will
be executed when program CALC reads the input data file at time= tstart.
If check_if_then_at_0 is set, program CALC will always check if the test is
true or false before executing the commands inside if_thenstatements.
The reason for introducing this command is to keep backward compatibility for old input data files.
Setting constraints to integrated variables.
When a constraint is set to the system,
the number of freedoms in the system will be reduced.
Command `constr` has the following subcommands:
conn_body_fm  Transfers forces and moments acting on a constraint body to a free body. 
conn_free_1  Eliminates an equation of motion, the value of the constraint equation is controlled by a linear combination of free equations. 
fix_free_1  Eliminates an equation of motion. 
fix_rigid_1  Eliminates a degree of motion in a body. 
Transfers forces and moments acting on a constraint body to a free body.
The body `m_constr' is not allowed to have any degrees of freedom,
in the directions listed under `directions` below.
I.e. before command conn_body_fm can be used the user must set a
constraint constr fix_rigid_1,
constr fix_free_1 or the constraint
body may have been generated by the command
mass fixpoint_6.
The procedure for the transfer of forces between the bodies,
is that the forces acting on the constraint body is simply
added to the forces acting on the free body.
The procedure for the transfer of moments between the bodies,
is that the moments acting on the constraint body is
added to the moments acting on the free body,
but considerations will also be taken if the two bodies
have their center of gravity located at different places.
The free body and the constraint body must belong to the same lsys,
otherwise program CALC will stop and an error message will be written.
constr conn_body_fm `m_constr' `m_conn' `directions`
m_constr  =  Name of the constraint body. 
m_conn  =  Name of the free body. 
directions  =  Specification of the directions of motion which will be eliminated from m_constr. The valid code words for the directions are `x`,`y`,`z`,`f`,`k` and `p`. When a valid main command according to Input data commands has been read, further input reading will stop. 
Eliminates an equation of motion.
Eliminates a defined degree of freedom in the equation system.
The equation of motion is expressed as a linear combination of
other unconstraint equation of motion in the system.
constr conn_free_1 `f_name' +`fact1 `y_name1' +`fact2 `y_name2' +`fact3,,,
f_name  =  Name of the equation of motion which will be eliminated. 
fact1  =  Factor with which y_name1 will be multiplied. 
y_name1  =  Unconstraint equation of motion in the system. 
fact2  =  Factor with which y_name12 will be multiplied. 
. . . .  =  . . . . . . . . . . . . . . . . . . . 
. . . .  =  . . . . . . . . . . . . . . . . . etc. 
f_name = fact1*y_name1 + fact2*y_name2 + ... etc.
Input data reading of factors and variables will take place until a new valid main command according to Input data commands has been read.
Reference Manuals Calc menu Input Data Menu
Eliminates an equation of motion in the equation system.
This command just simply removes the equation of motion for the degree of
freedom given in `freedom_name' below.
The integrated variable `freedom_name' will now be transformed into an
ordinary variable in the main memory of program CALC.
After removing the equation of motion for variable `freedom_name',
its value will be set to the constant value "cvalue".
If the user wants to change or regulate the variable `freedom_name' it is now OK
to overwrite its value with funccommands.
constr fix_free_1 `freedom_name' cvalue
freedom_name  =  Name of the equation of motion which shall be eliminated. 
value  =  Constant value which variable `freedom_name' will be set to. 
In time domain simulation and quasistatical analysis, the variable `freedom_name' will be set to a constant value "cvalue". In frequencyresponse and modal analysis, the real part will be set to "cvalue", and the imaginary part is set to 0(zero).
Reference Manuals Calc menu Input Data Menu
Eliminates a degree of motion in a body.
Sets the positional degree of freedom to a constant value,
and the velocity degree of freedom to 0 (zero).
constr fix_rigid_1 `m_name' `dire` value
m_name  =  Name of the body. 
dire  =  Coordinate direction where the constraint will act. 
value  =  Value which the degree of freedom will be set to. 
In time simulation and quasistatical analysis, the data position m_name.dire will be set to a constant value, the body's velocity will be set to 0 (zero) in direction `dire`. In frequencyresponse and modal analysis, the real part will be set to value, and the imaginary part will be set to 0 (zero).
Reference Manuals Calc menu Input Data Menu Marks the end of the input data file.
Because the expansion of substructures is made in smaller programs outside
the main program, it is necessary to have a final flag on the input data
file which verifies that the expansion of the substructures has been
successful.
Evaluate the computation time in every time step.
Eval_type can be set to all or ttout.
Eval_type= all generates the following variables:
tlsys  =  Time spent on positioning the local coordinate systems 
tcoupl  =  Time spent on calculating the forces in all couplings 
tfunc  =  Time spent on evaluating all funccommands 
tmass  =  Time spent on calculating the acceleration of all masses 
tcnstr  =  Time spent on evaluating all constraints 
tinteg  =  Time spent by the integrator 
ttout  =  Total time spend between two tout 
Eval_type= ttout only generates variable ttout.
N.B. Command eval_compute_time only creates the variables. Command eval_compute_time do not automatically stores the variables for further postprocessing to a *.idfile.
Definition of excitation points for frequencyresponse spectra analysis.
Input data consists of subcommand `fex_type`,
and a number of input data arguments depending on the chosen subcommand.
Command `force` has the following valid subcommands:
displ_fr  Real valued frequency spectra. 
displ_o  Complex angular frequency spectra. 
This type of excitation refers to a displacement of a body's center of gravity in any of the coordinate directions x,y,z,f,k or p. In the direction the body is excited, the body's degrees of freedom must have constraints, alternatively the body can be defined with the command `mass fixpoint_6`. The spectra which is used in the excitation must be real. The spectra can, for example, be given via the command "func intpl_r". Despite the fact that the spectra is real in command "func intpl_r", it is in command "fexcit displ_fr" stored in a complex form, due to the time delay t_delay given in input(*) below.
fexcit displ_fr `body' `dire` `spectra' +`t_delay
body  =  Body which will be excited according to spectra. The body is defined through the command `mass`.  
dire  =  The direction of the body to be excited. The body may not have an individual degree of freedom in the direction where the excitation will take place. If, for example, the body is created via `mass m_rigid_6`, the degree of freedom must be constricted with `constr`.  
spectra  =  Real spectra stored as a data field, previously defined in the input data file.  
t_delay  = 
The time delay of the spectra.
Delaying the frequency spectra will make the spectra complex,
according to the formula below.
If t_delay is given as a positive value,
the spectra is delayed in time, i.e. the spectra is phase shifted
in a negative direction which causes the real part to decrease somewhat,
and the imaginary part to take a negative value. If the t_delay
is given as a negative value, the spectra will come earlier in time,
and will thereby cause a positive phase turning.
The spectra, which excites the body, is therefore rendered by
the following function:
Fex(f)= F(f)*e(2*π*i*f*t_delay)
Where:

In contrast to displ_fr, displ_o reads a complex spectra with angular frequency scale. The command displ_o also has an input data parameter t_fact which makes it possible to change the scale of the frequency of the input spectra. If the value of t_fact is set to the speed of the vehicle, the input spectra `spectra_r' and `spectra_i' will be read as spatial frequency. This type of excitation refers to a displacement of a body's center of gravity in any of the coordinate directions x,y,z,f,k or p. In the direction the body is excited, the body's degrees of freedom must have constraints, alternatively the body can be defined in the command `mass fixpoint_6`. The frequency spectra is defined by two data fields `spectra_r' and `spectra_i', defining the real and imaginary part respectively. The data fields `spectra_r' and `spectra_i', can for example, be given in the command "func intpl_r".
fexcit displ_o `body' `dire` `spectra_r' `spectra_i' +`t_delay +`t_fact
body  =  Body which will be excited according to spectra_r and spectra_i. The body is defined through the command `mass`.  
dire  =  The direction of the body to be excited. The body may not have an individual degree of freedom in the direction where the excitation will take place. If, for example, the body is created via `mass m_rigid_6`, the degree of freedom must be constricted with `constr`.  
spectra_r  =  Real spectra stored as a data field, previously defined in the input data file.  
spectra_i  =  Imaginary spectra stored as a data field, previously defined in the input data file.  
t_delay  = 
The time delay of the spectra.
If t_delay is given as a positive value, the spectra will
be delayed in time, i.e. the spectra is phase shifted in a
negative direction which causes the real part to decrease somewhat,
and the imaginary part to take a negative value.
If the t_delay is given as a negative value, the spectra will
come earlier in time, and will thereby cause a positive phase shifting.
The spectra which excites the body is therefore rendered by
the following function:
Fex(omega)= F(omega)*e(i*omega*t_delay)
Where:


t_fact  = 
Scaling of the frequency axle.
If t_fact is given the value 1,
the spectra is interpreted precisely as it is defined.
Spectra_r and spectra_1 are then presumed to be expressed
in angular frequency scale [rad/s]. If t_fact is given the value 2*pi, spectra_r and spectra_1 are presumed to be expressed in frequency scale [1/s]. If t_fact is set to the speed of the vehicle, spectra_r and spectra_1 are presumed to be expressed in spatial angular frequency scale [rad/m]. Conversion of frequency takes place in the following manner: fext = omega/t_factWhere:

Definition of external forces.
Input data consists of subcommand `force_type`,
and a number of input data arguments depending on the chosen subcommand.
Command `force` has the following valid subcommands:
External force applied to a mass in its local coordinate system lsys. Input data is given as follows:
force rel_lsys1 `fo_name' `m_name' +`a +`b +`h +`Fx +`Fy +`Fz +`Mf +`Mk +`Mp
fo_name  =  Name of the force. 
m_name  =  Name of the body to which the force will be applied. 
a  =  The longitudinal distance from the body's lsys to the point where the force shall act on the body. 
b  =  The lateral distance from the body's lsys to the point where the force shall act on the body. 
h  =  The vertical distance from the body's lsys to the point where the force shall act on the body. 
Fx  =  Longitudinal force acting on the body. 
Fy  =  Lateral force acting in the body. 
Fz  =  Vertical force acting in the body. 
Mf  =  Roll moment acting on the body. 
Mk  =  Pitch moment acting on the body. 
Mp  =  Yaw moment acting on the body. 
fo_name.a  =  Longitudinal distance as stated above 
fo_name.b  =  Lateral distance as stated above 
fo_name.h  =  Vertical distance as stated above 
fo_name.Fx  =  Longitudinal force as stated above 
fo_name.Fy  =  Lateral force as stated above 
fo_name.Fz  =  Vertical force as stated above 
fo_name.Mf  =  Roll moment as stated above 
fo_name.Mk  =  Pitch moment as stated above 
fo_name.Mp  =  Yaw moment as stated above 
External force applied to a mass. The force is attached to the mass. If the mass moves the force will follow with the mass. Input data is given as follows:
force rel_mass1 `fo_name' `m_name' +`a +`b +`h +`Fx +`Fy +`Fz +`Mf +`Mk +`Mp
fo_name  =  Name of the force. 
m_name  =  Name of the body to which the force will be applied. 
a  =  The longitudinal distance from the body's lsys to the point where the force shall act on the body. 
b  =  The lateral distance from the body's lsys to the point where the force shall act on the body. 
h  =  The vertical distance from the body's lsys to the point where the force shall act on the body. 
Fx  =  Longitudinal force acting on the body. 
Fy  =  Lateral force acting in the body. 
Fz  =  Vertical force acting in the body. 
Mf  =  Roll moment acting on the body. 
Mk  =  Pitch moment acting on the body. 
Mp  =  Yaw moment acting on the body. 
fo_name.a  =  Longitudinal distance as stated above 
fo_name.b  =  Lateral distance as stated above 
fo_name.h  =  Vertical distance as stated above 
fo_name.Fx  =  Longitudinal force as stated above 
fo_name.Fy  =  Lateral force as stated above 
fo_name.Fz  =  Vertical force as stated above 
fo_name.Mf  =  Roll moment as stated above 
fo_name.Mk  =  Pitch moment as stated above 
fo_name.Mp  =  Yaw moment as stated above 
Order the CALCprogram to perform a frequencyresponse analysis.
Normally this command is given via the script fresp when the frequencyresponse
analysis is initiated, but it can also be given manually if so desired.
Defines different parameters for the frequencyresponse analysis.
If command fresp_param not is given in the input data file,
m_method='Fourier_CG1' with its default values will apply.
Command `fresp_param` has the following valid subcommands:
Fourier_CG1  Frequencyresponses of Fourier spectra. 
PSD_LU1  Frequencyresponses of PSDspectra. 
Method Fourier_CGI calculates frequencyresponses of Fourier spectra.
The spectra are calculated using Gauss elimination.
In order to obtain a result not equal zero,
the model must be excited in one or more points,
this can be done with command `fexcit`.
Input data to `fresp_param Fourier_CG1` are:
fresp_param Fourier_CG1 linj_eps idof_1 leps_1 idof_2 leps_2 idof_3 etc.
linj_eps  = 
Amplitude which is used in the linearization process. This value is the general default amplitude if not redefined in leps_?. Declared Real*4 Default= 1.e4 
idof_1  = 
Equation number which shall be subjected to the linearization amplitude leps_1 In order to get the number of the equation it can be necessary to make a preliminary calculation with idebug=1. Input data parameter idebug=1 forces program CALC to write the calc.outfile. The second table "Output of equations" in the calc.outfile contains the equation numbers, in the first leftmost column. Declared Integer*4 Default= n.a. 
leps_1  = 
Amplitude which is used in the linearization process for equation number idof_1. This value will override the general amplitude given in linj_eps. Declared Real*4 Default= n.a. 
idof_2  = 
Equation number which shall be subjected to the linearization amplitude leps_2 Declared Integer*4 Default= n.a. 
leps_2  = 
Amplitude which is used in the linearization process for equation number idof_2. This value will override the general amplitude given in linj_eps. Declared Real*4 Default= n.a. 
Method PSD_LU1 calculates frequencyresponses of PSDspectra.
The spectra are calculated using LU factorization.
In order to obtain a result not equal zero,
the model must be excited in one or more points,
this can be done with command `fexcit`.
Input data to `fresp_param PSD_LU1` are:
fresp_param PSD_LU1 linj_eps idof_1 leps_1 idof_2 leps_2 idof_3 etc.
linj_eps  = 
Amplitude which is used in the linearization process. Default value of linj_eps is 1.e4. 
idof_1  = 
Equation number which shall be subjected to the linearization amplitude leps_1 In order to get the number of the equation it can be necessary to make a preliminary calculation with idebug= 1. Input data parameter idebug=1 forces program CALC to write the calc.outfile. The second table "Output of equations" in the calc.outfile contains the equation numbers, in the first leftmost column. Declared Integer*4 Default= n.a. 
leps_1  = 
Amplitude which is used in the linearization process for equation number idof_1. This value will override the general amplitude given in linj_eps. Declared Real*4 Default= n.a. 
idof_2  = 
Equation number which shall be subjected to the linearization amplitude leps_2 Declared Integer*4 Default= n.a. 
leps_2  = 
Amplitude which is used in the linearization process for equation number idof_2. This value will override the general amplitude given in linj_eps. Declared Real*4 Default= n.a. 
Specifies the start frequency in frequencyresponse analysis.
Specifies the frequency steps in frequencyresponse analysis.
A positive number for fstep, gives the frequency step directly in (Hz).
A negative number for fstep, gives the multiplication factor between two
consecutive frequency steps.
E.g. fstep = 1.10 means that every frequency step shall be separated by 10%.
Declared Real*4 Default= 1.06
Specifies the stop frequency in frequencyresponse analysis.
Definition of head lines.
head#  =  Number of header lines, max. 10. 
text  =  Head text, max. 80 characters per line. 
The text is read from the lines first nonblank character until the end of the line. If the user wishes to begin the header line with a blank, this must be marked by the header being inserted within acute accents 'Headtext'. If a word in the head line is preceded by the $sign, the CALC program will try to find a variable with the same name and replace the variable name including the $sign with the variables value at time=0. If there is no variable name in the program's memory, this will not affect the content of the head text.
Definition of different types of debug printing.
Set the name of the file to where the idebug information will be written. Amount of debug information to be written is controlled in the idebugcommand. The default value for idebug_file is 'calc.out'.
Read input data model from idebug_file.
If the input data file is very big, this command will considerable speedup the input data reading of the model.
If no changes has been made to the masses in the model,
command invert_massmatrix can be set equal to "no", to further reduce Initial time.
How to use command idebug_file_read:
Example of an input data file:
idebug_file_read= "out/tang_ideal.out" invert_massmatrix= no func const mu_ = 0.25 func const vkmh= 65 eof
Starts the definition of an if_thenblock.
By using the if_thencommand, the user has the possibility to control
which statements in the input data file that shall be executed,
depending on how variable_1 stands in relation to variable_2.
The if_thenblock must be concluded with an endifstatement,
and it may contain an optional elsestatement.
If the test is true, the statements in the block will be executed, otherwise not.
Only coupl and func commands may appear in the block.
The arguments to the if_thencommand are:
variable_1  First test variable. Variable or a constant.  
test  Test condition. The following conditions are valid:


variable_2  Second test variable. Variable or a constant. 
N.B. For the test conditions .eq. and .ne., variable_1 and variable_2 will be converted to integers before the test is undertaken.
All input data is, however, read into the memory during the program's
input phase regardless of whether the test condition is true or false.
The testing of whether the statement is true or false takes place during the calculation,
which is why the user can receive a warning during the input data reading if the same
variable are defined both after if_then and else.
The if_thenelseendif block can be written at several levels.
This will allow tests to be carried out which are based on several test conditions.
If it is enough to check the test condition during the input data phase of the program,
it is preferred that command if_then_init is used instead.
Definition of an if_then_char_initblock.
The if_then_char_initblock works in a similar way as the
if_then_initcommand,
with the exception that in if_then_char_init
character variables are tested.
If the test condition is true, the input data lines after the statement will be read until
the next elseif_then_char_init,
else or
endif statement.
var#  Test variable number # containing a character variable or a character constant  
test#  Test condition. The following conditions are valid:

The test condition is only checked during input data reading, and its state cannot be changed during the calculation.
A if_then_char_initendif block can be written inside another if_then_char_initendif block. Max number of if_then_char_initendif levels are 50.
Character variables can be defined with command func char.
Definition of an if_then_initblock.
The if_then_initblock works in a similar way as the if_thencommand above,
with the exception that the test condition is checked only once.
The checking of the test condition takes only place in the input data reading phase,
and nothing will happen if the test condition changes state during the calculation phase.
If the test condition is true, the input data lines after the statement will be read until
the next elseif_then_init,
else or
endif statement.
var#  Test variable number # containing a variable or constant.  
test#  Test condition. The following conditions are valid:

N.B. For the test conditions .eq. and .ne., var1 and var2 will be converted to integers before the test is undertaken.
The test condition is only checked during input data reading, and its state cannot be changed during the calculation. If the user wishes to be able to control the execution of different statements during the course of the calculation, please use the command if_then instead.
A if_then_initendif block can be written inside another if_then_initendif block. Max number of if_then_initendif levels are 50.
Command if_then_init can also be used for checking if a variable exists or not, see the alternative usage of command if_then_init below.
Definition of an if_then_initblock.
This alternative usage of command if_then_init make tests on one variable only.
test  Test condition. The following conditions are valid:


var1  Test variable 
The else statement is used when coding an if_thenelse decision statement. The keyword precedes an elseblock, defined to be all the statements after the elsestatement up to, but not including the corresponding endifstatement. An if_thenelse decision statement begins with one of the commands: if_then, if_then_char_init or if_then_init
Continuation of an if_then_initblock.
If the previous if_then_initstatement was false the program
will continue and evaluate the elseif_then_init statement.
If the test condition in the elseif_then_initstatement is true,
the input data lines after the statement will be read until
the next elseif_then_init,
else or
endif statement.
How to formulate a test contition can be found under the
if_then_initcommand.
Continuation of an if_then_char_initblock.
If the previous if_then_char_initstatement was false the program
will continue and evaluate the elseif_then_char_init statement.
If the test condition in the elseif_then_char_initstatement is true,
the input data lines after the statement will be read until
the next elseif_then_char_init,
else or
endif statement.
How to formulate a test contition can be found under the
if_then_char_initcommand.
End of an if_then, if_then_char_init or if_then_initblock
Input reading of initial values.
In the initvalcommand, initial values can be given to all variables in the main memory.
If several initvalcommands are given to the same variable,
the last initvalcommand will apply.
Command `initval` has the following subcommands:
read_gpdat  Reads the initial values from GPdatfile 
set_mass  Sets initial values to masses 
set_var  Sets the initial value to an arbitrary variable 
Reads the initial values from GPdatfile. If there are more degrees of freedom in the model than there are files, no value will be set on these degrees of freedom. If there are degrees of freedom on the file which are not available in the model, a warning text will appear but the program will continue execution without reading the initial value for unknown degree of freedom.
initval read_gpdat 'filegp' def_no
filegp  =  Name of the GPdatfile from which the input data is read. Maximum number of characters read to filegp are 132. 
def_no  =  Number of the deformation shape which is to be read. 
Sets initial values to masses.
initval set_mass `m_name' `dire` (+`)value
m_name  =  Name of the mass which will be given an initial value. 
dire  =  `x`,`y`,`z`,`f`,`k`,`p`. Possible directions which can be given initial values. 
value  =  The initial value which is given to the mass m_name, in the direction dire. 
Sets the initial value to an arbitrary variable.
initval set_var `var' (+`)value
var  =  Name of the variable. 
value  =  The initial value. 
Definition of includefiles.
This directive makes it possible for the user to redirect the input reading to another file.
The insertcommand can also be given in the inserted file,
to further redirect the input reading.
Command `insert` has the following subcommands:
file  The inserted file is read just as it is. 
format  The insert file is read in a fixed format. 
free_form  The insert file is read in a free format. 
format_rows  The insert file is read in a fixed format with line selection. 
free_form_rows  The insert file is read in a free format with line selection. 
The inserted file is read just as it is, without any filtering functions.
insert file `insfile'
insfile  =  Name of the data file which will be expanded in the input data file. 
The insert file is read according to the format specification for the input data file. This directive is applicable, when the input data is to read from an extern file, but the user wishes to select a desired number of columns.
insert format `formspec' `insfile'
formspec  =  Format specification which controls the input data reading. Formspec will be used as the second argument in a FORTRAN read statement. However in GENSYS only edit descriptors 'a' and 'x' are allowed, because the insert command reads insfile as ASCIIfiles, so in the input reading phase all data is considered as characterstrings even numerical data. The format specification should be enclosed in parentheses, because the FORTRAN read statement needs them. As almost all format specifications contains comma signs, the format specification must be enclosed in accent signs, otherwise the comma signs will be interpreted as a delimiter between words. 
insfile  =  Name of the data file to which further input data reading now will be redirected. 
insert format '(10x,10a,10x,10a)' testfil
The command above will on each line of testfil read the positions 1120 and 3140, the rest of testfil will be skipped.
Reference Manuals Calc menu Input Data MenuThe insertfile is read in free format, certain columns are selected with the special formatcommand to free_form. This directive is applicable when input data is to be read from an extern file and certain columns are to be selected, but the number of characters in the columns and/or spaces is not known. The following characters can be used as delimiters: space, tabulator, comma, and equal signs.
insert free_form `formspec' `insfile'
formspec  =  Format specification which controls the input data reading. The format specification is given with special commands which determines whether a column should be read or not. The format specification is similar to a FORTRAN's format statement, with the extension that the number of positions in the columns shall not be given. On reading the file, there are two format specifications which are permitted a(character) and x(skip). Formspec must be enclosed in parentheses and acute accents, in the same way as format above. 
insfile  =  Name of the data file to which further input data reading now will be redirected. 
Example:
A file contains 5 columns, columns 1 and 3 shall be read from the file data/testfil.
insert free_form '(a,x,a,x,x)' data/testfil
N.B.! All columns on the file data/testfil must be marked, either with an 'a' if the column is to be read, or with an 'x' if the column is not to be read.
The insert file will be read according to the format specification, but the input rows from the inserted file can also be selected.
insert format_rows `formspec' istart istop `insfile'
formspec  =  Format specification which controls the input data reading. See description under in_type = format. 
istart  =  Line number in file `insfile' from where further input data reading will start. 
istop  =  Program CALC will not read beyond line number istop in file `insfile'. After line istop has been read, program CALC will continue to read current input data file. 
insfile  =  Name of the data file to which further input data reading now will be redirected. 
The insertfile will be read according to the format specification as in_type=free_form, but the input rows from the inserted file can also be selected.
insert free_form_rows `formspec' istart istop `insfile'
formspec  =  Format specification which controls the input data reading. See description under in_type=free_form. 
istart  =  Line number in file `insfile' from where further input data reading will start. 
istop  =  Program CALC will not read beyond line number istop in file `insfile'. After line istop has been read, program CALC will continue to read current input data file. 
insfile  =  Name of the data file to which further input data reading now will be redirected. 
Controls the inversion of the mass matrix.
Following values can be given for invert_type:
no  =  The inverted mass matrix is read from input data file. E.g. via command idebug_file_read 
init  =  The mass matrix is inverted only once. In the beginning of the simulation. 
continuous  =  During a simulation, invert the mass matrix in every time step. With this option it is possible to change the weight of the masses during simulation. 
Default value is init.
Definition of an algebraic loop.
If an algebraic loop has been defined in the input data,
it will be enclosed between the commands loop_beg and loop_end.
The command loop_beg requires the following input data:
var  =  Variable which is calculated by algebraic loop. The variable must be defined previously in the input data.  
tol  =  Permitted error in the solving of the value `var'  
maxloop  =  Max. number of iterations before interruption.  
method  =  Desired method with which the value of var can be solved. There are, at present, the following methods:

End of algebraic loop defined by loop_beg.
Definition of an algebraic loop with two arguments.
Loop_beg2 and loop_end2 work in the same way as loop_beg and loop_end
to solve algebraic loops in the input data model. Unlike loop_beg,
loop_beg2 works with two arguments.Loop_beg2 uses argument two to coordinate
that argument one is fulfilled.
The command loop_beg2 requires the following input data:
borv  =  Variable which must be regulated to the right value. The variable must be previously defined in the input data.  
regv  =  Variable which adjusts the right value. Variables should preferably be defined earlier in the input data, as loop_beg2 will transfer regv.  
tol  =  Permitted errors in the solution of the values `var'.  
maxloop  =  Max. number if iterations before interruption.  
method  =  Desired method with which the value of var can be solved. There are, at present, the following methods:

End of algebraic loop defined by loop_beg2.
Definition of local coordinate system.
There are a total of three different types of coordinate systems in the calculation model.
These are:
Only esys and lsys can be defined in command lsys, as fsys always remains fixed.
It is relatively common that the simulated structure can move a large distance,
but that the relative internal movements in the structure are small,
the program is builtup so that in the modeling of the problem,
first an esys is defined relative to fsys where large displacements and rotations are considered,
then a lsys is defined for every mass in the structure relative to the created
esys system where small rotations are considered.
If large displacements and rotations between different parts in the structure must be considered,
additional esys must be created.
The reason for not creating an esys for each mass in the model is that
the esyssystems are more CPUconsuming in relation to the lsyssystems.
In order to be able to define a body, it is necessary that a lsys is available
for the body to relate to, and to be able to define a lsys, it is necessary that
there is an esys which the lsys can relate to.
Forces and displacements in couplings are normally calculated in an esys.
For further details see how each coupling is defined.
Command `lsys` has the following subcommands:
e_fix  Creates a fixed esys 
e_abs_bend  Creates a moving esys with clothoid type of transition curves 
e_abs_bendr  Creates a moving esys with transition curves proposed by Ruch in 1903. 
e_abs_bendrf  Creates a moving esys with Ruch type of transition curves with fixed lengths 
e_abs_bends  Creates a moving esys guided by memory fields 
e_reg_xpos  Regulate the longitudinal position of a esys, for braking and acceleration. 
l_local  Creates a linear local lsys 
Creates a fixed esys.
The position of the coordinate system is set during the initial phase of the calculation,
and does not move during the calculation.
lsys e_fix `l_name' (+`)xk (+`)yk (+`)zk
l_name  =  Name of the coordinate system to be created. 
xk,yk,zk  =  The coordinate system's location relative to fsys. 
l_name.x  =  l_name's xcoordinate relative to fsys. 
l_name.y  =  l_name's ycoordinate relative to fsys. 
l_name.z  =  l_name's zcoordinate relative to fsys. 
l_name.f  =  l_name's fcoordinate relative to fsys. 
l_name.k  =  l_name's kcoordinate relative to fsys. 
l_name.p  =  l_name's pcoordinate relative to fsys. 
l_name.vx  =  l_name's xvelocity relative to l_name's coordinate axes. 
l_name.vy  =  l_name's yvelocity relative to l_name's coordinate axes. 
l_name.vz  =  l_name's zvelocity relative to l_name's coordinate axes. 
l_name.vf  =  l_name's fvelocity relative to l_name's coordinate axes. 
l_name.vk  =  l_name's kvelocity relative to l_name's coordinate axes. 
l_name.vp  =  l_name's pvelocity relative to l_name's coordinate axes. 
l_name.ax  =  l_name's xacceleration relative to l_name's coordinate axes. 
l_name.ay  =  l_name's yacceleration relative to l_name's coordinate axes. 
l_name.az  =  l_name's zacceleration relative to l_name's coordinate axes. 
l_name.af  =  l_name's facceleration relative to l_name's coordinate axes. 
l_name.ak  =  l_name's kacceleration relative to l_name's coordinate axes. 
l_name.ap  =  l_name's pacceleration relative to l_name's coordinate axes. 
Creates a moving esys, clothoid type of transition curves.
The moving esys is guided by three memory fields ro_field, fi_field and z_field.
The curvature, cant and vertical lift of the coordinate system is created by a linear interpolation in the memory fields.
Input data syntax:
lsys e_abs_bend `l_name' +`vx (+`)x `ro_field' `fi_field' `z_field'
l_name  =  Name of the coordinate system to be created. 
vx  = 
The longitudinal velocity of the coordinate system.
Can be defined with a constant, variable or via a
memory field. If defined via a memory field speed should be given vs. position along the track. 
x  =  The coordinate system's longitudinal start coordinate in relation to the fixed fsys. The argument for x may be a constant or a variable. If a variable is entered, the variable's value will be retrieved and stored as the start value to the variable l_name.pn. If the variable then changes its value, the prerequisites will not be changed during the course of the calculation. 
ro_field  =  Designed track curvature defined in a memory field. The memory field should define curvature vs. position along the track. 
fi_field  =  Designed cant defined in a memory field. The memory field should define cant vs. position along the track. Cant shall be given in [rad]. 
z_field  = 
Designed track vertical level defined in a memory field.
The memory field should define vertical position vs. position along the track.
Positive direction for vertical position is downwards. If cant is created by rotating the track around track center line, the vertical level of the track is not affected by the cant angle. However if cant is created by rotating the track around low ral, the track center line will lift in curves. 
The variables created by lsys e_abs_bend are the same as created by lsys e_fix. Plus the following variables:
l_name.pn  =  Position along the track. 
l_name.b  =  Designed track curvature. [1/m] 
l_name.vb  =  Designed track curvature speed. 
l_name.ab  =  Designed track curvature acceleration. 
l_name.c  =  Designed cant [rad] 
l_name.vc  =  Designed cant velocity 
l_name.ac  =  Designed cant acceleration 
l_name.h  =  Designed level of track center line, positive downwards 
l_name.vh  =  Designed vertical speed of track center line 
l_name.ah  =  Designed vertical acceleration of track center line 
Creates a moving esys with transition curves proposed by Ruch in 1903, see equations below.
The three memory fields ro_field, fi_field and z_field,
defines designed curvature, designed cant and designed vertical lift of track center line.
Input data syntax:
lsys e_abs_bendr `l_name' +`vx (+`)x `ro_field' `fi_field' `z_field' (+`)b1 (+`)b2 (+`)f1 (+`)f2 (+`)z1 (+`)z2
l_name  =  Name of the coordinate system to be created. 
vx  = 
The longitudinal velocity of the coordinate system.
Can be defined with a constant, variable or via a
memory field. If defined via a memory field speed should be given vs. position along the track. 
x  =  The coordinate system's longitudinal start coordinate in relation to the fixed fsys. The argument for x may be a constant or a variable. If a variable is entered, the variable's value will be retrieved and stored as the start value to the variable l_name.pn. If the variable then changes its value, the prerequisites will not be changed during the course of the calculation. 
ro_field  =  Designed track curvature defined in a memory field. The memory field should define curvature vs. position along the track. 
fi_field  =  Designed cant defined in a memory field. The memory field should define cant vs. position along the track. Cant shall be given in [rad]. 
z_field  = 
Designed track vertical level defined in a memory field.
The memory field should define vertical position vs. position along the track.
Positive direction for vertical position is downwards. If cant is created by rotating the track around track center line, the vertical level of the track is not affected by the cant angle. However if cant is created by rotating the track around low ral, the track center line will lift in curves. 
b1  =  Relative length of the transition curve's first part, for the curvature. 
b2  =  Relative length of the transition curve's third part, for the curvature. 
f1  =  Relative length of the transition curve's first part, for the roll rotation. 
f2  =  Relative length of the transition curve's third part, for the roll rotation. 
z1  =  Relative length of the transition curve's first part, for the vertical lift. 
z2  =  Relative length of the transition curve's third part, for the vertical lift. 
The variables created by lsys e_abs_bendr are the same as created by lsys e_abs_bend.
Below is a description of the transition curve's mathematical form for the track's curvature. The same equations also apply to cant and vertical lift of the track center line.
Notations: Lt = Total length of the transition curve, including all three parts. Lt*e1= Length of the first part of the transition curve. Lt*e2= Length of the third part of the transition curve. k0 = Curvature at the beginning of the transition curve. k1 = Curvature at the end of the transition curve. s = Distance along the track. k' = The curvature's derivative in the second part of the transition curve. Conditions: Lt > 0 0 < e1 < 1 0 < e2 < 1 e1+e2 < 1 Equations: k' = (k1k0)/Lt/(1e1/2e2/2) The following applies for the first part: k(s) = k0 + s^2*k'/Lt/e1/2 0 < s < Lt*e1 The following applies for the second part: k(s) = k0 + (sLt*e1/2)*k' Lt*e1 < s < LtLt*e2 The following applies for the third part: k(s) = k1  (Lt  s)^2*k'/Lt/e2/2 LtLt*e2 < s < Lt
The three functions are created in such a way that the function and its first derivative are continuous within the transition curve and to the connecting circular curves.
The special case e1= e2= 0. makes the Ruchcurve equal to a clothoid.
The special case e1= e2= 0.5 makes the Ruchcurve equal to a Helmert or Schramm curve
Reference Manuals Calc menu Input Data Menu Creates a moving esys with Ruch type of transition curves with fixed lengths
This coordinate system is very similar to lsys e_abs_bendr,
but in lsys e_abs_bendrf the first and third part (e1 and e2) of the transition curve have fixed lengths.
If the length of the transition curve is shorter than e1+e2,
then coordinate system e_abs_bendrf will create a transition curve according to Helmert.
Input data syntax:
lsys e_abs_bendrf `l_name' +`vx (+`)x `ro_field' `fi_field' `z_field' (+`)b1 (+`)b2 (+`)f1 (+`)f2 (+`)z1 (+`)z2
l_name  =  Name of the coordinate system to be created. 
vx  =  The longitudinal velocity of the coordinate system.
Can be defined with a constant, variable or via a
memory field. If defined via a memory field speed should be given vs. position along the track. See example in Example of a rail road vehicle input data model 
x  =  The coordinate system's longitudinal start coordinate in relation to the fixed fsys. The argument for x may be a constant or a variable. If a variable is entered, the variable's value will be retrieved and stored as the start value to the variable l_name.pn. If the variable then changes its value, the prerequisites will not be changed during the course of the calculation. 
ro_field  =  Designed track curvature defined in a memory field. The memory field should define curvature vs. position along the track. 
fi_field  =  Designed cant defined in a memory field. The memory field should define cant vs. position along the track. Cant shall be given in [rad]. 
z_field  = 
Designed track vertical level defined in a memory field.
The memory field should define vertical position vs. position along the track.
Positive direction for vertical position is downwards. If cant is created by rotating the track around track center line, the vertical level of the track is not affected by the cant angle. However if cant is created by rotating the track around low ral, the track center line will lift in curves. 
b1  =  Length of the transition curve's first part, for the curvature. 
b2  =  Length of the transition curve's third part, for the curvature. 
f1  =  Length of the transition curve's first part, for the roll rotation. 
f2  =  Length of the transition curve's third part, for the roll rotation. 
z1  =  Length of the transition curve's first part, for the vertical lift. 
z2  =  Length of the transition curve's third part, for the vertical lift. 
The variables created by lsys e_abs_bendrf are the same as created by lsys e_abs_bend.
Below is a description of the transition curve's mathematical form for the track's curvature. The same equations also apply to cant and vertical lift of the track center line.
Notations: Lt = Total length of the transition curve, including all three parts. d1 = Length of the transition curve's first part. d2 = Length of the transition curve's third part. k0 = Curvature at the beginning of the transition curve. k1 = Curvature at the end of the transition curve. s = Distance along the track. k' = The curvature's derivative in the second part of the transition curve. Conditions: Lt > 0 0 < d1 < Lt 0 < d2 < Lt d1+d2 < Lt Equations: k' = (k1k0) / (Ltd1/2d2/2) The following applies for the first part: k(s) = k0 + s^2*k'/(2*d1) 0 < s < d1 The following applies for the second part: k(s) = k0 + (sd1/2)*k' d1 < s < Ltd2 The following applies for the third part: k(s) = k1  (Lt  s)^2*k'/(2*d2) Ltd2 < s < Lt
Creates a moving esys, guided by three memory fields ro_field, fi_field and z_field.
Interpolation in the memory fields are made with cubic splines.
Input data syntax:
lsys e_abs_bends `l_name' +`vx (+`)x `ro_field' `fi_field' `z_field'
l_name  =  Name of the coordinate system to be created. 
vx  = 
The longitudinal velocity of the coordinate system.
Can be defined with a constant, variable or via a
memory field. If defined via a memory field speed should be given vs. position along the track. 
x  =  The coordinate system's longitudinal start coordinate in relation to the fixed fsys. The argument for x may be a constant or a variable. If a variable is entered, the variable's value will be retrieved and stored as the start value to the variable l_name.pn. If the variable then changes its value, the prerequisites will not be changed during the course of the calculation. 
ro_field  =  Designed track curvature defined in a memory field. The memory field should define curvature vs. position along the track. 
fi_field  =  Designed cant defined in a memory field. The memory field should define cant vs. position along the track. Cant shall be given in [rad]. 
z_field  = 
Designed track vertical level defined in a memory field.
The memory field should define vertical position vs. position along the track.
Positive direction for vertical position is downwards. If cant is created by rotating the track around track center line, the vertical level of the track is not affected by the cant angle. However if cant is created by rotating the track around low ral, the track center line will lift in curves. 
The variables created by lsys e_abs_bends are the same as created by lsys e_abs_bend.
Reference Manuals Calc menu Input Data Menu
Controls the longitudinal position of a moving esys.
The position, velocity and acceleration of a Euler coordinate system,
is controlled by connecting the coordinate system to a mass.
Input data syntax:
lsys e_reg_xpos `l_name' `m_name' (+`)efreq (+`)edamp
l_name  =  Name of the coordinate system, the xcoordinate of which shall be regulated. If the coordinate system has not been defined, an error will occur and the program will stop. 
m_name  =  Name of the body which will control the coordinate system l_name's xposition. 
efreq  =  Eigenfrequency which defines how hard the coordinate system l_name will be linked to the body m_name. 
edamp  =  Damping in the regulation of l_name, edamp shall be expressed in fraction of critical damping. 
Creates a linear local coordinate system.
L_local considers only small angles relative to the esys which lsys is related to.
If the given esys system is one of the following types:
e_abs_bend,
e_abs_bendr,
e_abs_bendrf or
e_abs_bends,
the same curvature, cant, and vertical lift will be used
as defined in the definition of esys.
Input data syntax:
lsys l_local `l_name' `esys' (+`)xk (+`)yk (+`)zk
l_name  =  Name of the coordinate system created. 
esys  =  Name of the Euler system, which l_name relates to. If a lsys is given instead of an esys , the program will look up the esys to which the given lsys is related to, and xk,yk,zk will be summed up from both the systems. 
xk,yk,zk  =  The coordinate system's location relative to esys. 
N.B. If the linear local coordinate system is connected to a Euler system of type e_abs_bend, e_abs_bendr, e_abs_bendrf or e_abs_bends, all the coordinate systems shall be defined on top of rail.
l_name.x  =  L_name's xcoordinate relative to esys. 
l_name.y  =  L_name's ycoordinate relative to esys. 
l_name.z  =  L_name's zcoordinate relative to esys. 
l_name.f  =  L_name's fcoordinate relative to esys. 
l_name.k  =  L_name's kcoordinate relative to esys. 
l_name.p  =  L_name's pcoordinate relative to esys. 
l_name.vx  =  L_name's xvelocity relative to esys. 
l_name.vy  =  L_name's yvelocity relative to esys. 
l_name.vz  =  L_name's zvelocity relative to esys. 
l_name.vf  =  L_name's fvelocity relative to esys. 
l_name.vk  =  L_name's kvelocity relative to esys. 
l_name.vp  =  L_name's pvelocity relative to esys. 
l_name.ax  =  L_name's xacceleration relative to esys. 
l_name.ay  =  L_name's yacceleration relative to esys. 
l_name.az  =  L_name's zacceleration relative to esys. 
l_name.af  =  L_name's facceleration relative to esys. 
l_name.ak  =  L_name's kacceleration relative to esys. 
l_name.ap  =  L_name's pacceleration relative to esys. 
If lsys is connected to e_abs_bend, e_abs_bendr or e_abs_bends the following variables will also be generated in main memory:
l_name.pn  =  Position along the track. 
l_name.b  =  Designed track curvature. [1/m] 
l_name.vb  =  Designed track curvature speed. 
l_name.ab  =  Designed track curvature acceleration. 
l_name.c  =  Designed cant [rad] 
l_name.vc  =  Designed cant velocity 
l_name.ac  =  Designed cant acceleration 
l_name.h  =  Designed level of track center line, positive downwards 
l_name.vh  =  Designed vertical speed of track center line 
l_name.ah  =  Designed vertical acceleration of track center line 
Setting max length of execution time.
If the execution time exceeds max_exec_time the calculation will be interrupted.
If max_exec_time is less or equal to 0.(zero), max_exec_time will not be used.
The simulation can manually be stopped prematurely, if a file named "id/$IDENT.stop" is created.
Reference Manuals
Calc menu
Input Data Menu
Order the CALCprogram to perform a modal analysis.
Normally this command is given via the script modal when the modal
analysis is initiated, but can also be given manually if desired.
Defines different parameters for the modal analysis.
If command modal_param not is given in the input data file,
m_method='Schur_fact1' with it's default values will apply.
Command `modal_param` has the following subcommands:
QRfact_1  Solves the eigenvalues by the QR method. 
Schur_fact1  Solves the eigenvalues by Schur factorization. 
Solves all the eigenvalues in complex form by the QR method. The complex eigenvectors are then solved by the inverse shifted power method. The system of equations is linearized and the Jacobian J is calculated before the modal analysis starts.
modal_param QRfact_1 tol_ym tol_jm linj_eps mloopm ntrimm idof_1 leps_1 idof_2 leps_2 idof_3 etc.
tol_ym  =  Tolerance for the eigenvalue, which must be met before the QRiteration ends. 
tol_jm  =  Tolerance for offdiagonal elements in the Jacobian, which must be met before the QR iteration ends. 
linj_eps  =  Amplitude which is used in the linearization process. Default value of linj_eps is 1.e4. 
mloopm  =  The maximum number of loops per eigenvalue, before the solution process is interrupted. 
ntrimm  =  The number of loops in the inverse shifted power method, for the calculation of eigenvectors. 
idof_1  = 
Equation number which shall be subjected to the linearization amplitude leps_1 In order to get the number of the equation it can be necessary to make a preliminary calculation with idebug=1. Input data parameter idebug=1 forces program CALC to write the calc.outfile. The second table "Output of equations" in the calc.outfile contains the equation numbers, in the first leftmost column. Declared Integer*4 Default= n.a. 
leps_1  = 
Amplitude which is used in the linearization process for equation number idof_1. This value will override the general amplitude given in linj_eps. Declared Real*4 Default= n.a. 
idof_2  = 
Equation number which shall be subjected to the linearization amplitude leps_2 Declared Integer*4 Default= n.a. 
leps_2  = 
Amplitude which is used in the linearization process for equation number idof_2. This value will override the general amplitude given in linj_eps. Declared Real*4 Default= n.a. 
The input parameters have the following default values:
tol_ym = 1.e5 tol_jm = 1.e7 linj_eps= 1.e4 mloopm = 50 ntrimm = 3Reference Manuals Calc menu Input Data Menu
Solves all the eigenvalues in complex form with Schur factorization. Subroutines from the LAPACK library have been used, when solving the eigenvalue problem with this method. The system of equations is linearized and the Jacobian J is calculated before the modal analysis starts.
modal_param Schur_fact1 linj_eps idof_1 leps_1 idof_2 leps_2 idof_3 etc.
linj_eps  = 
Amplitude which is used in the linearization process. Default value of linj_eps is 1.e4. 
idof_1  = 
Equation number which shall be subjected to the linearization amplitude leps_1 In order to get the number of the equation it can be necessary to make a preliminary calculation with idebug=1. Input data parameter idebug=1 forces program CALC to write the calc.outfile. The second table "Output of equations" in the calc.outfile contains the equation numbers, in the first leftmost column. Declared Integer*4 Default= n.a. 
leps_1  = 
Amplitude which is used in the linearization process for equation number idof_1. This value will override the general amplitude given in linj_eps. Declared Real*4 Default= n.a. 
idof_2  = 
Equation number which shall be subjected to the linearization amplitude leps_2 Declared Integer*4 Default= n.a. 
leps_2  = 
Amplitude which is used in the linearization process for equation number idof_2. This value will override the general amplitude given in linj_eps. Declared Real*4 Default= n.a. 
The input parameters have the following default values:
linj_eps = 1.e4Reference Manuals Calc menu Input Data Menu
Suppresses warning messages from command func. When the user is acquainted with the warning texts from CALC, she/he can suppress the undesired warnings by using this command. The suppressing of warning messages is only valid for the next funccommand, after the no_warningcommand.
Command overwrite_property makes it possible to overwrite an existent coupling property in the main memory. In the normal case coupling properties cannot be redefined, because different properties need different amount of memory cells. If the command overwrite_property is given in the beginning of the input data file, an existing property in the memory will be overwritten by the new property, if they have the same name. Program CALC will in this case: erase all values for the old existing property in existing memory position, write the new property last in the memory, and move all references to the new location of the property.
The reason for introducing this command is to keep backward compatibility for old input data files.
Execute an UNIXcommand after the calculation.
When the calculation is finished, program CALC will send
the string 'cmd_string' to the UNIXsystem.
Up to ten post_processcommands can be given in the input data file for program CALC.
In the post_processcommand the user has access to the $IDENTvariable.
The $IDENTvariable will in the post_processcommand be expanded to the name
of the current identstring.
Example:
The following example shows how the post_processcommand can be used for post
processing the results in program MPLOT and sending the plots to your printer:
if_then_char_init CalcType .eq. TSIM .or. CalcType .eq. MODAL post_process= 'mplot mplotf/Tsim_Safe_OneIdent.mplotf $IDENT' post_process= 'pri diags/$IDENT.ps' endif
Execute an UNIXcommand before the calculation starts.
The user can here for instance, define a pre processing activity in the KPF, NPICK or
QUASI program.
In string 'cmd_string' two variables are understood:
$IDENT  Will be replaced by the current identstring of the running case 
$CURRENT_FILE  Will be replaced by the current input data file 
An unlimited number of pre_processcommands can be given in the input data file for CALC.
Example:
The following example shows how the pre_processcommand can be used for automatic update of
modal shapes of an elastic body, and also calculates the quasistatical position before
the timedomain or modal analysis begins:
if_then_char_init CalcType .eq. TSIM .or. CalcType .eq. MODAL pre_process= 'sed s!runf/Master.runf!$CURRENT_FILE! npickf/Master.npickf > npickf/$IDENT.npickf' pre_process= 'npick npickf/$IDENT.npickf' pre_process= 'quasi $CURRENT_FILE' endif
Also the following lines must be entered into the input data file in order to read the results from program NPICK and QUASI.
if_then_char_init CalcType .ne. NPICK insert file npickr/$IDENT.npickr endif if_then_char_init CalcType .eq. TSIM .or. CalcType .eq. MODAL initval read_gpdat gp/$IDENT.gp 1 endif
Order the CALCprogram to perform a quasistatical analysis.
Normally this command is given via the script modal when the modal
analysis is initiated, but can also be given manually if desired.
Defines different parameters for the quasistatical analysis.
If command quasi_param not is given in the input data file,
q_method='Damped_Tens' with it's default values will apply.
Command `quasi_param` has the following subcommands:
LineSearch_1  Searches the quasistatical equilibrium according to method LineSearch_1. 
LineSearch_2  Searches the quasistatical equilibrium according to method LineSearch_2. 
LineSearch_3  Searches the quasistatical equilibrium according to method LineSearch_3. 
m_NewRaph_1  Solves the state of equilibrium with a damped NewtonRaphson method. 
m_NewRaph_2  Solves the state of equilibrium with a modified NewtonRaphson method. 
Damped_Tens  Solves the state of equilibrium with a tensor based method. 
The solution of the system's state of equilibrium according to
LineSearch_1 is undertaken in a combination of two methods which
work in series with each other.
Method 1 is a direct method which corresponds to an integration of equations according
to Euler's method. The program integrates a number of step equations in
"mstepk" in the following way: y(1) = y(0) + tstep*dy(0) where both
"mstepk" and "tstep" are input parameters.
Method 2 seeks the state of equilibrium by searching in the gradient's direction.
After method 1 has taken the step "mstepk",
method 2 starts by linearizing the system in order to calculate the direction of the gradient.
During the linearization process,
every degree of freedom is disturbed by an amplitude of "linj_eps".
After the linearization,
the program advances in the direction of the gradient in steps which are proportional to "sfact".
When the minimum point has been passed,
the program makes a bottom search.
If the tolerance not has been met after 5 bottom searches,
the program will return to method 1 again.
quasi_param LineSearch_1 tol linj_eps sfact tstep max_loop mstepk
tol  =  Tolerance in the derivative of the degree of freedoms, which shall be met before the calculation ends. 
linj_eps  =  Amplitude which is used in the linearization process for the calculation of the direction of the gradient direction in method number 2. 
sfact  =  Size of the steps in the line searching part of method number 2. 
tstep  =  Time step which is used in the integration phase in method 1. 
max_loop  =  The maximum number of solution attempts which may be executed jointly by method 1 and method 2 before the calculation is interrupted. 
mstepk  =  Number of steps that integration will undertake before solution method 2 takes over. 
The input parameters have the following default values:
tol = 1.e4 linj_eps= 1.e6 sfact = 0.02 tstep = 0.001 max_loop= 60 mstepk = 40Reference Manuals Calc menu Input Data Menu
The solution of the system's state of equilibrium according to LineSearch_2
is undertaken in a combination of three methods which work in series with each other.
Method 0 is a simple method which only roughly positions all degrees of freedom in the model,
then method LineSearch_1 takes over for making fine adjustments of the positions of the model.
Method 1 is a direct method which corresponds to an integration of equations according
to Euler's method. The program integrates a number of step equations in
"mstepk" in the following way: y(1) = y(0) + tstep*dy(0) where both
"mstepk" and "tstep" are input parameters.
Method 2 seeks the state of equilibrium by searching in the gradient's direction.
After method 1 has taken the step "mstepk",
method 2 starts by linearizing the system in order to calculate the direction of the gradient.
During the linearization process,
every degree of freedom is disturbed by an amplitude of "linj_eps".
After the linearization,
the program advances in the direction of the gradient in steps which are proportional to "sfact".
When the minimum point has been passed,
the program makes a bottom search.
If the tolerance not has been met after 5 bottom searches,
the program will return to method 1 again.
During the solution phase, the program CALC makes a continuous print out of the input
data model's status on standard output, so that the user can follow the solution process.
The print text contains the following information:
Line 1: the first 12 letters of the degree of freedom's name
Line 2: the last 12 letters of the degree of freedom's name
Line 3: position of the degree of freedom
Line 4: velocity of the degree of freedom
Line 5: acceleration of the degree of freedom
quasi_param LineSearch_2 tol linj_eps sfact tstep max_loop mstepk
tol  =  Tolerance in the derivative of the degree of freedoms, which shall be met before the calculation ends. 
linj_eps  =  Amplitude which is used in the linearization process for the calculation of the direction of the gradient direction in method number 2. 
sfact  =  Size of the steps in the line searching part of method number 2. 
tstep  =  Time step which is used in the integration phase in method 1. 
max_loop  =  The maximum number of solution attempts which may be executed jointly by method 1 and method 2 before the calculation is interrupted. 
mstepk  =  Number of steps that integration will undertake before solution method 2 takes over. 
The input parameters have the following default values:
tol = 1.e4 linj_eps= 1.e6 sfact = 0.02 tstep = 0.001 max_loop= 60 mstepk = 40Reference Manuals Calc menu Input Data Menu
The solution of the system's state of equilibrium according to
LineSearch_3 is undertaken in a combination of two methods which
work in series with each other.
Method 1 is a direct method which corresponds to an integration of equations according to implicit
Euler's method.
The program integrates a number of step equations in "mstepk" in the following way:
y(1) = y(0) + tstep*dy(0) where both "mstepk" and "tstep" are input parameters.
Method 2 seeks the state of equilibrium by searching in the gradient's direction.
After method 1 has taken the step "mstepk",
method 2 starts by linearizing the system in order to calculate the direction of the gradient.
During the linearization process,
every degree of freedom is disturbed by an amplitude of "linj_eps".
After the linearization,
the program advances in the direction of the gradient in steps which are proportional to "sfact".
When the minimum point has been passed,
the program makes a bottom search.
If the tolerance not has been met after 5 bottom searches,
the program will return to method 1 again.
quasi_param LineSearch_3 tol linj_eps sfact tstep max_loop mstepk
tol  =  Tolerance in the derivative of the degree of freedoms, which shall be met before the calculation ends. 
linj_eps  =  Amplitude which is used in the linearization process for the calculation of the direction of the gradient direction in method number 2. 
sfact  =  Size of the steps in the line searching part of method number 2. 
tstep  =  Time step which is used in the integration phase in method 1. 
max_loop  =  The maximum number of solution attempts which may be executed jointly by method 1 and method 2 before the calculation is interrupted. 
mstepk  =  Number of steps that integration will undertake before solution method 2 takes over. 
The input parameters have the following default values:
tol = 1.e4 linj_eps= 1.e6 sfact = 0.001 tstep = 0.0001 max_loop= 50 mstepk = 500
Solves the state of equilibrium with a modified NewtonRaphson method. The modified method includes a damping term, in order to increase the stability during the solution process.
The NewtonRaphson method The damping term (afact +sfact) x(n+1) = x(n)  inv(J) * f(x(n)) * min ( ———————————————— , 1.) (error_dy+sfact)
The Jacobian J is calculated by linearizing the system of equations. Afact and sfact are constants which are defined as input parameters to the quasi_paramcommand. Error_dy is the error in the derivative of the system equations in every iteration. The damping term entails that when error_dy is big, the iteration will take small steps towards the expected minimum point. When error_dy is smaller than afact, the iteration is carried out at full amplitude.
quasi_param m_NewRaph_1 tol linj_eps sfact afact max_loop
tol  =  Tolerance in the derivative of the degree of freedoms, which shall be met before the calculation ends. 
linj_eps  =  Amplitude used in the linearization process. 
sfact  =  Factor used in the solution method, see above. 
afact  =  Factor used in the solution method, see above. 
max_loop  =  Maximum number of iterations before the calculation will be interrupted. 
The input parameters have the following default values:
tol = 1.e4 linj_eps= 1.e6 sfact = 0.02 tstep = 0.001 max_loop= 60Reference Manuals Calc menu Input Data Menu
Solves the state of equilibrium with a modified NewtonRaphson method. In this method external loads are applied in several small steps, in order to ensure finding the right solution even to extremely nonlinear problems. Even this method contains a damping term to increase stability during the solution process. The damping term has the same appearance as in the method `m_NewRaph_1`.
The NewtonRaphson method The damping term (afact +sfact) x(n+1) = x(n)  inv(J) * f(x(n)) * min ( ———————————————— , 1.) (error_dy+sfact)
The Jacobian J is calculated by linearizing the system of equations. Afact and sfact are constants which are defined as input parameters to the quasi_paramcommand. Error_dy is the error in the derivative of the system equations in every iteration. The damping term entails that when error_dy is big, the iteration will take small steps towards the expected minimum point. When error_dy is smaller than afact, the iteration is carried out at full amplitude.
quasi_param m_NewRaph_2 nsteg tol linj_eps sfact afact max_loop
nsteg  =  The number of loading steps. 
tol  =  Tolerance in the derivative of the degree of freedoms, which shall be met before the calculation ends. 
linj_eps  =  Amplitude used in the linearization process. 
sfact  =  Factor used in the solution method, see above. 
afact  =  Factor used in the solution method, see above. 
max_loop  =  Maximum number of iterations before the calculation will be interrupted. 
The input parameters have the following default values:
nsteg = 10 tol = 1.e4 linj_eps = 1.e6 sfact = 0.02 tstep = 0.001 max_loop = 60Reference Manuals Calc menu Input Data Menu
Solves the state of equilibrium with a tensor based method in
combination with a time simulation.
In the simulation phase, external damping is added to the system
in order to quickly adopt the quasistatical solution.
Input data:
quasi_param Damped_Tens tol fact max_loop tsim1
tol  =  Tolerance in the derivative of the degree of freedoms, which shall be met before the calculation ends. 
fact  =  Factor which controls the speed of the solution process. In most cases this factor can be set to 1. However in some cases, for example in curves less than 100 [m] radius it can be necessary to reduce this factor to a smaller value. For safety reasons the default value of this parameter has been chosen to 0.1 
max_loop  =  The maximum number of solution attempts which may be executed jointly by method 1 and method 2 before the calculation stop. 
tsim1  =  The length of the timesimulation in the first loop. 
The input parameters have the following default values:
tol = 1.e4 fact = 0.1 max_loop = 20 tsim1 = 2.
Definition of variables to be stored for postprocessing.
Command `s_var` has the following subcommands:
force_on  Store all forces acting on specified mass in specified direction 
gpdat_force1  Write coupling forces to the GPdatfile 
gpdat_r1  Write the motions of all masses to the GPdatfile 
gpdat_wheel_prof  Write wheel data information to the GPdatfile 
gpdat_wheel_info  Same as gpdat_wheel_prof, but the wheel profile is read in millimeters 
gpdat_rail_prof_left  Write rail data information to the GPdatfile, left rail 
gpdat_rail_prof_right  Write rail data information to the GPdatfile, right rail 
gpdat_rail_info_left  Same as gpdat_rail_prof_left, but the rail profile is read in millimeters 
gpdat_rail_info_right  Same as gpdat_rail_prof_right, but the rail profile is read in millimeters 
scalar_0  Store a variable as a scalar on the MPdatfile 
sngl  Store a variable as a vector on the MPdatfile 
sngl_filt  Same as sngl, but the variable is filtered through s_var_filter before storing 
var_0  Store a variable both as a vector and a scalar on the MPdatfile 
var_0_filt  Same as var_0, but the variable is filtered through s_var_filter before storing 
Store all forces acting on specified mass in specified direction.
This command can be used for debugging, if a mass is vibrating or moving in a unexpected way.
By using the force_oncommand it is quick and easy to store all forces connected to the vibrating mass,
for later plotting in MPLOT.
Comparing the frequencies of the forces and the motion of the mass, it is
easy to find the force that is causing the vibration.
The names of the forces stored by this command is written to standard output.
s_var force_on m_name dire
m_name  =  Name of the mass for which the forces shall be stored. 
dire  =  Direction of the mass for which the forces shall be stored. 
Orders program TSIM to write the coupling forces to the
GPdatfile.
In post processor GPLOT the forces will be animated together with the model.
The forces are written every N*tout (where N is an arbitrary integer).
s_var gpdat_force1 var
var  =  Name of the coupling force which shall be stored in the GPdatfile. 
Orders program TSIM and MODAL to write the motions of all masses to the
GPdatfile.
These motions can be read into the post processor GPLOT for animation.
The motions of all masses are written every N*tout (where N is an arbitrary integer).
s_var gpdat_r1Reference Manuals Calc menu Input Data Menu
Orders program TSIM to write the wheel profile to the GPdatfile.
In plotting mode Show 4 diags, in program GPLOT,
the user has the possibility to view:
To make this command work also command gpdat_rail_prof_left and gpdat_rail_prof_right must be given in input data.
s_var gpdat_wheel_prof wheel_name lsys.b w_prof
wheel_name  =  The name or number of wheel to be stored. 
lsys.b  =  The name of the variable which contains the curvature of the track. The variable is used in the animation to show if the vehicle is negotiating a left or right handed curve. 
w_prof  =  The name of the ASCIIfile describing the shape of the wheel profile. 
Same as gpdat_wheel_prof.
The only difference is that the wheel profile w_prof is read in millimeter.
s_var gpdat_wheel_info wheel_name lsys.b w_prof
wheel_name  =  The name or number of wheel to be stored. 
lsys.b  =  The name of the variable which contains the curvature of the track. The variable is used in the animation to show if the vehicle is negotiating a left or right handed curve. 
w_prof  =  Wheel profile in millimeter. 
Orders program TSIM to write the rail profiles to the GPdatfile.
In plotting mode Show 4 diags, in program GPLOT,
the user has the possibility to view:
The wheel/rail geometries, creepages and forces are written to GPdatfile every tout.
To make this command work also command gpdat_wheel_prof must be given in input data.
s_var gpdat_rail_prof_left X_coord_l1 r_prof_l1 X_coord_l2 r_prof_l2 X_coord_l3 r_prof_l3 X_coord_l4 ,,,etc. s_var gpdat_rail_prof_right X_coord_r1 r_prof_r1 X_coord_r2 r_prof_r2 X_coord_r3 r_prof_r3 X_coord_r4 ,,,etc.
X_coord_??  =  The Xcoordinate along the track where this profile is valid. 
r_prof_??  =  The name of the ASCIIfile describing the shape of the rail profile. 
Same as gpdat_rail_prof_left and gpdat_rail_prof_right.
The only difference is that the rail profiles are read in millimeters.
s_var gpdat_rail_info_left X_coord_l1 r_prof_l1 X_coord_l2 r_prof_l2 X_coord_l3 r_prof_l3 X_coord_l4 ,,,etc. s_var gpdat_rail_info_right X_coord_r1 r_prof_r1 X_coord_r2 r_prof_r2 X_coord_r3 r_prof_r3 X_coord_r4 ,,,etc.
X_coord_??  =  The Xcoordinate along the track where this profile is valid. 
r_prof_??  =  The rail profile in millimeter. 
Orders program TSIM and QUASI to write a variable's value at time=0
as a scalar on the MPdatfile.
These scalars can be read into the post processors
MPLOT,
MTABLE,
CATAS or
CATAF
for post processing and plotting.
s_var scalar_0 s_name
s_name  =  Name of the variable to be stored. 
Store a variable as a vector in single precision in the MPdatfile.
The vector can be read into the post processors
MPLOT,
MTABLE,
CATAS or
CATAF
for post processing and plotting.
The variables are written every N*tout
(where N is an arbitrary integer).
s_var sngl s_name
s_name  =  Name of the variable to be stored. 
Same as sngl, but the variable is filtered through s_var_filter before storing.
s_var sngl_filt s_name
s_name  =  Name of the variable to be stored. 
Store a variable both as a vector and a scalar in the MPdatfile.
Its scalar value is taken for time= 0.
These vectors and scalars can be read into the post processors
MPLOT,
MTABLE,
CATAS or
CATAF
for post processing and plotting.
The variables are written every N*tout
(where N is an arbitrary integer).
In apart from the commands s_var sngl and s_var scalar_0 above,
no error message will appear if the variable is missing.
s_var var_0 s_name
s_name  =  Name of the variable to be stored. 
Same as var_0, but the variable is filtered through s_var_filter before storing.
s_var var_0_filt s_name
s_name  =  Name of the variable to be stored. 
Antialiasing filter to be passed before writing variables to MPdatfile. Following filters are available:
none  No filtering. The variables are directly written to the MPdatfile 
lpass2q  Second order lowpass filter. Initial value copied from the unfiltered variables. 
lpass2q_0  Second order lowpass filter. Initial value equal to 0. for all variables. 
lpass4q  Fourth order lowpass filter. Initial value copied from the unfiltered variables. 
lpass4q_0  Fourth order lowpass filter. Initial value equal to 0. for all variables. 
Default value: "s_var_filter= lpass4q 20. 0.9239 20. 0.3827"
No filtering may lead to antialiasing error, if the value of timeout is too large.
s_var_filter= none
Second order lowpass filter.
To avoid antialiasing error the cutoff frequency should not be larger than 1./(2.*timeout).
The initial value of the filtered variable will be set equal to the first value of the unfiltered variable.
s_var_filter= lpass2q f_cutoff set
f_cutoff  =  Cutoff frequency. 
set  =  Relative damping. 
Second order lowpass filter.
To avoid antialiasing error the cutoff frequency should not be larger than 1./(2.*timeout).
The initial value of the filtered variable will be set equal to 0.(zero).
s_var_filter= lpass2q_0 f_cutoff set
f_cutoff  =  Cutoff frequency. 
set  =  Relative damping. 
Fourth order lowpass filter.
To avoid antialiasing error the cutoff frequency should not be larger than 1./(2.*timeout).
The filter is built by two second order filters in serie.
The initial value of the filtered variable will be set equal to the first value of the unfiltered variable.
s_var_filter= lpass4q f_cutoff_1 set_1 f_cutoff_2 set_2
f_cutoff_1  =  Cutoff frequency first filter. 
set_1  =  Relative damping first filter. 
f_cutoff_2  =  Cutoff frequency second filter. 
set_2  =  Relative damping second filter. 
Fourth order lowpass filter.
To avoid antialiasing error the cutoff frequency should not be larger than 1./(2.*timeout).
The filter is built by two second order filters in serie.
The initial value of the filtered variable will be set equal to 0.(zero).
s_var_filter= lpass4q_0 f_cutoff_1 set_1 f_cutoff_2 set_2
f_cutoff_1  =  Cutoff frequency first filter. 
set_1  =  Relative damping first filter. 
f_cutoff_2  =  Cutoff frequency second filter. 
set_2  =  Relative damping second filter. 
Make a cosimulation with another program using the TCPprotocol.
After program CALC have read all input data,
program CALC stops and waits for another program to connect.
The other program must connect to the same port
as given in port_number above.
When a client is connected program CALC continues its execution,
but makes a halt every tout and waits for further
instructions from the client.
The port number is stored as a 16 bit unsigned integer, therefore the port number must be less than 65535. The lower numbers are reserved in Unix for standard services, therefore the port number must be greater than 2000.
Example of a client program written in C which can be used for controlling program calc in server mode.
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <strings.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> void error(char *msg) { perror(msg); exit(1); } int main(int argc, char *argv[]) { int sockfd, portno, n; struct sockaddr_in serv_addr; struct hostent *server; char buffer[256]; if (argc < 3) { fprintf(stderr,"usage %s hostname port\n", argv[0]); exit(1); } portno = atoi(argv[2]); sockfd = socket(AF_INET, SOCK_STREAM, 0); if (sockfd < 0) error("ERROR opening socket"); server = gethostbyname(argv[1]); if (server == NULL) { fprintf(stderr,"ERROR, no such host\n"); exit(1); } bzero((char *) &serv_addr, sizeof(serv_addr)); serv_addr.sin_family = AF_INET; bcopy((char *)server>h_addr, (char *)&serv_addr.sin_addr.s_addr, server>h_length); serv_addr.sin_port = htons(portno); n= connect(sockfd, (struct sockaddr*)&serv_addr, sizeof(serv_addr)); if (n < 0) error("ERROR connecting"); while (1) { printf("Enter message: "); bzero(buffer,256); fgets(buffer,255,stdin); n = write(sockfd, buffer, strlen(buffer)); if (n < 0) error("ERROR writing to socket"); if (strncmp(buffer,"run_stop",8)==0) break; bzero(buffer,256); n = read(sockfd,buffer,255); if (n < 0) error("ERROR reading from socket"); printf("Server Return Value= %s\n",buffer); if (strncmp(buffer,"7FFFFFFFFFFFFFFD",16)==0  strncmp(buffer,"7FFFFFFFFFFFFFFE",16)==0) { fprintf(stderr,"Severe error code received from server_tsim\n"); exit(1); } } bzero(buffer,256); n = read(sockfd,buffer,255); if (n < 0) error("ERROR reading from socket"); printf("Server Return Value= %s\n",buffer); return 0; }
Compile the source code above by writing "gcc o client client.c"
With the program above you can manually send commands to program calc (the server).
Following commands are valid:
ask_iadr <var_name>
Send this command in the beginning of the simulation in order to find the
addresses of the variables you are interested in to read or overwrite.
Store the addresses in an array for later use during the simulation.
If the transmission was successful program calc will answer with 7FF0000000000001,
which means that the command requires one argument.
After sending the argument (the name of the variable),
program calc replies with the address of the variable.
get_iadr <var_address>
Send this command to retrieve a value from tsim.
On a successful transmission program calc sends 7FF0000000000001,
which means that the command requires one argument.
After sending the argument (the address of the variable),
program calc replies with the value of the variable.
put_iadr <var_address> <value>
Send this command to change/overwrite a variable.
On a successful transmission program calc sends 7FF0000000000002,
which means that the command requires two argument.
After sending the first argument (the address of the variable),
program calc replies with 7FF0000000000001,
which means that the command requires one additional argument.
After sending the second argument (the new value of the variable),
program calc replies with 0, indicating that the new value was successfully
inserted in the main memory.
defgroup <group_name> <no of addresses> <var_addresses>
Send this command to create a group of variables.
To speed up the communication in the cosimulation it is possible to create groups of variables.
First argument is the name of the group.
Second argument are number of variables in the group.
After that a list of addresses for all variables in the group.
getgroup <group_name>
Send this command to obtain the values to all variables in a group.
First argument is the name of the group.
Gensys replies with a 290 long character string containing all values in the group
putgroup <group_name> <values>
Send this command to set the values of all variables in a group.
First argument is the name of the group.
The other arguments shall contain all values for all variables.
The string is read in free format.
run_tout
Start the calculation.
Stop and wait for more instruction after tout seconds.
Program calc replies with the value of variable "time".
run_stop
Stop the simulation.
Program calc replies with 0(zero).
Both server and client terminates.
Return codes greater than 7FFFFFFFFFFFFFF6 indicates an error.
Severe error codes are 7FFFFFFFFFFFFFFD and 7FFFFFFFFFFFFFFE. If program CALC replies with one of these return codes no further processing is possible.
For more information please read "Cosimulation of a mechatronic system using Gensys and Simulink", (Spiryagin M., Simson S., Cole C., Persson I., Vehicle System Dynamics, Vol. 50(3), 2012, pp. 495507 )
Make a cosimulation with another program using the UDPprotocol.
After program CALC have read all input data,
program CALC stops and waits for another program to connect.
The other program must connect to the same port
as given in the port numbers above.
When a client is connected program CALC continues its execution,
but makes a halt every tout and waits for further
instructions from the client.
The port number is stored as a 16 bit unsigned integer, therefore the port number must be less than 65535. The lower numbers are reserved in Unix for standard services, therefore the port number must be greater than 2000.
Example of a client program written for octave, which can be used for controlling program calc in server mode:
% % Load the sockets package %  pkg load sockets % % Socket for sending data %  send_sck = socket(AF_INET, SOCK_DGRAM, 0); SEND_PORT= 3200; send_info= struct("addr", "127.0.0.1", "port", SEND_PORT); connect(send_sck, send_info); % % Socket for reception %  rcv_sck = socket(AF_INET, SOCK_DGRAM, 0); RCV_PORT= 3201; bind(rcv_sck,RCV_PORT); % % Ask for the position in storage of variable "sin2" %  send(send_sck,"ask_iadr"); [mesg_s, len_s]= recv(rcv_sck, 100); printf(" From server= %s\n", strvcat(mesg_s)); fflush(stdout); send(send_sck,"sin2"); [mesg_s, len_s]= recv(rcv_sck, 100); printf(" From server= %s\n", strvcat(mesg_s)); fflush(stdout); % % Ask for the value of variable stored in position "52" %  send(send_sck,"get_iadr"); [mesg_s, len_s]= recv(rcv_sck, 100); printf(" From server= %s\n", strvcat(mesg_s)); fflush(stdout); send(send_sck,"52"); [mesg_s, len_s]= recv(rcv_sck, 100); printf(" From server= %s\n", strvcat(mesg_s)); fflush(stdout); % % Change the value of the variable stored in position "52" %  send(send_sck,"put_iadr"); [mesg_s, len_s]= recv(rcv_sck, 100); printf(" From server= %s\n", strvcat(mesg_s)); fflush(stdout); send(send_sck,"52"); [mesg_s, len_s]= recv(rcv_sck, 100); printf(" From server= %s\n", strvcat(mesg_s)); fflush(stdout); send(send_sck,"1."); [mesg_s, len_s]= recv(rcv_sck, 100); printf(" From server= %s\n", strvcat(mesg_s)); fflush(stdout); % % Run until next tout %  send(send_sck,"run_tout"); [mesg_s, len_s]= recv(rcv_sck, 100); printf(" From server= %s\n", strvcat(mesg_s)); fflush(stdout); % % Finish simulation %  send(send_sck,"run_stop"); [mesg_s, len_s]= recv(rcv_sck, 100); printf(" From server= %s\n", strvcat(mesg_s)); fflush(stdout);
Above example is very simple and not so useful. The code only sets the value of the variable located in position number 52. Then run "tout" seconds and stops simulation. To see a more useful and practical example. please look at ../tutorial/intro_tutor_1_sine
Specifies the output step size when writing to MPdatfile after time simulation analysis.
Command tout sets the value of variable timeout.
In main memory, timeout is stored as an ordinary variable,
which means that its value can be changed/overwritten by ordinary funccommands.
Default value for variable timeout is 0.010 [s].
Order the CALCprogram to perform a time integration analysis.
Normally this command is given via the script modal when the modal
analysis is initiated, but can also be given manually if desired.
Defines the integrator to be used in time integration analysis.
Command `tsim_param` has the following subcommands:
e1  Euler forward. 
mp2  The midpoint method. 
runge_kutta  The four step RungeKutta method. 
heun  The two step RungeKutta method. 
heun_u  The two step RungeKutta method, with step size control. 
heun_c  Similar to heun_u but makes backsteps if the tolerance not is meet. 
heun_d  Similar to heun_c but executes faster. 
heun2impl  Implicit Heun's method. 
dopri5  Explicit RungeKutta according to DORMAND & PRINCE a multistep method. 
radau5  Implicit RungeKutta method of order 5. Authors: E. Hairer and G. Wanner 
odassl  Implicit DAEsolver by Claus Fuhrer, based on DASSL written by Linda Petzold. 
tsim_param= e1
Selects an integrator which works according to Euler's explicit method. Euler's method is a onestep method with fixed step, giving an integration error of O(h). Additional input data is not available, as the time step is taken from the tstepcommand.
Method Euler:y_{n+1}= y_{n} + tstep*f(t_{n},y_{n})
Where:
y_{n+1}  =  The value of the integrated variable at time t_{n+1} 
y_{n}  =  The value of the integrated variable at time t_{n} 
tstep  =  The timestep 
f(t_{n},y_{n})  =  The value of the integrand at t_{n} and y_{n} 
As can be seen above, only one calculation of the integrand is needed for each timestep.
The values of the integrands is defined by the user in different input data commands, for example:
mass m_rigid_1 ,
mass m_rigid_6 ,
mass m_rigid_36b,
mass m_flex_1 ,
mass massless2 ,
func integ ,
func hpass* ,
func lpass* ,
coupl kc ,
coupl kckc ,
coupl kfrkc and
coupl k_air3 .
tsim_param= mp2
Selects an integrator which works according to the Midpoint Method, which is a onestep method with fixed step, giving an integration error of 0(h2). Additional input data is not available, as the time step is taken from the tstepcommand.
Method Midpoint:y_{n+1}= y_{n1} + 2*tstep*f(t_{n},y_{n})
Where:
y_{n+1}  =  The value of the integrated variable at time t_{n+1} 
y_{n1}  =  The value of the integrated variable at time t_{n1} 
tstep  =  The timestep 
f(t_{n},y_{n})  =  The value of the integrand at t_{n} and y_{n} 
As can be seen above, only one calculation of the integrand is needed for each timestep.
The values of the integrands is defined by the user in different input data commands, for example:
mass m_rigid_1,
mass m_rigid_6,
mass m_rigid_36b,
mass m_flex_1,
mass massless2,
func integ,
func hpass*,
func lpass*,
coupl kc,
coupl kckc,
coupl kfrkc and
coupl k_air3.
tsim_param= runge_kutta
Selects an integrator which works according to the RungeKuttas Method, which is a fourstep method with fixed step, giving an integration error of 0(h4). Additional input data is not available, as the time step is taken from the special tstepcommand.
Method RungeKutta:y_{n+1}= y_{n} + (k_{1}+2k_{2}+2k_{3}+k_{4})/6
Where:
y_{n+1}  =  The value of the integrated variable at time t_{n+1} 
y_{n}  =  The value of the integrated variable at time t_{n} 
k_{1}  =  tstep*f(t_{n},y_{n}) 
k_{2}  =  tstep*f(t_{n}+tstep/2,y_{n}+k_{1}/2) 
k_{3}  =  tstep*f(t_{n}+tstep/2,y_{n}+k_{2}/2) 
k_{4}  =  tstep*f(t_{n}+tstep ,y_{n}+k_{3} ) 
tstep  =  The timestep 
f(t_{n},y_{n})  =  The value of the integrand at t_{n} and y_{n} 
f(t_{n}+tstep,y_{n}+k_{3})  =  The value of the integrand at t_{n}+tstep and y_{n}+k_{3} 
As can be seen above, four calculations of the integrand is made for each timestep
(one in the beginning, one in the end and two in the middle of each time interval).
The values of the integrands is defined by the user in different input data commands, for example:
mass m_rigid_1,
mass m_rigid_6,
mass m_rigid_36b,
mass m_flex_1,
mass massless2,
func integ,
func hpass*,
func lpass*,
coupl kc,
coupl kckc,
coupl kfrkc and
coupl k_air3.
tsim_param= heun
Selects an integrator which works according to the Heun's method, which is a twostep method with fixed step, giving an integration error of 0(h2). Additional input data is not available, as the time step is taken from the special tstepcommand.
Method Heun:y_{n+1}= y_{n} + (k_{1}+k_{2})/2
Where:
y_{n+1}  =  The value of the integrated variable at time t_{n+1} 
y_{n}  =  The value of the integrated variable at time t_{n} 
k_{1}  =  tstep*f(t_{n},y_{n}) 
k_{2}  =  tstep*f(t_{n}+tstep,y_{n}+k_{1}) 
tstep  =  The timestep 
f(t_{n},y_{n})  =  The value of the integrand at t_{n} and y_{n} 
f(t_{n}+tstep,y_{n}+k_{1})  =  The value of the integrand at t_{n}+tstep and y_{n}+k_{1} 
As can be seen above, two calculations of the integrand is made for each timestep
(in the beginning and in the end of each time interval).
The values of the integrands is defined by the user in different input data commands, for example:
mass m_rigid_1,
mass m_rigid_6,
mass m_rigid_36b,
mass m_flex_1,
mass massless2,
func integ,
func hpass*,
func lpass*,
coupl kc,
coupl kckc,
coupl kfrkc and
coupl k_air3.
tsim_param= heun_u, regl, (+`)max_tstep, (+`)min_tstep
Selects an integrator which works according to a modified Heun's method. The integrator has variable steps, and the length of the step is calculated based on how fast the error increases or decreases between two consecutive time steps. The absolute error value is not calculated at every individual time step, but the sensitivity of the step selection can be controlled with the help of the regulation variable regl. Practical tests have shown that regl= 0.20.8 provides a suitable size for integration steps, regl= 0.3 can be given as a recommended value. The integration method heun_u has a variable called fstep which contains the average step length for calculation. There is no average step length calculated in the initial phase of the time integration, which is why the program uses the value of tstep read from the input data file. The user has the possibility, with the help of max_tstep and min_tstep, to control heun_u so that too large or too small time steps are not chosen. If max_tstep and min_tstep not are defined, the default values max_tstep = 1. and min_tstep = 1.e7 will apply. The input data argument max_tstep is applicable in those cases where the excitation level is very low, e.g. on tangent track without any track irregularities. I these cases the regulator in heun_u have no motions from where it can regulate the size of the time step. When simulating a railway vehicle, max_tstep= 0.002 and min_tstep= 1e7 should be a suitable choice.
Default values for regl, max_tstep and min_tstep are 0.3, 0.002 and 1e7 respectively.
Method heun_u creates a variable with the name IntegratorDebug, which contains the number of the equation which controls the size of the time step.
For more details about the Heun's method please look at heun.
Reference Manuals Calc menu Input Data Menutsim_param= heun_c, regl, (+`)max_tstep, (+`)min_tstep
Similar to heun_u but makes backsteps if the tolerance not is meet. Default values for regl, max_tstep and min_tstep are 0.05, 0.0015 and 1e9 respectively.
For more details about the Heun's method please look at heun_u.
Reference Manuals Calc menu Input Data Menutsim_param= heun_d, regl, (+`)max_tstep, (+`)min_tstep
Similar to heun_c but executes faster. Default values for regl, max_tstep and min_tstep are 0.05, 0.0015 and 1e9 respectively.
Reference Manuals Calc menu Input Data Menutsim_param= heun2impl, tol, nloop
Implicit Heun's method. The integrator can be used if the eigenvalues are high but the motions are slow. E.g. a rolling contact surface at low speeds.
Input data parameter tol sets the tolerance of the integrator.
Input data parameter nloop sets the number of iterations before heun2impl makes a back step.
Default values for tol and nloop are 1e6 and 50 respectively.
Reference Manuals Calc menu Input Data Menutsim_param= dopri5, tol
Multistep explicit rungekutta according to DORMAND & PRINCE. The source code to DOPRI5 is described in the book "SOLVING ORDINARY DIFFERENTIAL EQUATIONS I. NONSTIFF PROBLEMS", 2ND EDITION. SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS, SPRINGERVERLAG (1993), written by E. HAIRER, S.P. NORSETT and G. WANNER. A typical value for the tolerance can be 1.e10.
Reference Manuals Calc menu Input Data Menutsim_param= radau5, tol
Numerical solution of a stiff (or differential algebraic) system of first 0rder ordinary differential equations M*Y'=F(X,Y).
The system can be (linearly) implicit (massmatrix M.ne.I) or explicit (M=I).
The method used is an implicit rungekutta method (radau iia) of order 5 with step size control and continuous output.
CF. Section IV.8
Authors: E. Hairer and G. Wanner
Universite de Geneve, dept. de mathematiques
CH1211 GENEVE 24, SWITZERLAND
This code is part of the book:
E. Hairer and G. Wanner, Solving ordinary differential equations ii. stiff and differentialalgebraic problems.
Springer series in computational mathematics 14, Springerverlag 1991, second edition 1996.
A typical value for the tolerance can be 1.e3.
tsim_param= odassl, tol
Implicit DAEsolver by Claus Fuhrer at Numerical Analysis, Lund University, based on the DASSL routine written by Linda Petzold, MIT. A typical value for the tolerance can be 1.e5.
Reference Manuals Calc menu Input Data MenuSpecifies the start time in time integration analysis.
Specifies the size of the time step in time integration analysis.
Command tstep sets the value of variable timestep.
In main memory, timestep is stored as an ordinary variable,
which means that its value can be changed/overwritten by ordinary funccommands.
Default value for variable timestep is 0.001 [s].
Specifies the stop time in time integration analysis.
Tstop is also stored in the main memory as a variable,
which makes it possible to redefine its value in a
funccommand.
If tstop not is defined, the default value tstop= 0. will apply.
Keyword that forces an update of the mass matrix in every time step.
In order to save computation time, the inverse of the mass matrix is only calculated in the beginning of the calculation as default.
After this command has been given, the user has later the possibility to update a mass with command func update_mass.
Specifies start of input data which is to be logged on file "calc.log".
All the input data commands which are given between the command
wlog_beg and wlog_end
will be printed out on the file.
Ends the writing into file "calc.log" beginning with command wlog_beg
Specifies whether the log file will be saved or not.
wlog_store value
Wlog_store can be given the value 0 or 1. If wlog_store is set at 0, no log file will be created. If wlog_store is set at 1, a log file named "calc.log" will be created. See also wlog_beg and wlog_end.
Declared Integer*4 Default= 1
When command write_ca_file has been given in input data, the results are continuously written to the harddisk during the time simulation phase. This however makes the processing time longer, but it has the advantage that it is possible to restore the results if the time simulation terminates abnormally.
If command write_ca_file has been given and the simulation has terminated abnormally, the user has now the possibility to restore the results if the command conv_ca *.ca is given in the genfile or xterm window.
During timedomain simulations, split up the results in many idfiles.
When making very long simulations it can be unpractical with very big idfiles,
therefore this command has been introduced.
The write_id_file command writes several idfiles during a simulation.
Between the identstring and the extension ".id",
command write_id_file adds an underscore plus a serial number,
in order to give a uniq name to each idfile.
write_id_file No_tout
No_tout  =  The number of tout passings before writing results to the next idfile. 
This chapter presents a number of examples to illustrate how the program is used, and what it can be used for.
This chapter contains the following examples:
head 1 Generation of a sinusoidal function head 2 with the frequency $frequency Hz. # tsim_param= e1 # Select integrator e1 tstart= 0. tstop= 4 # Select start and stop times. tout= 0.04 tstep= 0.04 # Select printing and integration steps # func const frequency= 2 # Define a variable named "frequency" func operp sinarg= # Calculate the variable sinarg 2 * 3.14159 * frequency * time func sin sin2 sinarg # Calculate sinus for sinarg # s_var sngl sin2 # Order storage of variable sin2
head 1 A mass of 2(kg) connected to point with a spring of 50(N/m) head 2 Point is sinusoidally excited with a frequency of .5(Hz) head 3 The amplitude of the is increased from 0(mm) to 10(mm) in 3(s) # # tsim_param= heun_u 0.5 #Select integrator heun_u tstart= 0. tstop= 16. #Select start and stop times tout= 0.020 tstep= 0.001 #Select printing and initial integration step # # # Create the esys and lsys coordinate systems. # # lsys type name coordinates lsys e_fix esys 0. 0. 0. 0. 0. 0. lsys l_local lsys esys 0. 0. 0. # # # Remove the gravity of earth. # accel local_all 0. 0. 0. # # # Create a mass and a point to fasten the mass in. # # mass m_type m_name lsys center of gravity mass matrix' diagonal mass m_rigid_6 mass lsys 0. 0. 0. 2 2 2 2 2 2 mass fixpoint_6 point lsys 0. 0. 0. # # # Create a spring between mass and point. # # coupl c_type c_name coupl attachm.point stiffness dire.of.action coupl k kyy point 0. 0. 0. mass 0. 0. 0. 50 esys y # # # Create excitation variable 1(Hz) with amplitude, which will increase to 10(mm) # func mul timepi time 6.28318531 func mul sinarg timepi .5 # Frequency .5(Hz) func sin sinus sinarg # func intpl_l ampl time 0 0 3 .010 50 .010 # Amplitude # # # Assign body point the sinus shaped motion in ydirection. # func mul point.y ampl sinus # # # Store variables for postprocessing # s_var sngl point.y s_var sngl massa.y
head 1 A body of 2(kg), excited by acceleration due to gravity head 2 Coupled to point by a spring of 50e3[N/m] and the length 1[m] head 3 At start the mass is extended 1[m] in the xdirection # # tsim_param= e1 # Select integrator tstart= 0. tstop= 3. # Select start and stop. tout= 0.020 tstep= 0.001 # Select printing steps and integration start steps # # # Create esys and lsys coordinate systems. # # lsys type name coordinate lsys e_fix esys 0. 0. 0. 0. 0. 0. lsys l_local lsys esys 0. 0. 0. # # # Create a mass and a point to attach the mass to. # # mass m_type m_name lsys center of gravity mass matrix' diagonal mass m_rigid_6 mass lsys 1. 0. 0. 2 2 2 2 2 2 mass fixpoint_6 point lsys 0. 0. 0. # # # Create spring and small damper between body and point. # coupl p_lin stiff 0. 10e3 coupl p_lin damper 0. 10 coupl k kstiff point 0 0 0 massa 1 0 0 stiff esys cu coupl c cdamper point 0 0 0 massa 1 0 0 damper esys cu # # # Store variables for postprocessing # s_var sngl massa.x # Motion of the mass s_var sngl massa.y s_var sngl massa.z s_var sngl massa.f s_var sngl massa.k s_var sngl massa.p # s_var sngl kstiff.d # Force and displacement in the direction of the spring s_var sngl kstiff.F # s_var sngl kstiff.F2x # Force from the spring acting on the mass. s_var sngl kstiff.F2z
head 1 A body of 2(kg), with a speed of 30(m/s), at a height of 1(m) head 2 Attached to point via springs 1200(N/m) and dampers 150(Ns/m) head 3 Enters a curve of 1000(m) radius and a cant of .06(rad) # # tsim_param= heun_u 0.5 # Select an integrator with variable step tstart= 0. tstop= 2. # Select start and stop times. tout= 0.020 tstep= 0.001 # Select storing step and initial integration step # func const speed 30 # Create a variable containing the speed. func mul dist speed time # Create a variable containing the position. # # # Create esys and lsys coordinate system, and vectors which control the curve. # func intpl_r krok_R 0 0 5 0 10 .001 30 .001 func intpl_r krok_fi 0 0 5 0 10 .060 30 .060 func intpl_r krok_z 0 0 5 0 10 .045 30 .045 # lsys e_abs_bend esys0 speed 0. krok_R krok_fi krok_z lsys l_local lsys0 esys0 0 0 0 # # # Create a mass and a point to attach the mass to. # # mass m_type m_name lsys center of gravity mass matrix' diagonal mass m_rigid_6 massa lsys0 0. 0. 1. 2 2 2 2 2 2 mass fixpoint_6 point lsys0 0. 0. 0. # # # Create springs and dampers. # coupl p_lin stiff 0. 1200 coupl k stiff.x point 0 0 0 massa 0 0 0 stiff esys0 x coupl k stiff.y point 0 0 0 massa 0 0 0 stiff esys0 y coupl k stiff.z point 0 0 0 massa 0 0 0 stiff esys0 z coupl k stiff.f point 0 0 0 massa 0 0 0 stiff esys0 f coupl k stiff.k point 0 0 0 massa 0 0 0 stiff esys0 k coupl k stiff.p point 0 0 0 massa 0 0 0 stiff esys0 p coupl p_lin damper 0. 50 coupl c damper.x point 0 0 0 massa 0 0 0 damper esys0 x coupl c damper.y point 0 0 0 massa 0 0 0 damper esys0 y coupl c damper.z point 0 0 0 massa 0 0 0 damper esys0 z coupl c damper.f point 0 0 0 massa 0 0 0 damper esys0 f coupl c damper.k point 0 0 0 massa 0 0 0 damper esys0 k coupl c damper.p point 0 0 0 massa 0 0 0 damper esys0 p # # # Store variables for postprocessing # # s_var sngl esys0.x s_var sngl lsys0.x # Motions of lsys and esys s_var sngl esys0.y s_var sngl lsys0.y s_var sngl esys0.z s_var sngl lsys0.z s_var sngl esys0.f s_var sngl lsys0.f s_var sngl esys0.k s_var sngl lsys0.k s_var sngl esys0.p s_var sngl lsys0.p s_var sngl esys0.vx s_var sngl lsys0.vx s_var sngl esys0.vy s_var sngl lsys0.vy s_var sngl esys0.vz s_var sngl lsys0.vz s_var sngl esys0.vf s_var sngl lsys0.vf s_var sngl esys0.vk s_var sngl lsys0.vk s_var sngl esys0.vp s_var sngl lsys0.vp s_var sngl esys0.ax s_var sngl lsys0.ax s_var sngl esys0.ay s_var sngl lsys0.ay s_var sngl esys0.az s_var sngl lsys0.az s_var sngl esys0.af s_var sngl lsys0.af s_var sngl esys0.ak s_var sngl lsys0.ak s_var sngl esys0.ap s_var sngl lsys0.ap # # # position speed s_var sngl massa.x s_var sngl massa.vx # Motions and speed of the mass s_var sngl massa.y s_var sngl massa.vy s_var sngl massa.z s_var sngl massa.vz s_var sngl massa.f s_var sngl massa.vx s_var sngl massa.k s_var sngl massa.vy s_var sngl massa.p s_var sngl massa.vz # # Sum of external force's acting on the mass s_var sngl massa.Fx s_var sngl massa.Fy s_var sngl massa.Fz s_var sngl massa.Fx s_var sngl massa.Fy s_var sngl massa.Fz # # Acceleration of inertia, due to accelerating coordinate systems s_var sngl massa.Ax s_var sngl massa.Ay s_var sngl massa.Az s_var sngl massa.Af s_var sngl massa.Ak s_var sngl massa.Ap
The results from a calculation is stored in two binary files in directory id id/$ident.id and id/$ident.id2.
File id/$ident.id2 contains all timesteps from all variables.
File id/$ident.id is a smaller file only containing the names of all variables inclusive their addresses
in the dircet access file id/$ident.id2.
Results from the idfiles can be exported with the following programs:
cataf  Writes all results into an ASCIIfile. 
catas  Writes a minor dump into an ASCIIfile. 
read_id_file.m  A matlabscript which reads idfiles directly. Located in directory $gensys/source/download/octave/m/gensys 