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

How to get initial residuals for U components during runtime?

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   April 11, 2011, 11:49
Default How to get initial residuals for U components during runtime?
  #1
Senior Member
 
Florian Krause
Join Date: Mar 2009
Location: Munich
Posts: 103
Rep Power: 17
florian_krause is on a distinguished road
Dear all,
I use a modified simpleFoam in OpenFOAM-1.7.x. I simulate a laminar pipe flow with uniform fixed value inlet boundary conditons and zeroGradient outlet boundary conditions. I've set up the case as a wedge using wedge boundary conditions. so far so good...

Now I want to stop the simulations if a pre-defined convergence criterion is satisfied for pressure p and the axial (x) and wall-normal (y) velocity component.

If I use

tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
+ turbulence->divDevReff(U)
);

UEqn().relax();

eqnResidualU = solve
(
UEqn() == -fvc::grad(p)
).initialResidual();

maxResidualU = max(eqnResidualU, maxResidualU);


then I get the initial residuals for all three velocity components. And using

if (maxResidualU < convergenceCriterionU && maxResidualP < convergenceCriterionP)
{
Info<< "reached convergence criterion for U and p"<< endl;
runTime.writeAndEnd();
Info<< "latestTime = " << runTime.timeName() << endl;
}


I perform the actual convergence check on all three velocity components.

As mentioned above, for this wedge case, I want to stop the calculation if only the x and y component of U satisfy the pre-defined convergence criterion.

Does anyone know how to do that? As always, any help is appreciated!

Best,
Florian
florian_krause is offline   Reply With Quote

 


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
transsonic nozzle with rhoSimpleFoam Unseen OpenFOAM Running, Solving & CFD 8 July 1, 2022 06:54
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33
Differences between serial and parallel runs carsten OpenFOAM Bugs 11 September 12, 2008 11:16
Unknown error sivakumar OpenFOAM Pre-Processing 9 September 9, 2008 12:53


All times are GMT -4. The time now is 14:26.