# FSI: OpenFOAM adapter with interFOAM

**URL:** <https://precice.discourse.group/t/fsi-openfoam-adapter-with-interfoam/175>\
**Category:** Official adapters and tutorials\
**Tags:** openfoam, fsi, multiphase\
**Created:** [March 18, 2020, 6:07pm UTC](https://precice.discourse.group/t/fsi-openfoam-adapter-with-interfoam/175 "2020-03-18T18:07:25Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![bitronteofil](https://avatars.discourse-cdn.com/v4/letter/b/bb73d2/32.png) [@bitronteofil](https://precice.discourse.group/u/bitronteofil)\
**Post date:** [March 23, 2020, 12:49pm UTC](https://precice.discourse.group/t/fsi-openfoam-adapter-with-interfoam/175/13 "2020-03-23T12:49:30Z")

</div>

![div_paraview](https://global.discourse-cdn.com/free1/uploads/precice/original/1X/5b26940091087b4b1a8938690b1631bf8aaa35f4.png)

Unfortunately, the simulation diverge after time 0.5[s].  
Moreover, the max Courant number is very low except that in water collision against the wall (more or less at time 0.2[s] to 0.26[s]).

![div_gnuplot_2](https://global.discourse-cdn.com/free1/uploads/precice/original/1X/2bf9c7e654a274fc31fca0a99b9dc859b18b6850.png)

For this reason I would like to perform some stop and restart for the coupling simulation.  
In other discourse, I read that CalculiX wrote restart file only at the end of the simulation. Moreover in my tests it write only if I put:

\*RESTART,WRITE,FREQUENCY=1

If I use the same save frequency like the output results (that in my case in 200) even at the end of the simulation CalculiX doesn’t write nothing.

\*NODE FILE, FREQUENCY=200  
U  
\*EL FILE, FREQUENCY=200  
S  
\*END STEP

Ok, now I’m trying with this strategies:

1. start the coupling with a dt=1[ms] till t=0.18[s]. In this case the max Courant is below 0.7.
2. restart the coupling with a dt=0.05[ms] till t=0.26[s] (ending phase of the water collision).

My question is:

how do I have to consider the max-time in the precice-config.xml?  
At the beginning I thought it like a total time, but the coupling didn’t stop at 0.26[s] like I expected.  
I beleive to understood that:

1. OF consider the time like a total time
2. while CalculiX and preCICE consider it like an additional time.

So I changed my config file in this way:

1. OF: endTime 0.26;
2. CalculiX: dt = 0.05e-3; tfin = 0.08
3. preCICE: max-time value=“0.08”

Is it right?

---

_[View the full topic](https://precice.discourse.group/t/fsi-openfoam-adapter-with-interfoam/175)._
