.. _4Csimulation: |FOURC| Simulation ==================== The basic command to execute 4C is (relative to the build directory) .. code-block:: bash ./4C The input file is commonly a file with the suffix ``.dat``, and it is commonly created by a preprocessing step, which is explained in detail in :ref:`preprocessing`. The ```` should not have any suffix. Output generated by |FOURC| consists at least of one file named ``.control``. If further output has been requested, a number of further files are created. The file names are all given in the \*.control file. These results in the output files are by default stored in a proprietary format. However, output data can also be stored in a format that is readable by other programs. For further information, see :ref:`Postprocessing`. All available options when starting |FOURC| from the command line are shown by an output of ``./4C --help``: .. literalinclude:: /4C-help.txt Running examples ---------------- In ``tests/input_files`` a huge number of test examples are available. For example, .. code-block:: bash ./4C tests/input_files/f2_drivencavity20x20_drt.dat xxx runs the 2d fluid driven cavity example and writes the output to files beginning with ``xxx``. You can also run the code in parallel with the ``mpirun`` command like this: .. code-block:: bash mpirun -np 1 ./4C tests/input_files/f2_drivencavity20x20_drt.dat xxx Restarting an analysis ----------------------- For restarting an analysis one has to provide restart information in the first simulation by including the parameter ``RESTARTEVERY `` in the ``STRUCTURAL DYNAMICS`` section, so that the information is written every *numsteps* step. In the second simulation, no additional parameters have be included. The information that it is a restart, is given on the command line: :: ./4C [restartfrom=] restart= Here, one has to provide the step, at which the restart is started from the previous simulation. If the parameter ``restartfrom`` is given, the initial configuration is read from this file, otherwise it is read from ````. In the latter case the filename of the new output is the same with an appended number, e.g., ``outfile-1``. Note that the value for ``step`` must be given in the file ``.control`` in one of the step lines: ``step = ``. .. note:: - The parameters RESTART and RESTARTTIME in the PROBLEM TYPE section are not needed anymore, and will probably vanish soon. - The parameter MAXTIME indicates the maximum time of all simulations, it is NOT a step time, so be aware that MAXTIME in the subsequent simulation must be larger than in the first one. - The parameter TIMEINIT can be 0 also in the subsequent simulation, it is not used, since the initial time is defined by the restart.