Running mb_cns

The main integration program mb_cns reads the Parameter File, the discretised descriptions of the flow geometry and initial flow state and produces a new Solution File (which may contain the flow state at several times) and a History File (which may contain flow history data for a number of fixed points).

mb_cns.exe [-rb] [-wb] [-f base_file_name]
where the command-line options include...
-fp base_file_name
Specify the "base file name" which is then used to construct file names for:
  1. the Input Parameter File (base_file_name.p);
  2. the Initial Solution File (base_file_name.s0);
  3. the Grid File (base_file_name.g);
  4. the New Solution File (base_file_name.s);
  5. the History File (base_file_name.h).
The default value for base_file_name is "default".
-rb
Read binary (unformatted) data from the grid and solution file. By default, ASCII formatted data will be assumed.
-wb
Write the solution file as binary data. By default, ASCII formatted data will be written.
-force jb ibndy
Write the x-direction force for the specified block and boundary to the mb_cns.log file.
jb is the block index in the range 0..nb-1
ibndy is the boundary index; 0=North, 1=East, 2=South, 3=West.
To set the data for more than one boundary, specify this option multiple times. One line per boundary is written to the log file at the same times as the history data are written. The force data can be conveniently extracted from the log file using awk, for example:
% awk '/XFORCE/ { print $0 }' mb_cns.log
The format of each line is:
XFORCE: t n jb ibndy fx_p fx_v [jb ibndy fx_p fx_v [...]]
where fx_p and fx_v are the x-direction forces (in Newtons) due to pressure and viscous (shear) stress respectively.

On shared UNIX machines, the wall clock time probably won't be a good indication of the actual CPU time. To get a measure of the actual CPU time at the end of the simulation, use the time command

% time mb_cns.exe -f sod2

Normally, a simulation will stop on reaching a preset maximum simulation time or number of time steps, whichever comes first. Both of these criteria need to be set when preparing the input data files. The program may be also be stopped interactively by creating a file called mb_cns.halt in the current working directory. The contents of the file are unimportant. The existence of such a file will cause the program to stop and write out the solution at the current time step (so be careful to not have the file already in the directory when the program attempts to start).

If a simulation has been stopped, it may be restarted by extracting (and saving) a particular solution using mb_post. Rename the saved solution file to name.s0 and then restart mb_cns.


MB_CNS (C) P. A. Jacobs
Last Updated 08-Jun-1999, 20-Feb-03.