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

Fluid Solver stopped at time 10 in FSI/flap_perp/calculix-openfoam case #149

Open
lpxls opened this issue Jan 24, 2021 · 2 comments
Open

Comments

@lpxls
Copy link

lpxls commented Jan 24, 2021

Hi, I try to prolong the simulation time in the FSI/flap_perp/calculix-openfoam case. When is set more than 10 (precisely 10, even 10.1,it doesn't work) in precice-config.xml, the fuild solvers stop solving at time 10 and the Solid solver still solving the result and I can see the size of Solid/flap.frd goes bigger and bigger. Fluid.log look normal but it stopped at the Time=10.01, the last part in fluid.log shows:

---[preciceAdapter] [DEBUG] Writing coupling data... 
---[preciceAdapter] [DEBUG] Advancing preCICE..

Here are the logs and xml file. logs and xml
It seems that it did not give any error code and stop proceeding to the next time step.
the results for the sloved 10s in Paraview looks normal.
I try to set the end time in controlDict file to more than 10, but the fluid solver still stopped at 10.
Further, I set the timeFormat in controlDict from general to fixed, and fluid.log provides the following error message:

--> FOAM FATAL ERROR: 
cannot find file "./Fluid/0.000000/pointDisplacement"

    From function virtual Foam::autoPtr<Foam::ISstream> Foam::fileOperations::uncollatedFileOperation::readStream(Foam::regIOobject&, const Foam::fileName&, const Foam::word&, bool) const
    in file global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.C at line 538.

FOAM exiting

I wonder if the bug has some connect with the format of the name of result file?

@MakisH
Copy link
Member

MakisH commented Jan 25, 2021

Interesting issue, thanks for reporting @lpxls!

I can reproduce this with OpenFOAM v2012, CalculiX v2.16, preCICE v2.2.0 and the adapters from master, simply setting max-time to 11 in the precice-config.xml. On CalculiX side, preCICE gives the following error:

ERROR:  advance() cannot be called with a timestep size of 0.

The OpenFOAM side seems to behave normally and simply waits at advance().

More details:
---[precice]  Time window completed
---[precice]  iteration: 1, time-window: 1000, time: 9.99 of 11, time-window-size: 0.01, max-timestep-length: 0.01, ongoing: yes, time-window-complete: yes, 
 initial energy (at start of step) = 0.000000e+00

 since start of the step: 
 external work = 5.307984e+00
 work performed by the damping forces = 0.000000e+00
 netto work = 5.307984e+00

 actual energy: 
 internal energy = 4.750395e+00
 kinetic energy = 5.402174e-01
 elastic contact energy = 0.000000e+00
 energy lost due to friction = 0.000000e+00
 total energy  = 5.290613e+00

 energy increase = 5.290613e+00

 energy balance (absolute) = -1.737169e-02 
 energy balance (relative) = 0.421633 % 

 Using up to 1 cpu(s) for the stress calculation.

Adjusting time step for transient step
precice_dt dtheta = 0.001000, dtheta = 0.001000, solver_dt = 0.010000
Adapter reading coupling data...
Reading FORCES coupling data with ID '2'. 
 increment 1000 attempt 1 
 increment size= 1.000000e-02
 sum of previous increments=9.990000e+00
 actual step time=1.000000e+01
 actual total time=1.000000e+01

 iteration 1

 Using up to 1 cpu(s) for the stress calculation.

 Using up to 1 cpu(s) for the energy calculation.

 Using up to 1 cpu(s) for the symmetric stiffness/mass contributions.

 Factoring the system of equations using the symmetric spooles solver
 Using up to 1 cpu(s) for the stress calculation.

 Using up to 1 cpu(s) for the energy calculation.

 average force= 12.953863
 time avg. forc= 8.474396
 largest residual force= 0.000856 in node 83 and dof 3
 largest increment of disp= 2.262366e-03
 largest correction to disp= 8.108316e-05 in node 126 and dof 1

 no convergence

 iteration 2

 Using up to 1 cpu(s) for the symmetric stiffness/mass contributions.

 Factoring the system of equations using the symmetric spooles solver
 Using up to 1 cpu(s) for the stress calculation.

 Using up to 1 cpu(s) for the energy calculation.

 average force= 12.953863
 time avg. forc= 8.474396
 largest residual force= 0.000000 in node 123 and dof 1
 largest increment of disp= 2.262366e-03
 largest correction to disp= 1.553456e-08 in node 126 and dof 3

 convergence

 the increment size exceeds the remainder of the step and is decreased to 0.000000e+00

Adapter writing coupling data...
Writing DISPLACEMENTS coupling data with ID '3'. 
Adapter calling advance()...
---[precice]  Time window completed
---[precice]  iteration: 1, time-window: 1001, time: 10 of 11, time-window-size: 0.01, max-timestep-length: 0.01, ongoing: yes, time-window-complete: yes, 
 initial energy (at start of step) = 0.000000e+00

 since start of the step: 
 external work = 5.295729e+00
 work performed by the damping forces = 0.000000e+00
 netto work = 5.295729e+00

 actual energy: 
 internal energy = 4.707448e+00
 kinetic energy = 5.709108e-01
 elastic contact energy = 0.000000e+00
 energy lost due to friction = 0.000000e+00
 total energy  = 5.278358e+00

 energy increase = 5.278358e+00

 energy balance (absolute) = -1.737057e-02 
 energy balance (relative) = 0.421485 % 

 Using up to 1 cpu(s) for the stress calculation.

Adjusting time step for transient step
precice_dt dtheta = 0.001000, dtheta = 0.000000, solver_dt = 0.000000
Adapter reading coupling data...
Reading FORCES coupling data with ID '2'. 
 increment 1001 attempt 1 
 increment size= 0.000000e+00
 sum of previous increments=1.000000e+01
 actual step time=1.000000e+01
 actual total time=1.000000e+01

 iteration 1

 Using up to 1 cpu(s) for the stress calculation.

 Using up to 1 cpu(s) for the energy calculation.

 Using up to 1 cpu(s) for the symmetric stiffness/mass contributions.

 Factoring the system of equations using the symmetric spooles solver
 Using up to 1 cpu(s) for the stress calculation.

 Using up to 1 cpu(s) for the energy calculation.

 average force= 12.953863
 time avg. forc= 8.478871
 largest residual force= 0.000000 in node 29 and dof 3
 largest increment of disp= 0.000000e+00
 largest correction to disp= 0.000000e+00

 no convergence

 iteration 2

 Using up to 1 cpu(s) for the symmetric stiffness/mass contributions.

 Factoring the system of equations using the symmetric spooles solver
 Using up to 1 cpu(s) for the stress calculation.

 Using up to 1 cpu(s) for the energy calculation.

 average force= 12.953863
 time avg. forc= 8.478871
 largest residual force= 0.000000 in node 77 and dof 1
 largest increment of disp= 0.000000e+00
 largest correction to disp= 0.000000e+00

 convergence

Adapter writing coupling data...
Adapter calling advance()...
---[precice] ERROR:  advance() cannot be called with a timestep size of 0.

@KyleDavisSA any idea what is happening inside the CalculiX adapter at this point?

I assume that one always needs to use end time higher than the preCICE end time in CalculiX. You can set this in your .inp file of CalculiX.

@MakisH
Copy link
Member

MakisH commented Apr 14, 2021

I can still reproduce this with the restructured tutorials.

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