From 72c4b6737b29771b849abd77a0a31e4a49a62716 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Wed, 27 Aug 2025 17:46:45 +0200 Subject: [PATCH 1/4] Add notes on restarting CalculiX --- .../calculix/adapter-calculix-configure.md | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/pages/docs/adapters/calculix/adapter-calculix-configure.md b/pages/docs/adapters/calculix/adapter-calculix-configure.md index 3a5c3a9d02a..fede9139e13 100644 --- a/pages/docs/adapters/calculix/adapter-calculix-configure.md +++ b/pages/docs/adapters/calculix/adapter-calculix-configure.md @@ -280,3 +280,45 @@ Make sure to replace `[CalculiX input file]` and `[CalculiX participant name]` w CalculiX comes with OpenMP and the SPOOLES library which itself can use OpenMP. The adapter also supports this and parallel runs can be used in the same way as with the uncoupled version of CalculiX. You can specify the number of threads via the `OMP_NUM_THREADS` environment variable. For a finer configuration, look at the CalculiX documentation. You can also try [GPU acceleration with PaStiX](adapter-calculix-pastix-build.html). + +## Restarting + +To restart a CalculiX simulation, we need to enable restart files (`.rout`), run the first simulation, and then restart the second simulation from that using a modified input file and renaming the `.rout` to `.rin`. See an [example from the community](https://pawel-lojek.medium.com/resuming-fsi-simulations-with-openfoam-calculix-896088861ae). + +1. In the `.inp`, modify the end time in the following section: + + ```text + *DYNAMIC, ALPHA=0.0, DIRECT + 1.E-2, 0.1 + ``` + + The first number is the time step size, the second number is the end time. + +2. Under the section specifying the time step size and end time, enable writing restart files (in this case, for every step): + + ```text + *RESTART,WRITE,FREQUENCY=1 + ``` + + At the very end of the simulation, and after a normal exit, a file `.rout` will be generated. + +3. To restart the simulation, we need the following line in the input file, before the `STEP` definition: + + ```text + *RESTART,READ,STEP=1 + ``` + + For every new step of restarting the simulation, increase the respective number: when you restart again to go further beyond in time, set `STEP=2`. + +4. Since all the rest of the configuration is included in the restart file, we need to remove the rest of the definitions. In the end, the input file should look like this: + + ```text + *RESTART,READ,STEP=1 + *STEP,NLGEOM, INC=1000000 + *DYNAMIC, ALPHA=0.0, DIRECT + 1.E-2, 0.1 + *RESTART,WRITE,FREQUENCY=1 + *END STEP + ``` + +5. Make the respective adjustments in the other participants as well. For example, see [notes on restarting OpenFOAM simulations](https://precice.org/adapter-openfoam-config.html#restarting-fsi-simulations). Search also the [preCICE forum](https://precice.discourse.group/search?q=restarting%20order%3Alatest) and help improve this documentation. From 8ca4ece0c7302e095874759a26c937c716b1f32c Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Wed, 27 Aug 2025 17:47:59 +0200 Subject: [PATCH 2/4] Add note on CalculiX config comments --- pages/docs/adapters/calculix/adapter-calculix-configure.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pages/docs/adapters/calculix/adapter-calculix-configure.md b/pages/docs/adapters/calculix/adapter-calculix-configure.md index fede9139e13..b014e9f821c 100644 --- a/pages/docs/adapters/calculix/adapter-calculix-configure.md +++ b/pages/docs/adapters/calculix/adapter-calculix-configure.md @@ -321,4 +321,6 @@ To restart a CalculiX simulation, we need to enable restart files (`.rout` *END STEP ``` + Note that, in CalculiX configuration files, you can add comment lines with two asterisks: `** comment`. + 5. Make the respective adjustments in the other participants as well. For example, see [notes on restarting OpenFOAM simulations](https://precice.org/adapter-openfoam-config.html#restarting-fsi-simulations). Search also the [preCICE forum](https://precice.discourse.group/search?q=restarting%20order%3Alatest) and help improve this documentation. From 1eac76d104b0d69f0f0f792e9f7dba42139458d7 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Wed, 27 Aug 2025 17:57:41 +0200 Subject: [PATCH 3/4] Fix markdownlint --- pages/docs/adapters/calculix/adapter-calculix-configure.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pages/docs/adapters/calculix/adapter-calculix-configure.md b/pages/docs/adapters/calculix/adapter-calculix-configure.md index b014e9f821c..72b3cbe77ad 100644 --- a/pages/docs/adapters/calculix/adapter-calculix-configure.md +++ b/pages/docs/adapters/calculix/adapter-calculix-configure.md @@ -293,7 +293,6 @@ To restart a CalculiX simulation, we need to enable restart files (`.rout` ``` The first number is the time step size, the second number is the end time. - 2. Under the section specifying the time step size and end time, enable writing restart files (in this case, for every step): ```text @@ -301,7 +300,6 @@ To restart a CalculiX simulation, we need to enable restart files (`.rout` ``` At the very end of the simulation, and after a normal exit, a file `.rout` will be generated. - 3. To restart the simulation, we need the following line in the input file, before the `STEP` definition: ```text @@ -309,7 +307,6 @@ To restart a CalculiX simulation, we need to enable restart files (`.rout` ``` For every new step of restarting the simulation, increase the respective number: when you restart again to go further beyond in time, set `STEP=2`. - 4. Since all the rest of the configuration is included in the restart file, we need to remove the rest of the definitions. In the end, the input file should look like this: ```text @@ -322,5 +319,4 @@ To restart a CalculiX simulation, we need to enable restart files (`.rout` ``` Note that, in CalculiX configuration files, you can add comment lines with two asterisks: `** comment`. - 5. Make the respective adjustments in the other participants as well. For example, see [notes on restarting OpenFOAM simulations](https://precice.org/adapter-openfoam-config.html#restarting-fsi-simulations). Search also the [preCICE forum](https://precice.discourse.group/search?q=restarting%20order%3Alatest) and help improve this documentation. From 318098e9b19becf6e7543730d61f07b6580dab32 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Wed, 27 Aug 2025 18:00:53 +0200 Subject: [PATCH 4/4] Add step to rename restart file --- pages/docs/adapters/calculix/adapter-calculix-configure.md | 1 + 1 file changed, 1 insertion(+) diff --git a/pages/docs/adapters/calculix/adapter-calculix-configure.md b/pages/docs/adapters/calculix/adapter-calculix-configure.md index 72b3cbe77ad..1331d240a13 100644 --- a/pages/docs/adapters/calculix/adapter-calculix-configure.md +++ b/pages/docs/adapters/calculix/adapter-calculix-configure.md @@ -300,6 +300,7 @@ To restart a CalculiX simulation, we need to enable restart files (`.rout` ``` At the very end of the simulation, and after a normal exit, a file `.rout` will be generated. + Rename this file to `.rin`. 3. To restart the simulation, we need the following line in the input file, before the `STEP` definition: ```text