CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   how to make rhoCentralFoam to write continuity residuals? (http://www.cfd-online.com/Forums/openfoam-solving/117025-how-make-rhocentralfoam-write-continuity-residuals.html)

 immortality April 30, 2013 15:30

how to make rhoCentralFoam to write continuity residuals?

although rhoPimpleFoam writes residuals of continuity equation but rhoCentralFoam doesn't.
how can change rhoCentralFoam to write continuity residuals?
writing part of them is like below:
rhoCentralFoam:
Code:

```turbulence->correct();         runTime.write();         Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"             << "  ClockTime = " << runTime.elapsedClockTime() << " s"             << nl << endl;     }     Info<< "End\n" << endl;     return 0; }```
rhoPimpleFoam:
Code:

```if (pimple.turbCorr())             {                 turbulence->correct();             }         }         runTime.write();         Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"             << "  ClockTime = " << runTime.elapsedClockTime() << " s"             << nl << endl;     }     Info<< "End\n" << endl;     return 0; }```
looks like the same.

 immortality May 2, 2013 13:49

is this work very difficult to do?

 Henning86 May 3, 2013 05:31

what do you mean with residuals?

1. Like in rhoSimpleFoam

2. like in anyother Solver

Solution for 1:

you only have to include 2 files from the rhoSimpleFoam solver, put it in rhosimpleFoam and change the option-file

Solution for 2:

the inviscid part of the rhoCentralfoam is writen explicit so they are no residuals because the are no off diagonal elements.

 immortality May 3, 2013 06:30

Hi
thanks
what are you intending by put two files in rhoSimpleFoam?
my case is viscous,but rhoCentralFoam doen't display any continuity residuals in terminal.

 Henning86 May 3, 2013 06:59

do you mean that with residuals?

rhoCentralFoam 2.)

diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal: Solving for rhoUx, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal: Solving for rhoUy, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal: Solving for rhoUz, Initial residual = 0, Final residual = 0, No Iterations 0
smoothSolver: Solving for Ux, Initial residual = 1.95048866651e-10, Final residual = 1.95048866651e-10, No Iterations 0
smoothSolver: Solving for Uy, Initial residual = 9.73681566024e-10, Final residual = 9.73681566024e-10, No Iterations 0
smoothSolver: Solving for Uz, Initial residual = 1.47465149533e-08, Final residual = 5.51042146969e-17, No Iterations 2
diagonal: Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0
smoothSolver: Solving for e, Initial residual = 9.40976717204e-10, Final residual = 6.94520062811e-16, No Iterations 2
ExecutionTime = 613.71 s ClockTime = 625 s

rhoSimpleFoam 1.):

time step continuity errors : sum local = 26.0848, global = -19.5881, cumulative = -19.5881

if you want to have like it is in rhoSimpleFoam you have to modify the solver just take a look a both solvers.

 immortality May 3, 2013 07:49

but what parts of code i have to change?I have no any idea!

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