mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
rhoSimplecFoam: Update wrt latest relaxation strategy and move into rhoSimpleFoam
This commit is contained in:
9
applications/solvers/compressible/rhoSimpleFoam/Allwclean
Executable file
9
applications/solvers/compressible/rhoSimpleFoam/Allwclean
Executable 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
|
||||
@ -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)
|
||||
);
|
||||
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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 \
|
||||
@ -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)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user