Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perpendicular Flap crashes when using subcycling #575

Open
NiklasVin opened this issue Oct 8, 2024 · 1 comment
Open

Perpendicular Flap crashes when using subcycling #575

NiklasVin opened this issue Oct 8, 2024 · 1 comment

Comments

@NiklasVin
Copy link
Collaborator

Used library versions:

  • Adapter version/commit number/last download: v1.3.1
  • OpenFOAM version: 2406
  • preCICE version: 3.1.2
Error message of last time step:
PIMPLE: iteration 1
smoothSolver:  Solving for cellDisplacementx, Initial residual = 0.820797, Final residual = 7.13498e-19, No Iterations 2
smoothSolver:  Solving for cellDisplacementy, Initial residual = 0.799523, Final residual = 2.76883e-17, No Iterations 2
DICPCG:  Solving for pcorr, Initial residual = 1, Final residual = 0.000672219, No Iterations 68
DICPCG:  Solving for pcorr, Initial residual = 0.0618846, Final residual = 8.14925e-09, No Iterations 88
time step continuity errors : sum local = 1.37376e-09, global = 3.56395e-11, cumulative = -8.73401e-07
smoothSolver:  Solving for Ux, Initial residual = 0.120197, Final residual = 8.62079e-07, No Iterations 39
smoothSolver:  Solving for Uy, Initial residual = 0.112921, Final residual = 9.31561e-07, No Iterations 34
DICPCG:  Solving for p, Initial residual = 0.302693, Final residual = 0.000293536, No Iterations 66
DICPCG:  Solving for p, Initial residual = 0.0386374, Final residual = 3.68061e-05, No Iterations 55
time step continuity errors : sum local = 7.24018e-06, global = -7.07944e-07, cumulative = -1.58135e-06
DICPCG:  Solving for p, Initial residual = 0.0220954, Final residual = 1.83289e-05, No Iterations 62
DICPCG:  Solving for p, Initial residual = 0.00480982, Final residual = 4.01741e-06, No Iterations 56
time step continuity errors : sum local = 8.28686e-07, global = -2.70158e-08, cumulative = -1.60836e-06
DICPCG:  Solving for p, Initial residual = 0.0142835, Final residual = 1.2279e-05, No Iterations 60
DICPCG:  Solving for p, Initial residual = 0.00274941, Final residual = 2.44604e-06, No Iterations 60
time step continuity errors : sum local = 5.1083e-07, global = 1.47916e-08, cumulative = -1.59357e-06
DICPCG:  Solving for p, Initial residual = 0.0118773, Final residual = 1.1042e-05, No Iterations 59
DICPCG:  Solving for p, Initial residual = 0.00217576, Final residual = 8.73635e-09, No Iterations 77
time step continuity errors : sum local = 1.83504e-09, global = 7.94249e-11, cumulative = -1.59349e-06
ExecutionTime = 3.92 s  ClockTime = 7 s

