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/)
-   -   Problems understanding some piso details (https://www.cfd-online.com/Forums/openfoam-solving/59541-problems-understanding-some-piso-details.html)

tehache July 27, 2007 03:33

Hi everybody, From icoFoam:
 
Hi everybody,

From icoFoam:

fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
- fvm::laplacian(nu, U)
);

solve(UEqn == -fvc::grad(p));

// --- PISO loop

for (int corr=0; corr<nCorr; corr++)
{
volScalarField rUA = 1.0/UEqn.A();

U = rUA*UEqn.H();
phi = (fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, U, phi);

adjustPhi(phi, U, p);

for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pEqn
(
fvm::laplacian(rUA, p) == fvc::div(phi)
);

pEqn.setReference(pRefCell, pRefValue);
pEqn.solve();

if (nonOrth == nNonOrthCorr)
{
phi -= pEqn.flux();
}
}

# include "continuityErrs.H"

U -= rUA*fvc::grad(p);
U.correctBoundaryConditions();
}



Question:

Inside the loop UEqn is not beeig re-build.
Should rUA, or UEqn.A() and UEqn.H() not remain the same?
Why then is this beein repeated all the time?

volScalarField rUA = 1.0/UEqn.A();

U = rUA*UEqn.H();

Thank you very much for any hint!

Thomas

stephan July 27, 2007 03:52

hi, you should search the f
 
hi,

you should search the forum - this question was already answered.
greeting
stephan

tehache July 27, 2007 04:25

finally found it, sorry... To
 
finally found it, sorry...
To whom it may interest,too:

By Hrvoje Jasak on Thursday, August 04, 2005 - 12:40 pm: Edit Post

Not so stupid: UEqn.H() uses the current value of U to evaluate itself and that's where the predicted value gets into the game.

stephan July 27, 2007 06:02

hi, no problem - nice if i
 
hi,

no problem - nice if i could help you ...
greetings
stephan


All times are GMT -4. The time now is 12:50.