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/)
-   -   what reasons may make fluctuations in residuals? (https://www.cfd-online.com/Forums/openfoam-solving/114228-what-reasons-may-make-fluctuations-residuals.html)

adambarfi March 7, 2013 06:46

what reasons may make fluctuations in residuals?
 
1 Attachment(s)
Hi everybody,

what reasons may make fluctuations in residuals?
residuals are attached.

I work with a modified viscoelasticFluidFoam solver that combined whit buoyantBoussinesqSimpleFoam.

thanks
Mostafa

nikesh March 7, 2013 08:13

Such a small fluctuation in residuals is not a problem. You should take care to see whether ur residual reaches below the convergence tolerance or not! Generally we would set the convergence tolerance to be 10^-5 or 10^-6 or less which depends on user.
In your case, the residuals are not decreasing. They are fluctuating around a mean value and that mean value is of the order 10^-3 for the p-residual and 10^-1 for Uy-residual. As we can see, these are pretty high values. We want our residuals to be as small as possible, thats the general concept.

adambarfi March 7, 2013 08:35

Quote:

Originally Posted by nikesh (Post 412285)
Such a small fluctuation in residuals is not a problem. You should take care to see whether ur residual reaches below the convergence tolerance or not! Generally we would set the convergence tolerance to be 10^-5 or 10^-6 or less which depends on user.
In your case, the residuals are not decreasing. They are fluctuating around a mean value and that mean value is of the order 10^-3 for the p-residual and 10^-1 for Uy-residual. As we can see, these are pretty high values. We want our residuals to be as small as possible, thats the general concept.

I meant that what might cause this problem????!?

nikesh March 7, 2013 09:11

There could be numerous reasons for your residuals to be so high. We can't point out one reason for sure. However, you might want to recheck your boundary conditions and schemes used and also the mesh criteria first.

adambarfi March 7, 2013 09:34

Quote:

Originally Posted by nikesh (Post 412302)
There could be numerous reasons for your residuals to be so high. We can't point out one reason for sure. However, you might want to recheck your boundary conditions and schemes used and also the mesh criteria first.

in buoyantboussinesqsimplefoam i just replace the turbulent model with some constants.
alpha, kappa, nu ...

nikesh March 7, 2013 09:47

I might not be able to help you much with this since I don't have experience working on this case.
Maybe somebody with experience in this might!!

ashishdarekar14 May 17, 2021 06:47

Fluctuation in the PimpleFOAM
 
1 Attachment(s)
Hello people

What will be the reason behind the big fluctuation in the residual values, and the simulation is crashing after that??

Thanks in advance :)

Tobermory May 18, 2021 06:41

My dear friend - I wonder whether you realise how impossible it is to answer such a question, based off just a single chart?

Things for you to think about: are your boundaries correct/physical/working as intended? Are the fields behaving physically during this period - if not, where is the error happening - find out why and you might solve your issue.

Finally - what actually are you plotting - residual for every inner iteration? If so, then the saw-tooth behaviour is normal. Try running a tutorial case for example.

ashishdarekar14 May 18, 2021 07:38

1 Attachment(s)
Quote:

Originally Posted by Tobermory (Post 804089)
My dear friend - I wonder whether you realise how impossible it is to answer such a question, based off just a single chart?

Things for you to think about: are your boundaries correct/physical/working as intended? Are the fields behaving physically during this period - if not, where is the error happening - find out why and you might solve your issue.

Finally - what actually are you plotting - residual for every inner iteration? If so, then the saw-tooth behaviour is normal. Try running a tutorial case for example.

Sorry for the incomplete Information,
But I will let you know everything.

1. I am solving a simple FSI-benchmarking case from Wall and Ramm (Attached herewith the test case). If you want more details about how I am solving kindly let me know :)
2. But simply, from OF side -> I am solving this problem using PIMPLE solver (controlDict, FvScheme, FvSolution files are attached herewith)
3. Dynamic Mesh is used for the motion of a flap (dynamicMeshDict also Attached)
4. Mesh: created using the BlockMesh (attached herewith the output of the checkMesh
-> initial and last time step, Last time step is failed due to non orthogonal mesh elements)
5. Also the Simulation stopped after few time steps: with the FPE (shown below)

Code:

Time = 0.0805

PIMPLE: Iteration 1
smoothSolver:  Solving for cellDisplacementx, Initial residual = 0.0509482779987, Final residual = 5.0820900698e-06, No Iterations 73
smoothSolver:  Solving for cellDisplacementy, Initial residual = 0.179955306297, Final residual = 1.78276847317e-05, No Iterations 61
GAMG:  Solving for pcorr, Initial residual = 1, Final residual = 8.99785732436e-05, No Iterations 26
GAMG:  Solving for pcorr, Initial residual = 0.333399937369, Final residual = 5.93490175136e-06, No Iterations 25
time step continuity errors : sum local = 4.24894215131e-08, global = -2.10306284577e-10, cumulative = -3.20959092079e-09
smoothSolver:  Solving for Ux, Initial residual = 0.116746487056, Final residual = 7.41363983302e-06, No Iterations 19
smoothSolver:  Solving for Uy, Initial residual = 0.0796490045324, Final residual = 4.92202324779e-06, No Iterations 20
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const at ??:?
#4  Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMatrix::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 ??:?
#5  Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#6  Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:?
#7  Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/pimpleFoam"
#8  Foam::fvMatrix<double>::solve() in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/pimpleFoam"
#9  ? in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/pimpleFoam"
#10  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#11  ? in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/pimpleFoam"
Floating point exception (core dumped)

6. Residuals plotted using residual function object. No more fluctuations (they are gone) but still the solution is not converging :( (attached herewith the latest graph).

So, Could anyone help me to understand the exact problem and how to tackle that? Any suggestion will be appreciated :)


If you want anything more about my case kindly let me know, I will provide it :)
Thanks in advance :)
Ashish


All times are GMT -4. The time now is 06:41.