# Pausing the simulation and change the project file while running

**URL:** <https://discourse.opengeosys.org/t/pausing-the-simulation-and-change-the-project-file-while-running/1683>\
**Category:** Help & Support\
**Created:** [September 3, 2025, 1:04pm UTC](https://discourse.opengeosys.org/t/pausing-the-simulation-and-change-the-project-file-while-running/1683 "2025-09-03T13:04:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShF](https://discourse.opengeosys.org/letter_avatar_proxy/v4/letter/s/f08c70/32.png) [@ShF](https://discourse.opengeosys.org/u/ShF)\
**Post date:** [September 3, 2025, 1:04pm UTC](https://discourse.opengeosys.org/t/pausing-the-simulation-and-change-the-project-file-while-running/1683/1 "2025-09-03T13:04:04Z")

</div>

Hello everyone,

I would like to know if it is possible in OGS to edit the simulation while running it.  
Or in other words, is it possible to run a project file and model, initialized with the results of a previous run?  
I started the setup with the maximum permeability value of 10e-16 due to the divergence of the model. Now at some points I want to decrease it to the real number which is 10e-21 in max.

How should I do that?

Regards

---

<div class="post-metadata">

**Author:** ![chleh](https://discourse.opengeosys.org/user_avatar/discourse.opengeosys.org/chleh/32/854_2.png) [@chleh](https://discourse.opengeosys.org/u/chleh)\
**Post date:** [September 3, 2025, 3:40pm UTC](https://discourse.opengeosys.org/t/pausing-the-simulation-and-change-the-project-file-while-running/1683/2 "2025-09-03T15:40:11Z")

</div>

Hi,

the OGS wording for that is simulation “restart”. Basically you’d have to start the second simulation with a result mesh of the first simulation as first `<mesh>` and use [`MeshNode`](https://doxygen.opengeosys.org/d5/dfe/ogs_file_param __prj__ parameters __parameter__ meshnode) parameters for the initial conditions of all primary variables.

If mechanics is involved you might have to remove `<initial_stress>`. We have several examples of the features in our test suite:

```auto
$ find Tests/Data/ -iname '*restart*.prj' -o -iname '*restart*.xml'
Tests/Data/Mechanics/Ehlers/MFront/square_1e1_2_matIDs_restart.prj
Tests/Data/Mechanics/InitialStates/equilibrium_restart.prj
Tests/Data/PhaseField/surfing/surfing_restart.xml
Tests/Data/RichardsMechanics/LiakopoulosHM/liakopoulos_restart.xml
...

```

The [XML patches](https://www.opengeosys.org/docs/userguide/basics/project-file/#option-2-apply-patch-files-to-the-project-file) illustrate what you’d need to do, e.g. `Tests/Data/RichardsMechanics/LiakopoulosHM/liakopoulos_restart.xml`:

```xml
<?xml version='1.0' encoding='ISO-8859-1'?>
<OpenGeoSysProjectDiff base_file="liakopoulos.prj">
    <replace sel="/*/meshes/mesh[1]/text()">liakopoulos_t_600.vtu</replace>
    <remove sel="/*/processes/process/initial_stress" />

    <replace sel="/*/time_loop/processes/process/time_stepping/t_initial/text()">600</replace>

    <!-- optional -->
    <remove sel="/*/time_loop/processes/process/time_stepping/timesteps" />
    <!-- optional -->
    <add sel="/*/time_loop/processes/process/time_stepping">
        <timesteps>
            <pair>
                <repeat>6</repeat>
                <delta_t>100</delta_t>
            </pair>
            <!-- ... -->
        </timesteps>
    </add>

    <!-- optional -->
    <replace sel="/*/time_loop/output/prefix/text()">liakopoulos_restart</replace>

    <!-- optional -->
    <replace sel="/*/time_loop/output/fixed_output_times/text()">1200 2400 4800 6000 7200</replace>

    <remove sel="/*/parameters/parameter[name=&quot;Initial_stress&quot;]" />

    <remove sel="/*/parameters/parameter[name=&quot;displacement_ic&quot;]" />
    <add sel="/*/parameters">
        <parameter>
            <name>displacement_ic</name>
            <type>MeshNode</type>
            <field_name>displacement</field_name>
        </parameter>
    </add>

    <remove sel="/*/parameters/parameter[name=&quot;pressure_ic&quot;]" />
    <add sel="/*/parameters">
        <parameter>
            <name>pressure_ic</name>
            <type>MeshNode</type>
            <field_name>pressure</field_name>
        </parameter>
    </add>

    <!-- ... -->
</OpenGeoSysProjectDiff>

```

AFAIK we don’t have good documentation on restart.

You might want to try [restart from OGSTools](https://ogstools.opengeosys.org/stable/reference/ogstools.ogs6py.project.html#ogstools.ogs6py.project.Project.restart), though its implementation might be incomplete, but might work for your use case.

Best regards,  
Christoph
