Dam break simulation crash in explicit scheme

Hi everyone,

Recently I just finish my FEM code adapter, just for explicit couping, and I tried to make some simulation with openfoam as offered in official tutorial. The perpendicular-flap simulation is carried well in explicit scheme, so I tried the dam break simulation, but something strange happened.

preCICE version: v3.0.0
openfoam adapter version: 1.3.0
openfoam version: v2306

Here is the precice-config.xml, I should point that the original tutorial is in implicit scheme, but I still in explicit step, so I use explicit scheme.

<?xml version="1.0" encoding="UTF-8" ?>
<precice-configuration>
  <log>
    <sink
      filter="%Severity% > debug and %Rank% = 0"
      format="---[precice] %ColorizedSeverity% %Message%"
      enabled="true" />
  </log>

  <data:vector name="Force" />
  <data:vector name="Displacement" />

  <mesh name="Fluid-Mesh" dimensions="2">
    <use-data name="Force" />
    <use-data name="Displacement" />
  </mesh>

  <mesh name="Solid-Mesh" dimensions="2">
    <use-data name="Force" />
    <use-data name="Displacement" />
  </mesh>

  <participant name="Fluid">
    <provide-mesh name="Fluid-Mesh" />
    <receive-mesh name="Solid-Mesh" from="Solid" />
    <write-data name="Force" mesh="Fluid-Mesh" />
    <read-data name="Displacement" mesh="Fluid-Mesh" />
    <mapping:rbf-global-direct
      direction="write"
      from="Fluid-Mesh"
      to="Solid-Mesh"
      constraint="conservative">
      <basis-function:thin-plate-splines />
    </mapping:rbf-global-direct>
    <mapping:rbf-global-direct
      direction="read"
      from="Solid-Mesh"
      to="Fluid-Mesh"
      constraint="consistent">
      <basis-function:thin-plate-splines />
    </mapping:rbf-global-direct>
  </participant>

  <participant name="Solid">
    <provide-mesh name="Solid-Mesh" />
    <read-data name="Force" mesh="Solid-Mesh" />
    <write-data name="Displacement" mesh="Solid-Mesh" />
  </participant>

  <m2n:sockets acceptor="Fluid" connector="Solid" exchange-directory=".." />

  <coupling-scheme:serial-explicit>
    <time-window-size value="1e-3" />
    <max-time value="1" />
    <participants first="Fluid" second="Solid" />
    <exchange data="Force" mesh="Solid-Mesh" from="Fluid" to="Solid" />
    <exchange data="Displacement" mesh="Solid-Mesh" from="Solid" to="Fluid" />
  </coupling-scheme:serial-explicit>
</precice-configuration>

The time step of openfoam is 1e-3, of FEM (explicit) is 1e-5
The material property:
rho:3000, E: 4e7
The rest of settings are consistent with official tutorial (breaking-dam-2d).
fvSchemes.txt (842 Bytes)
fvSolution.txt (2.1 KB)
preciceDict.txt (487 Bytes)

There are some snapshot of pressure:
T=0.03
Pressure
图ē‰‡
T=0.031
Pressure
图ē‰‡
T=0.032
Pressure
图ē‰‡
T=0.033
Pressure
图ē‰‡
T=0.041
Pressure
图ē‰‡
alpha.water
图ē‰‡

We can see that even the fluid is not touch the flap, the simulation seems start to diverge. And the force on flap is dramatic large.

ExecutionTime = 1.09 s  ClockTime = 17 s

forces forces write:
    Sum of forces
        Total    : (3.21902e+07 -6.72263e+06 3.44258e-12)
        Pressure : (3.21902e+07 -6.72263e+06 3.44232e-12)
        Viscous  : (0.107815 0.902103 2.5147e-16)
    Sum of moments
        Total    : (3.36131e+06 1.60951e+07 -1.38001e+07)
        Pressure : (3.36131e+06 1.60951e+07 -1.38001e+07)
        Viscous  : (-0.451051 0.0539074 -0.0662324)
    writing force and moment files.

I have tried adjust the time step, but still cannot solve well.

So I tried to carry the one-way coupling, it just turn off the write date procedure in FEM adapter, and the simulation went well!

So I wonder if the problem is in the fluid part, or the explicit scheme cannot solver this kind of violent case? Or something wrong with the time step?

I did more analysis about this problem, and I still cannot solve the divergence of openfoam, so I installed Calculix as tutorial do, and change the coupling scheme as explicit. And I found out that it will appear the same problem as my solver shows, so I think the reason for crash of simulation is in the choice of coupling scheme.

So, does this shows that develop implicit coupling is unavoidable?

Any advice may help will be appreciate!

Hi @Gong_CHEN

Thanks for the detailed report and sorry for my short answer :blush:

I am pretty that yes.

Hi @uekerman

Thanks for the reply, Iā€™m already working on developing it.

1 Like