Repeat on cutback and composition reactions

Hi everyone,

I have a material model plugin that computes composition reactions based on output variables from the previous time step. I also use the “repeat on cutback” timestepping feature.

It appears that when the time step is repeated, the variables used to compute the reactions are not taken from the last correct time step, but from the last computed time step, which should be overwritten. Does anyone have experience with such a setup?

Cheers,

Petra

Hi @maipe,

Thank you for posting this question to the forum.

I checked the tests folder and there indeed does not seem to be a test case with the repeat on cutback feature that also includes composition reactions, aside from standard composition field advection.

I know a number of us (myself included) have experimented with this feature, but its certainly possible something is currently not working as intended.

Would you be willing to provide a prm file that reproduces the issues you are seeing and a summary of what you expect to occur versus what the output shows?

Cheers,

John

Hi John,

Yes sure. I guess it depends on how the reactions are implemented. So perhaps I am just doing something wrong in my material model plugin that computes the reactions. I prepared a very simplified version of my plugin - it is attached.

The plugin structure is based on the Melt global material model. It simply computes porosity based on temperature. I’ve added there a simple “cout” text output to print which temperature is used in the calculation.

The model is a single cell where temperature changes. At some moment the “repeat on cutback” is activated by an abrupt increase in the velocity. The model uses operator splitting.

In the text log, you can see that the temperature and porosity used in the reaction rate computation after the “repeat on cutback” are not from the previous correctly calculated time step.

If you need more details, just let me know.

Thanks a lot!

Petra

Here is a part of the log:

*** Timestep 10: t=1000 years, dt=100 years
Solving composition reactions… T, porosity:0.901 0
T, porosity:0.901 0
T, porosity:0.901 0
T, porosity:0.901 0
T, porosity:0.901 0
T, porosity:0.901 0
T, porosity:0.901 0
T, porosity:0.901 0
T, porosity:0.901 0
T, porosity:0.901 0
in 10 substep(s).
Solving temperature system… 1 iterations.
Skipping porosity composition solve because RHS is zero.
Solving Stokes system (GMG)… 2+0 iterations.

Postprocessing:
Writing graphical output: output-test/solution/solution-00010
Compositions min/max/mass: 0/0/0
Temperature min/avg/max: 0.9923 K, 0.9971 K, 1.001 K

*** Timestep 11: t=1100 years, dt=100 years
Solving composition reactions… T, porosity:1.001 0
T, porosity:1.001 1e-05
T, porosity:1.001 1.99e-05
T, porosity:1.001 2.9701e-05
T, porosity:1.001 3.9404e-05
T, porosity:1.001 4.901e-05
T, porosity:1.001 5.85199e-05
T, porosity:1.001 6.79347e-05
T, porosity:1.001 7.72553e-05
T, porosity:1.001 8.64828e-05
in 10 substep(s).
Solving temperature system… 1 iterations.
Solving porosity system … 1 iterations.
Solving Stokes system (GMG)… 2+0 iterations.

Repeating the current time step based on the time stepping manager …
*** Timestep 11: t=1050 years, dt=50 years
Solving composition reactions… T, porosity:1.101 8.97905e-05
T, porosity:1.101 0.000594342
T, porosity:1.101 0.00109637
T, porosity:1.101 0.00159589
T, porosity:1.101 0.00209291
T, porosity:1.101 0.00258744
T, porosity:1.101 0.00307951
T, porosity:1.101 0.00356911
T, porosity:1.101 0.00405626
T, porosity:1.101 0.00454098
in 10 substep(s).
Solving temperature system… 1 iterations.
Solving porosity system … 1 iterations.
Solving Stokes system (GMG)… 2+0 iterations.

Repeating the current time step based on the time stepping manager …
*** Timestep 11: t=1025 years, dt=25 years
Solving composition reactions… T, porosity:1.051 0.00500972
T, porosity:1.051 0.0051247
T, porosity:1.051 0.00523938
T, porosity:1.051 0.00535379
T, porosity:1.051 0.0054679
T, porosity:1.051 0.00558173
T, porosity:1.051 0.00569528
T, porosity:1.051 0.00580854
T, porosity:1.051 0.00592152
T, porosity:1.051 0.00603421
in 10 substep(s).
Solving temperature system… 1 iterations.
Solving porosity system … 1 iterations.
Solving Stokes system (GMG)… 2+0 iterations.

test-repeat-on-cutback.zip (4.8 KB)