rhoSimplecFoam: Update wrt latest relaxation strategy and move into rhoSimpleFoam

This commit is contained in:
Henry
2012-04-04 17:42:44 +01:00
parent 69569cc45e
commit e8bdf072fe
10 changed files with 19 additions and 11 deletions

View File

@ -0,0 +1,9 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
set -x
wclean
wclean rhoPorousMRFSimpleFoam
wclean rhoSimplecFoam
# ----------------------------------------------------------------- end-of-file

View File

@ -4,5 +4,6 @@ set -x
wmake
wmake rhoPorousMRFSimpleFoam
wmake rhoSimplecFoam
# ----------------------------------------------------------------- end-of-file

View File

@ -3,6 +3,7 @@
tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
- fvm::Sp(fvc::div(phi), U)
+ turbulence->divDevRhoReff(U)
);

View File

@ -1,11 +1,13 @@
{
volScalarField K("K", 0.5*magSqr(U));
fvScalarMatrix hEqn
(
fvm::div(phi, h)
- fvm::Sp(fvc::div(phi), h)
- fvm::laplacian(turbulence->alphaEff(), h)
==
- fvc::div(phi, 0.5*magSqr(U), "div(phi,K)")
fvc::div(phi)*K - fvc::div(phi, K)
);
hEqn.relax();

View File

@ -28,7 +28,7 @@ if (simple.transonic())
);
// Relax the pressure equation to ensure diagonal-dominance
pEqn.relax(mesh.equationRelaxationFactor("pEqn"));
pEqn.relax();
pEqn.setReference(pRefCell, pRefValue);

View File

@ -1,5 +1,5 @@
EXE_INC = \
-I../rhoSimpleFoam \
-I.. \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/RASModel \

View File

@ -29,21 +29,17 @@ if (simple.transonic())
(
"phic",
fvc::interpolate(rho/AtU - rho/AU)*fvc::snGrad(p)*mesh.magSf()
+ phid*(fvc::interpolate(p) - fvc::interpolate(p, "UD"))
);
//refCast<mixedFvPatchScalarField>(p.boundaryField()[1]).refValue()
// = p.boundaryField()[1];
fvScalarMatrix pEqn
(
fvm::div(phid, p)
+ fvc::div(phic)
- fvm::Sp(fvc::div(phid), p)
+ fvc::div(phid)*p
- fvm::laplacian(rho/AtU, p)
);
//pEqn.relax();
// Relax the pressure equation to ensure diagonal-dominance
pEqn.relax();
pEqn.setReference(pRefCell, pRefValue);
@ -71,7 +67,6 @@ else
fvScalarMatrix pEqn
(
fvc::div(phiHbyA)
//- fvm::laplacian(rho/AU, p)
- fvm::laplacian(rho/AtU, p)
);