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

.solve() crashing with no warning

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By HPE

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 21, 2020, 15:10
Default .solve() crashing with no warning
  #1
Member
 
Federico Zabaleta
Join Date: May 2016
Posts: 47
Rep Power: 10
fedez91 is on a distinguished road
Hi everyone,

I am implementing a solver where as a part of it I introduce a advection diffusion equation.
Code:
fvScalarMatrix alphaAirEqn
(
    fvm::ddt(alphaAir) 
  + fvm::div(phiAir,alphaAir)
  - fvm::laplacian(kappaEff, alphaAir)
);

Info << "Before Solve" << endl;
alphaAirEqn.solve();
Info << "After Solve" << endl;
The simulation seems to run fine until suddenly it blows up with no type of warning of indication of instability. Here I add the output for the last two time steps.


Code:
Courant Number mean: 0.114512 max: 0.610134
Interface Courant Number mean: 0.00675904 max: 0.498688
deltaT = 0.00714286
Time = 0.0571429

PIMPLE: iteration 1
smoothSolver:  Solving for alpha.water, Initial residual = 0.00521154, Final residual = 4.30428e-09, No Iterations 3
Phase-1 volume fraction = 0.130194  Min(alpha.water) = -9.8495e-15  Max(alpha.water) = 1
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 0.130194  Min(alpha.water) = -4.79255e-06  Max(alpha.water) = 1
DICPCG:  Solving for p_rgh, Initial residual = 0.0190907, Final residual = 0.00031443, No Iterations 2
time step continuity errors : sum local = 0.000880848, global = -8.58739e-06, cumulative = 1.10099e-05
DICPCG:  Solving for p_rgh, Initial residual = 0.000426879, Final residual = 1.66463e-05, No Iterations 15
time step continuity errors : sum local = 4.57798e-05, global = 4.31204e-06, cumulative = 1.53219e-05
DICPCG:  Solving for p_rgh, Initial residual = 0.000124589, Final residual = 8.68277e-08, No Iterations 53
time step continuity errors : sum local = 2.48986e-07, global = -2.59522e-08, cumulative = 1.5296e-05
smoothSolver:  Solving for epsilon, Initial residual = 0.0125835, Final residual = 7.23496e-07, No Iterations 6
smoothSolver:  Solving for k, Initial residual = 0.0853305, Final residual = 5.3777e-07, No Iterations 9
Before Sa
smoothSolver:  Solving for alphaAir, Initial residual = 0.135861, Final residual = 3.69369e-09, No Iterations 12
After Sa
ExecutionTime = 0.31 s  ClockTime = 0 s

Courant Number mean: 0.144905 max: 0.789675
Interface Courant Number mean: 0.00910855 max: 0.600491
deltaT = 0.00857143
Time = 0.0657143

PIMPLE: iteration 1
smoothSolver:  Solving for alpha.water, Initial residual = 0.00697895, Final residual = 3.22405e-11, No Iterations 4
Phase-1 volume fraction = 0.130194  Min(alpha.water) = -4.24805e-12  Max(alpha.water) = 1
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 0.130194  Min(alpha.water) = -1.17147e-05  Max(alpha.water) = 1
DICPCG:  Solving for p_rgh, Initial residual = 0.0287047, Final residual = 0.000485994, No Iterations 2
time step continuity errors : sum local = 0.00177274, global = -2.53438e-06, cumulative = 1.27616e-05
DICPCG:  Solving for p_rgh, Initial residual = 0.000654371, Final residual = 2.85206e-05, No Iterations 15
time step continuity errors : sum local = 0.00010096, global = 1.20234e-05, cumulative = 2.4785e-05
DICPCG:  Solving for p_rgh, Initial residual = 0.000197295, Final residual = 9.52018e-08, No Iterations 54
time step continuity errors : sum local = 3.55484e-07, global = -3.56348e-08, cumulative = 2.47494e-05
smoothSolver:  Solving for epsilon, Initial residual = 0.0170451, Final residual = 8.69067e-07, No Iterations 7
smoothSolver:  Solving for k, Initial residual = 0.0966996, Final residual = 9.68412e-07, No Iterations 10
Before Sa

--> This is where it just stop running
There clearly a problem with the line alphaAirEqn.solve();, but I have no idea what type of error I may be facing. Maybe the linear system of equations has no solution?

Additional Info:

The ADE should have a source term (S), but in order to have more control of how alphaAir is created/destroyed, I decided to calculate the creation/destruction of alphaAir before the equations (S*DeltaT), add it to the field, and then just solve the ADE without the source term. I don't know if this may be an issue when trying to solve the linear system.
fedez91 is offline   Reply With Quote

Old   August 21, 2020, 18:51
Default
  #2
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
Hi,

- Does it crash without any error message?
- Or is it frozen? May be some infinite loop?
- What settings are you using for the linear solver? Have you tried any other linear solver for that equation?
- Can you constrain the number of iterations for the linear solver with `maxIter` entry (or maxIters?)?
- Can you compile the solver with the debug flag and rerun the case?
fedez91 likes this.
HPE is offline   Reply With Quote

Old   August 21, 2020, 21:38
Default
  #3
Member
 
Federico Zabaleta
Join Date: May 2016
Posts: 47
Rep Power: 10
fedez91 is on a distinguished road
Hi HPE,

- Does it crash without any error message?
- Or is it frozen? May be some infinite loop?

It crashes immediately. No message.

- What settings are you using for the linear solver? Have you tried any other linear solver for that equation?

I tried it now and with GAMG it runs ok.. I don't know if I want to dig deeper to find what was wrong with the smoothSolver. Thanks!
fedez91 is offline   Reply With Quote

Reply

Tags
solver crash


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
foamToTecplot360 thomasduerr OpenFOAM Post-Processing 121 June 11, 2021 11:05
Caffa 3D code Waliur Rahman Main CFD Forum 0 May 29, 2018 01:53
[swak4Foam] installation problem with version 0.2.3 Claudio87 OpenFOAM Community Contributions 9 May 8, 2013 11:20
latest OpenFOAM-1.6.x from git failed to compile phsieh2005 OpenFOAM Bugs 25 February 9, 2010 05:37
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 11:23


All times are GMT -4. The time now is 05:34.