Output to the terminal
Writing output to the terminal is useful to judge the current state of the simulation as user.
There are several commands that write output to the terminal, all of which are similar to the commands that write to files as discussed here. Because of this, some information presented there is repeated here.
Status output
The output that every user will see immediately when starting the first simulation is the so called status output which is controlled by the status_style command. There are some defaults set so that even without this command some values will be printed periodically to the stream. This output frequency is controllable through the write_to_terminal_timestep command.
The image shown above is an example for such a standard output, showing the current time, integration step, number of particles as well as linear and rotational kinetic energy and the Cundall number. To change the output the all and terminal keywords of the status_style command can be used, e.g.:
status_style terminal {time, atoms, ke} file {time, atoms, ke, id_wall.fx}
which would write only the time, number of particles and the linear kinetic energy to the terminal.
Single string output
The print command is often used to write a single string to the terminal. So if you want to write a string with a variable to your terminal you could use the following command:
print "Variable value my_variable = ${my_variable}"
This would write the value of the variable my_variable to the terminal only.
Repeated string output
The write_to_file command is generally used to write data to a file periodically. However, using the keyword terminal it is possible to also write the output to the terminal. Taking the example from the file output tutorial and adding terminal yes would cause exactly this behavior:
variable sim_time equal time
write_to_file title "time, wall_fx" string "${sim_time} id_wall.fx" file my_output.txt terminal yes
In this case the information would be written simultaneously to the terminal and the file my_output.txt. The frequency in this case is determined by the write_output_timestep command.
Information from Aspherix®
Additionally, Aspherix® writes information about the current simulation state to the output. This can for example contain information about particle insertion or performance indicators at the end of a simulate command. Fore more information about the final output see Interpret Aspherix® screen output. More detailed information is written to the log file, which by default, is called log_aspherix.txt.