mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
rhoSimplecFoam: further developments
not entirely satisfactory
This commit is contained in:
@ -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));
|
|
||||||
@ -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;
|
|
||||||
}
|
|
||||||
@ -1,3 +1,8 @@
|
|||||||
|
rho = thermo.rho();
|
||||||
|
rho = max(rho, rhoMin);
|
||||||
|
rho = min(rho, rhoMax);
|
||||||
|
rho.relax();
|
||||||
|
|
||||||
volScalarField p0 = p;
|
volScalarField p0 = p;
|
||||||
|
|
||||||
volScalarField AU = UEqn().A();
|
volScalarField AU = UEqn().A();
|
||||||
@ -24,8 +29,8 @@ if (transonic)
|
|||||||
+ phid*(fvc::interpolate(p) - fvc::interpolate(p, "UD"))
|
+ phid*(fvc::interpolate(p) - fvc::interpolate(p, "UD"))
|
||||||
);
|
);
|
||||||
|
|
||||||
refCast<mixedFvPatchScalarField>(p.boundaryField()[1]).refValue()
|
//refCast<mixedFvPatchScalarField>(p.boundaryField()[1]).refValue()
|
||||||
= p.boundaryField()[1];
|
// = p.boundaryField()[1];
|
||||||
|
|
||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
(
|
(
|
||||||
@ -35,6 +40,7 @@ if (transonic)
|
|||||||
+ fvc::div(phid)*p
|
+ fvc::div(phid)*p
|
||||||
- fvm::laplacian(rho/AtU, p)
|
- fvm::laplacian(rho/AtU, p)
|
||||||
);
|
);
|
||||||
|
//pEqn.relax();
|
||||||
|
|
||||||
pEqn.setReference(pRefCell, pRefValue);
|
pEqn.setReference(pRefCell, pRefValue);
|
||||||
|
|
||||||
|
|||||||
@ -57,6 +57,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "readSIMPLEControls.H"
|
#include "readSIMPLEControls.H"
|
||||||
|
|
||||||
p.storePrevIter();
|
p.storePrevIter();
|
||||||
|
rho.storePrevIter();
|
||||||
|
|
||||||
if (!transonic)
|
if (!transonic)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user