rhoSimplecFoam: further developments

not entirely satisfactory
This commit is contained in:
Henry
2010-11-12 12:13:28 +00:00
parent 5f96d12654
commit 8490014bf6
4 changed files with 9 additions and 41 deletions

View File

@ -1,11 +0,0 @@
// Solve the Momentum equation
tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
);
UEqn().relax();
solve(UEqn() == -fvc::grad(p));

View File

@ -1,28 +0,0 @@
{
fvScalarMatrix hEqn
(
fvm::div(phi, h)
- fvm::Sp(fvc::div(phi), h)
- fvm::laplacian(turbulence->alphaEff(), h)
==
fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p, "div(U,p)"))
- p*fvc::div(phi/fvc::interpolate(rho))
);
hEqn.relax();
hEqn.solve();
thermo.correct();
rho = thermo.rho();
if (!transonic)
{
rho.relax();
}
Info<< "rho max/min : "
<< max(rho).value() << " "
<< min(rho).value() << endl;
}

View File

@ -1,3 +1,8 @@
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.relax();
volScalarField p0 = p;
volScalarField AU = UEqn().A();
@ -24,8 +29,8 @@ if (transonic)
+ phid*(fvc::interpolate(p) - fvc::interpolate(p, "UD"))
);
refCast<mixedFvPatchScalarField>(p.boundaryField()[1]).refValue()
= p.boundaryField()[1];
//refCast<mixedFvPatchScalarField>(p.boundaryField()[1]).refValue()
// = p.boundaryField()[1];
fvScalarMatrix pEqn
(
@ -35,6 +40,7 @@ if (transonic)
+ fvc::div(phid)*p
- fvm::laplacian(rho/AtU, p)
);
//pEqn.relax();
pEqn.setReference(pRefCell, pRefValue);

View File

@ -57,6 +57,7 @@ int main(int argc, char *argv[])
#include "readSIMPLEControls.H"
p.storePrevIter();
rho.storePrevIter();
if (!transonic)
{