CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

interFoam - sudden simulation crash

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 18, 2017, 04:31
Default interFoam - sudden simulation crash
  #1
New Member
 
Join Date: Apr 2017
Posts: 6
Rep Power: 9
fmerk is on a distinguished road
Hello foamers,

I am working on a channel flow simulation using interFoam version Openfoam 1606+. I use the pimple algorithm, RAS with k-omega sst and an adjustable time step with a Co number <0.75. My mesh is okay, i.e. checkMesh -allTopology -allGeometry is only concerned about a number of undertermined cells at the bottom. I compute on parallel with 4 cores.

The velocity is neither known up- nor downstream, yet the water levels (h_in=2.15m, h_out=1.85m) are. Thus, I run the simulation with a totalPressure BC for the inlet and outlet patch. Both patches are spatially divided in a inletWater and outletWater, where I set the BC for alpha=fixedValue=1.

In order to smooth the numerical simulation, I tried to implement kind of a pressure ramp by applying the BC uniformTotalPressure for inlet and outlet patch.

However, I haven't been able to succeed a single time so far.

I attached a test case. The inlet ramp pressure definition for the totalpressure rises from p0 (t=0)=p_hyd+P_dyn(u_init=0.5) to p0(t=150)=p_hyd+P_dyn(u_init=2.5). For improvement of the numerical stabilisation, I also implemented a ramp for the outlet pressure. It decreases from p0 (t=0)=p_hyd+P_dyn(u_init=0.5) to p0(t=150)=p_hyd.

Two things are significant: an air velocity of magnitude ~10 and a sudden change in time step and courant with a subsequent decrease of the timestep and an eventually simulation crash. The .log file shows:

Courant Number mean: 0.00919418 max: 0.123878
Interface Courant Number mean: 0.000981603 max: 0.100002
deltaT = 0.00112173
Time = 125.100361974923104

PIMPLE: iteration 1
smoothSolver: Solving for alpha.water, Initial residual = 5.98242e-05, Final residual = 9.25524e-09, No Iterations 1
Phase-1 volume fraction = 0.698289 Min(alpha.water) = -0.0172475 Max(alpha.water) = 1.01759
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 0.698289 Min(alpha.water) = -0.0171559 Max(alpha.water) = 1.01759
DICPCG: Solving for p_rgh, Initial residual = 3.39988e-05, Final residual = 6.75884e-07, No Iterations 2
DICPCG: Solving for p_rgh, Initial residual = 7.75034e-07, Final residual = 7.86252e-08, No Iterations 5
time step continuity errors : sum local = 8.55462e-09, global = 1.63886e-09, cumulative = 0.00040107
DICPCG: Solving for p_rgh, Initial residual = 6.88985e-06, Final residual = 1.07104e-07, No Iterations 2
DICPCG: Solving for p_rgh, Initial residual = 1.21741e-07, Final residual = 8.44158e-08, No Iterations 1
time step continuity errors : sum local = 9.18471e-09, global = 4.95856e-09, cumulative = 0.000401075
DICPCG: Solving for p_rgh, Initial residual = 6.66188e-06, Final residual = 8.15266e-08, No Iterations 2
DICPCG: Solving for p_rgh, Initial residual = 8.69901e-08, Final residual = 8.69901e-08, No Iterations 0
time step continuity errors : sum local = 9.46468e-09, global = 2.98789e-09, cumulative = 0.000401078
smoothSolver: Solving for omega, Initial residual = 7.71672e-06, Final residual = 1.22808e-09, No Iterations 1
smoothSolver: Solving for k, Initial residual = 0.000276498, Final residual = 6.7505e-08, No Iterations 1
ExecutionTime = 47662.4 s ClockTime = 47979 s

Courant Number mean: 0.00919479 max: 0.123869
Interface Courant Number mean: 0.000981905 max: 0.100002
deltaT = 0.0011217
Time = 125.101483678352707

PIMPLE: iteration 1
smoothSolver: Solving for alpha.water, Initial residual = 6.16002e-05, Final residual = 9.27208e-09, No Iterations 1
Phase-1 volume fraction = 0.698288 Min(alpha.water) = -0.0337563 Max(alpha.water) = 1.01759
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 0.698288 Min(alpha.water) = -0.0336423 Max(alpha.water) = 1.01759
DICPCG: Solving for p_rgh, Initial residual = 0.00247448, Final residual = 1.44139e-05, No Iterations 2
DICPCG: Solving for p_rgh, Initial residual = 1.44822e-05, Final residual = 4.8083e-07, No Iterations 6
time step continuity errors : sum local = 5.34279e-08, global = 2.69449e-08, cumulative = 0.000401105
DICPCG: Solving for p_rgh, Initial residual = 0.014491, Final residual = 0.000131111, No Iterations 2
DICPCG: Solving for p_rgh, Initial residual = 0.000129723, Final residual = 5.01169e-06, No Iterations 11
time step continuity errors : sum local = 5.70339e-07, global = -9.30337e-08, cumulative = 0.000401012
DICPCG: Solving for p_rgh, Initial residual = 0.99888, Final residual = 0.0415996, No Iterations 1
DICPCG: Solving for p_rgh, Initial residual = 0.0203395, Final residual = 7.34686e-08, No Iterations 55
time step continuity errors : sum local = 1.50557e-05, global = -4.20235e-07, cumulative = 0.000400591
smoothSolver: Solving for omega, Initial residual = 0.0534182, Final residual = 3.25049e-07, No Iterations 4
smoothSolver: Solving for k, Initial residual = 0.153943, Final residual = 1.74852e-07, No Iterations 6
ExecutionTime = 47663.2 s ClockTime = 47979 s

