Skip to content
Snippets Groups Projects
Commit e8bdf072 authored by Henry's avatar Henry
Browse files

rhoSimplecFoam: Update wrt latest relaxation strategy and move into rhoSimpleFoam

parent 69569cc4
Branches
Tags
No related merge requests found
Showing
with 19 additions and 11 deletions
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
set -x
wclean
wclean rhoPorousMRFSimpleFoam
wclean rhoSimplecFoam
# ----------------------------------------------------------------- end-of-file
......@@ -4,5 +4,6 @@ set -x
wmake
wmake rhoPorousMRFSimpleFoam
wmake rhoSimplecFoam
# ----------------------------------------------------------------- end-of-file
......@@ -3,6 +3,7 @@
tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
- fvm::Sp(fvc::div(phi), U)
+ turbulence->divDevRhoReff(U)
);
......
{
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();
......
......@@ -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);
......
EXE_INC = \
-I../rhoSimpleFoam \
-I.. \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/RASModel \
......
......@@ -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)
);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment