CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Simulation diverging resulting in unknown error. (https://www.cfd-online.com/Forums/openfoam-solving/197098-simulation-diverging-resulting-unknown-error.html)

davismcc December 27, 2017 17:44

Simulation diverging resulting in unknown error.
 
3 Attachment(s)
Hello,

I am new to OpenFoam and CFD in general so I apologize if this is unclear.

I am simulating blood flow through an aneurysm which allows for a complex geometry. When I run the simulation using the pimpleFoam solver, the simulation diverges at the peak of the pulse. The error I receive is:

PIMPLE: iteration 1
smoothSolver: Solving for Ux, Initial residual = 0.00176612, Final residual = 2.4962e-06, No Iterations 2
smoothSolver: Solving for Uy, Initial residual = 0.00129989, Final residual = 4.75263e-06, No Iterations 2
smoothSolver: Solving for Uz, Initial residual = 0.00262526, Final residual = 6.66195e+126, No Iterations 1000
GAMG: Solving for p, Initial residual = 1, Final residual = 0.0594274, No Iterations 2
time step continuity errors : sum local = 7.86935e+124, global = 4.16061e+121, cumulative = 4.16061e+121
#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 double Foam::sumProd<double>(Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
#4 Foam::PCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#5 Foam::GAMGSolver::solveCoarsestLevel(Foam::Field<d ouble>&, Foam::Field<double> const&) const at ??:?
#6 Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMa trix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const at ??:?
#7 Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#8 Foam::fvMatrix<double>::solveSegregated(Foam::dict ionary const&) at ??:?
#9 Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:?
#10 ? at ??:?
#11 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#12 ? at ??:?
Floating point exception (core dumped)

Any suggestion in direction will be greatly appreciated. I have attached the initial conditions and checkMesh,

Thank you in advance.:)

Taataa December 28, 2017 00:13

I would suggest you to check the pimpleFoam tutorials and check how they are setup especially this one. Check the schemes and solutions of the tutorial and try to use those.

Anyhow, you can start by setting maxCo to 1 (controlDict), pressure tolerance to 1e-6 (fvSolution).

AliE December 28, 2017 14:29

Hi,

Form the error seems that the linear system for the Uz velocity has problems. Since you have implemented a coded bc, I would say that start from that boundary conidition is non a bad idea... What happens if you use just a fixed value?

alexeym December 28, 2017 14:44

Hi,

@davismcc

Code:

smoothSolver: Solving for Uz, Initial residual = 0.00262526, Final residual = 6.66195e+126, No Iterations 1000
You could start from changing smoothSolver to PBiCG.

Then you can adopt residualControl to check simulation convergence within time step. Then, since you mesh is rather non-orthogonal, you can use at least couple of non-orthogonal correction iterations (start with nNonOrhogonalCorrectors 2). Then you can try to use discretisation schemes, which are more suitable to non-orthogonal meshes (also you can try limited schemes instead of linear for convection terms).

You have got plenty of things to try.

davismcc December 28, 2017 23:13

Hello Everyone,

Thank you for all your help ! I managed to get the simulation to converge from your suggestions.

Thanks again,
Davis


All times are GMT -4. The time now is 16:29.