Courant Number mean: 2.45123 max: 31513.8
Interface Courant Number mean: 0.198036 max: 2721.96
deltaT = 2.66955e-08
Time = 125.101483705048253

PIMPLE: iteration 1
smoothSolver: Solving for alpha.water, Initial residual = 6.87222e-05, Final residual = 6.57853e-10, No Iterations 1
Phase-1 volume fraction = 0.698287 Min(alpha.water) = -0.480656 Max(alpha.water) = 1.01759
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 0.698287 Min(alpha.water) = -0.475874 Max(alpha.water) = 1.01759
DICPCG: Solving for p_rgh, Initial residual = 0.999871, Final residual = 0.0440932, No Iterations 7
DICPCG: Solving for p_rgh, Initial residual = 0.00142484, Final residual = 5.39219e-05, No Iterations 24
time step continuity errors : sum local = 2.61972e-08, global = -5.21343e-09, cumulative = 0.000400586
DICPCG: Solving for p_rgh, Initial residual = 0.0233034, Final residual = 0.000751639, No Iterations 6
DICPCG: Solving for p_rgh, Initial residual = 0.00120166, Final residual = 5.78432e-05, No Iterations 24
time step continuity errors : sum local = 2.81139e-08, global = 9.87746e-09, cumulative = 0.000400596
DICPCG: Solving for p_rgh, Initial residual = 0.0195959, Final residual = 0.000682388, No Iterations 6
DICPCG: Solving for p_rgh, Initial residual = 0.000989858, Final residual = 8.54182e-08, No Iterations 79
time step continuity errors : sum local = 1.7333e-11, global = 2.25158e-12, cumulative = 0.000400596
smoothSolver: Solving for omega, Initial residual = 2.94409e-06, Final residual = 3.18266e-10, No Iterations 1
smoothSolver: Solving for k, Initial residual = 1.03411e-07, Final residual = 5.38321e-12, No Iterations 1
ExecutionTime = 47664.1 s ClockTime = 47980 s

Courant Number mean: 8.66418e-06 max: 0.0620378
Interface Courant Number mean: 3.62161e-06 max: 0.0620378
deltaT = 3.09987e-08
Time = 125.101483736046902


I changed the times of the ramps a little, yet without succes.

I'm really stuck right here: it seems the error is within the BCs, yet i could imagine that improving my numerics in fvSchemes or the algorithms in fvSolution might help. However, my experience is rather shallow. I appreciate any feedback.

Kind regards,

fmerk
Attached Files
File Type: zip 0.zip (89.4 KB, 14 views)
File Type: zip system.zip (13.7 KB, 11 views)
fmerk is offline   Reply With Quote

Old   October 20, 2017, 08:08
Default solved
  #2
New Member
 
Join Date: Apr 2017
Posts: 6
Rep Power: 9
fmerk is on a distinguished road
I solved it by adapting the BC as follows:
- zeroGradient for U for inletAir, outletAir
- fixedfluxpressure for p_rgh inletAir, outletAir

However, this implies a second problem:

My liquid phase, alpha.water, that should range from 0-1 now has values up to 200. More specifically, the respective cells are the ones at the bottom next to the the outlet, see the attached picture.

Does anyone have an idea how to get rid of these high fractions numbers?

Kind regards
Attached Images
File Type: jpg alphawater.jpg (22.7 KB, 62 views)
fmerk is offline   Reply With Quote

Old   October 20, 2017, 14:04
Default
  #3
Senior Member
 
sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10
saddy is on a distinguished road
i suggest you try modifying dam break tutorial
first understand BC's etc then proceed with your case
saddy is offline   Reply With Quote

Old   October 25, 2017, 04:13
Default
  #4
New Member
 
Join Date: Apr 2017
Posts: 6
Rep Power: 9
fmerk is on a distinguished road
I solved my issue of the high alpha fraction by again adapting the boundary conditions.

It seems that, given one has an outlet and wants to prescribe the outlet flow height via 2 patches (outletWater and outletAir), a fixedValue for the fluid fraction alpha with 1 and 0, respectively, is not feasible. It appears that by applying 2 fixedValues for alpha at the outlet, the system is constraint. By using inletOutlet boundaries, the solver is more flexible, i.e. the alpha values are not restricted. Yet, this leads to a little lower true flow height since at the outlet interface alpha values of around 0.75 are monitored than prescribed in the first step of defining the spatial aspects of the outlet patches.

Please note that these are points I found out with respect to my particular case. A general verification of the above results is not given.
fmerk is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
twoPhaseEulerFoam: sudden crash hcen OpenFOAM Running, Solving & CFD 18 September 29, 2020 04:04
InterFoam for continuous flow simulation DancingButterfly OpenFOAM Running, Solving & CFD 4 October 25, 2016 23:31
Simulation of drop with interFoam abdessamad OpenFOAM Running, Solving & CFD 7 April 29, 2014 20:28
Bigger wave height leads to crash (interFoam) David* OpenFOAM 6 November 14, 2011 03:53
Interfoam... free surface simulation urgent lostin4ever Main CFD Forum 4 October 12, 2010 09:29


All times are GMT -4. The time now is 21:07.