---[precice] �[0m Mapping "Force" for t=0.04 from "Fluid-Mesh" to "Solid-Mesh"
---[precice] �[0m Time window completed
---[precice] �[0m Mapping "Displacement" for t=0.04 from "Solid-Mesh" to "Fluid-Mesh"
---[precice] �[0m iteration: 1 of 50 (min 1), time-window: 5, time: 0.04 of 5, time-window-size: 0.01, max-time-step-size: 0.01, ongoing: yes, time-window-complete: yes, write-iteration-checkpoint 
---[preciceAdapter] The coupling timestep completed. Writing the updated results.
Courant Number mean: 1.10395 max: 7.67523
Time = 0.05

PIMPLE: iteration 1
smoothSolver:  Solving for cellDisplacementx, Initial residual = 0.000513781, Final residual = 5.88609e-18, No Iterations 2
smoothSolver:  Solving for cellDisplacementy, Initial residual = 0.000501744, Final residual = 1.19195e-17, No Iterations 2
DICPCG:  Solving for pcorr, Initial residual = 1, Final residual = 0.000924515, No Iterations 67
DICPCG:  Solving for pcorr, Initial residual = 0.061722, Final residual = 7.62549e-09, No Iterations 88
time step continuity errors : sum local = 1.4287e-09, global = -2.19138e-11, cumulative = -1.59351e-06
smoothSolver:  Solving for Ux, Initial residual = 0.342152, Final residual = 7.97886e-07, No Iterations 31
smoothSolver:  Solving for Uy, Initial residual = 0.484288, Final residual = 9.72157e-07, No Iterations 32
DICPCG:  Solving for p, Initial residual = 0.140689, Final residual = 0.000118379, No Iterations 66
DICPCG:  Solving for p, Initial residual = 0.056835, Final residual = 4.63498e-05, No Iterations 61
time step continuity errors : sum local = 1.29794e-05, global = -4.66981e-07, cumulative = -2.06049e-06
DICPCG:  Solving for p, Initial residual = 0.0313542, Final residual = 2.32046e-05, No Iterations 62
DICPCG:  Solving for p, Initial residual = 0.00546486, Final residual = 3.78607e-06, No Iterations 61
time step continuity errors : sum local = 1.04716e-06, global = -5.96731e-09, cumulative = -2.06646e-06
DICPCG:  Solving for p, Initial residual = 0.0161969, Final residual = 1.44598e-05, No Iterations 62
DICPCG:  Solving for p, Initial residual = 0.00295532, Final residual = 2.51032e-06, No Iterations 62
time step continuity errors : sum local = 6.90473e-07, global = 7.53007e-09, cumulative = -2.05893e-06
DICPCG:  Solving for p, Initial residual = 0.0135775, Final residual = 1.24775e-05, No Iterations 61
DICPCG:  Solving for p, Initial residual = 0.00229308, Final residual = 6.60812e-09, No Iterations 76
time step continuity errors : sum local = 1.80962e-09, global = -7.22364e-12, cumulative = -2.05894e-06
ExecutionTime = 4.13 s  ClockTime = 7 s

---[precice] �[0m Mapping "Force" for t=0.05 from "Fluid-Mesh" to "Solid-Mesh"
---[precice] �[0m Mapping "Displacement" for t=0.05 from "Solid-Mesh" to "Fluid-Mesh"
---[precice] �[0m iteration: 2 of 50 (min 1), time-window: 5, time: 0.04 of 5, time-window-size: 0.01, max-time-step-size: 0.01, ongoing: yes, time-window-complete: no, read-iteration-checkpoint 
Courant Number mean: 1.10395 max: 7.67523
Time = 0.05

PIMPLE: iteration 1
smoothSolver:  Solving for cellDisplacementx, Initial residual = 0.826971, Final residual = 8.66142e-18, No Iterations 2
smoothSolver:  Solving for cellDisplacementy, Initial residual = 0.81761, Final residual = 2.76045e-17, No Iterations 2
DICPCG:  Solving for pcorr, Initial residual = 1, Final residual = 0.000860607, No Iterations 73
DICPCG:  Solving for pcorr, Initial residual = 0.40583, Final residual = 9.06378e-09, No Iterations 97
time step continuity errors : sum local = 2.75936e-08, global = -3.97749e-11, cumulative = -2.05898e-06
smoothSolver:  Solving for Ux, Initial residual = 0.903074, Final residual = 789.26, No Iterations 1000
smoothSolver:  Solving for Uy, Initial residual = 0.732706, Final residual = 2151.95, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 0.999632, Final residual = 0.000697483, No Iterations 88
DICPCG:  Solving for p, Initial residual = 0.872759, Final residual = 0.000826547, No Iterations 82
time step continuity errors : sum local = 48.2994, global = -0.752954, cumulative = -0.752956
DICPCG:  Solving for p, Initial residual = 0.336066, Final residual = 0.000239103, No Iterations 83
DICPCG:  Solving for p, Initial residual = 0.964627, Final residual = 0.000917575, No Iterations 59
time step continuity errors : sum local = 5066.05, global = 3918.51, cumulative = 3917.76
DICPCG:  Solving for p, Initial residual = 0.478094, Final residual = 0.000424423, No Iterations 51
DICPCG:  Solving for p, Initial residual = 0.953852, Final residual = 0.00093829, No Iterations 60
time step continuity errors : sum local = 105551, global = 193420, cumulative = 197338
DICPCG:  Solving for p, Initial residual = 0.48052, Final residual = 0.000391051, No Iterations 51
DICPCG:  Solving for p, Initial residual = 0.952827, Final residual = 5.26409e-09, No Iterations 115
time step continuity errors : sum local = 46.4586, global = 2.09115, cumulative = 197340
ExecutionTime = 4.51 s  ClockTime = 7 s

---[precice] �[0m Mapping "Force" for t=0.05 from "Fluid-Mesh" to "Solid-Mesh"
---[precice] �[0m Mapping "Displacement" for t=0.05 from "Solid-Mesh" to "Fluid-Mesh"
---[precice] �[0m iteration: 3 of 50 (min 1), time-window: 5, time: 0.04 of 5, time-window-size: 0.01, max-time-step-size: 0.01, ongoing: yes, time-window-complete: no, read-iteration-checkpoint 
Courant Number mean: 1.10395 max: 7.67523
Time = 0.05

PIMPLE: iteration 1
smoothSolver:  Solving for cellDisplacementx, Initial residual = 0.867691, Final residual = 6.23348e-18, No Iterations 2
smoothSolver:  Solving for cellDisplacementy, Initial residual = 0.861202, Final residual = 4.80158e-18, No Iterations 2
DICPCG:  Solving for pcorr, Initial residual = 1, Final residual = 0.000977818, No Iterations 71
DICPCG:  Solving for pcorr, Initial residual = 0.455588, Final residual = 6.71708e-09, No Iterations 95
time step continuity errors : sum local = 1.05801e-08, global = -1.17836e-10, cumulative = 197340
smoothSolver:  Solving for Ux, Initial residual = 0.920002, Final residual = 1.95588e+20, No Iterations 1000
smoothSolver:  Solving for Uy, Initial residual = 0.83389, Final residual = 1.85741e+20, No Iterations 1000
DICPCG:  Solving for p, Initial residual = 1, Final residual = 0.000400409, No Iterations 82
DICPCG:  Solving for p, Initial residual = 0.745248, Final residual = 0.000709922, No Iterations 37
time step continuity errors : sum local = -4.03737e+18, global = -1.93588e+18, cumulative = -1.93588e+18
DICPCG:  Solving for p, Initial residual = 0.357979, Final residual = 0.000326437, No Iterations 69
DICPCG:  Solving for p, Initial residual = 0.961185, Final residual = 0.000784698, No Iterations 22
time step continuity errors : sum local = -1.19919e+20, global = -1.88691e+19, cumulative = -2.0805e+19
DICPCG:  Solving for p, Initial residual = 0.687401, Final residual = 0.000624804, No Iterations 77
DICPCG:  Solving for p, Initial residual = 0.986636, Final residual = 0.000771809, No Iterations 13
time step continuity errors : sum local = 7.17806e+22, global = -4.7452e+19, cumulative = -6.82569e+19
DICPCG:  Solving for p, Initial residual = 0.50931, Final residual = 0.000141059, No Iterations 80
DICPCG:  Solving for p, Initial residual = 0.983318, Final residual = 8.43859e-09, No Iterations 99
time step continuity errors : sum local = 2.81033e+20, global = -2.58029e+18, cumulative = -7.08372e+19
ExecutionTime = 4.87 s  ClockTime = 8 s

---[precice] �[0m Mapping "Force" for t=0.05 from "Fluid-Mesh" to "Solid-Mesh"
---[precice] �[0m Mapping "Displacement" for t=0.05 from "Solid-Mesh" to "Fluid-Mesh"
---[precice] �[0m iteration: 4 of 50 (min 1), time-window: 5, time: 0.04 of 5, time-window-size: 0.01, max-time-step-size: 0.01, ongoing: yes, time-window-complete: no, read-iteration-checkpoint 
Courant Number mean: 1.10395 max: 7.67523
Time = 0.05

PIMPLE: iteration 1
smoothSolver:  Solving for cellDisplacementx, Initial residual = 1, Final residual = 5.62587e-18, No Iterations 2
smoothSolver:  Solving for cellDisplacementy, Initial residual = 1, Final residual = 3.74224e-17, No Iterations 2
DICPCG:  Solving for pcorr, Initial residual = 1, Final residual = 0.00089826, No Iterations 64
DICPCG:  Solving for pcorr, Initial residual = 0.996469, Final residual = 6.35919e-09, No Iterations 89
time step continuity errors : sum local = 7.06987e-06, global = 1.28168e-07, cumulative = -7.08372e+19
[stack trace]
=============
#1  Foam::sigFpe::sigHandler(int) in /usr/lib/openfoam/openfoam2406/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
#2  ? in /lib/x86_64-linux-gnu/libc.so.6
#3  Foam::symGaussSeidelSmoother::smooth(Foam::word const&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::Field<double> const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, unsigned char, int) in /usr/lib/openfoam/openfoam2406/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
#4  Foam::symGaussSeidelSmoother::smooth(Foam::Field<double>&, Foam::Field<double> const&, unsigned char, int) const in /usr/lib/openfoam/openfoam2406/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
#5  Foam::smoothSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in /usr/lib/openfoam/openfoam2406/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
#6  ? in /usr/lib/openfoam/openfoam2406/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so
#7  Foam::fvMesh::solve(Foam::fvMatrix<Foam::Vector<double> >&, Foam::dictionary const&) const in /usr/lib/openfoam/openfoam2406/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so
#8  ? in /usr/lib/openfoam/openfoam2406/platforms/linux64GccDPInt32Opt/bin/pimpleFoam
#9  ? in /lib/x86_64-linux-gnu/libc.so.6
#10  __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
#11  ? in /usr/lib/openfoam/openfoam2406/platforms/linux64GccDPInt32Opt/bin/pimpleFoam
=============
Floating point exception (core dumped)

To reproduce this issue apply the following changes in perpendicular-flap/solid-openfoam/system/controlDict:

- deltaT          0.01;
+ deltaT          0.001;

I also tested with the following additional modifications that lead to crashes:
In perpendicular-flap/fluid-openfoam/system/controlDict:

- deltaT          0.01;
+ deltaT          0.001;

Setting substeps=true in the precice-config.xml didn't change the behavior.

It seems like the OpenFOAM-OpenFOAM perpendicular flap example works if the participants' deltaT are at least the time-window-size.

@BenjaminRodenberg
Copy link
Member

I have a question about

Setting substeps=true in the precice-config.xml didn't change the behavior.

Did you use underrelaxation or quasi-Newton? For 3.1.2 quasi-Newton with substeps=true is not supported.

I can reproduce this problem with preCICE v3.1.2 when coupling fluid-openfoam + solid-openfoam. The output looks different, but the crash occurs at a similar point in time as above:

---[precice]  iteration: 2 of 50 (min 1), time-window: 5, time: 0.048 of 5, time-window-size: 0.01, max-time-step-size: 0.002, ongoing: yes, time-window-complete: no, 
---[preciceAdapter] The solver's timestep is smaller than the coupling timestep. Subcycling...
--> FOAM Warning : 
    From void adapterInfo(std::string, std::string)
    in file Utilities.C at line 17
    Warning in the preCICE adapter: 
The adapter does not fully support subcycling for FSI and instabilities may occur.

Courant Number mean: 1.24268e+32 max: 7.14833e+36
Time = 0.049

PIMPLE: iteration 1
smoothSolver:  Solving for cellDisplacementx, Initial residual = 0.0572208, Final residual = 1.63995e-18, No Iterations 2
smoothSolver:  Solving for cellDisplacementy, Initial residual = 0.0518513, Final residual = 2.76983e-18, No Iterations 2
DICPCG:  Solving for pcorr, Initial residual = 1, Final residual = 0.00095056, No Iterations 56
DICPCG:  Solving for pcorr, Initial residual = 0.600048, Final residual = 8.49135e-09, No Iterations 93
time step continuity errors : sum local = 1.03342e+25, global = -3.67873e+23, cumulative = -3.62965e+23
smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 7.45089e-07, No Iterations 19
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 9.22132e-07, No Iterations 16
[stack trace]
=============
#1  Foam::sigFpe::sigHandler(int) in /usr/lib/openfoam/openfoam2406/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
#2  ? in /lib/x86_64-linux-gnu/libc.so.6
#3  Foam::divide(Foam::Field<double>&, double const&, Foam::UList<double> const&) in /usr/lib/openfoam/openfoam2406/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
#4  ? in /usr/lib/openfoam/openfoam2406/platforms/linux64GccDPInt32Opt/bin/pimpleFoam
#5  ? in /usr/lib/openfoam/openfoam2406/platforms/linux64GccDPInt32Opt/bin/pimpleFoam
#6  ? in /usr/lib/openfoam/openfoam2406/platforms/linux64GccDPInt32Opt/bin/pimpleFoam
#7  ? in /lib/x86_64-linux-gnu/libc.so.6
#8  __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
#9  ? in /usr/lib/openfoam/openfoam2406/platforms/linux64GccDPInt32Opt/bin/pimpleFoam
=============
Floating point exception (core dumped)

Interesting points:

  • Subcycling with solid-fenics and fluid-openfoam works for this configuration.
  • I also get a crash when using the latest develop version of preCICE (precice/precice@4749919)
  • Setting substeps=true when using precice/precice@4749919 does not help.
  • No subcycling with time-window-size value="0.001" looks ok. Simulation runs beyond the problematic time at t=0.04
  • No subcycling with time-window-size value="0.01" (i.e. original tutorial configuration with OpenFOAM deltaT=0.01) looks ok. Simulation runs beyond the problematic time at t=0.04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants