Bugfix: Compressible solver update

Conflicts:
	applications/solvers/compressible/steadyCompressibleFoam/pEqn.H
This commit is contained in:
Hrvoje Jasak 2016-01-05 14:09:02 +00:00
parent dcd102dc08
commit f206e5ffec
35 changed files with 496 additions and 294 deletions

View file

@ -1,20 +0,0 @@
{
# include "rhoEqn.H"
}
{
scalar sumLocalContErr =
sum
(
mag(rho.internalField() - (psi*p)().internalField())
)/sum(rho.internalField());
scalar globalContErr =
sum(rho.internalField() - (psi*p)().internalField())
/sum(rho.internalField());
cumulativeContErr += globalContErr;
Info<< "time step continuity errors : sum local = " << sumLocalContErr
<< ", global = " << globalContErr
<< ", cumulative = " << cumulativeContErr << endl;
}

View file

@ -9,7 +9,9 @@
volScalarField& T = const_cast<volScalarField&>(thermo.T());
volScalarField& p = thermo.p();
volScalarField& e = thermo.e();
const volScalarField& psi = thermo.psi();
volScalarField psis("psi", thermo.psi()/thermo.Cp()*thermo.Cv());
psis.oldTime();
volScalarField rho
(
@ -38,20 +40,6 @@
# include "compressibleCreatePhi.H"
// Store energy source term for under-relaxation
volScalarField pDivU
(
IOobject
(
"pDivU",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
p*fvc::div(phi/fvc::interpolate(rho))
);
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence
(

View file

@ -5,7 +5,15 @@
+ fvm::div(phi, e)
- fvm::laplacian(turbulence->alphaEff(), e)
==
- fvm::SuSp(pDivU/e, e)
- fvm::SuSp
(
p*fvc::div
(
phi/fvc::interpolate(rho)
+ fvc::meshPhi(rho, U)
)/e,
e
)
// viscous heating?
);
@ -40,4 +48,10 @@
}
thermo.correct();
// Recalculate compressibility
psis = thermo.psi()/thermo.Cp()*thermo.Cv();
// Recalculate density
rho = thermo.rho();
}

View file

@ -3,26 +3,37 @@
# include "limitU.H"
surfaceScalarField phid
(
"phid",
fvc::interpolate(psi)*
for (int nonOrth = 0; nonOrth <= nNonOrthCorr; nonOrth++)
{
// Calculate phi for boundary conditions
phi = rhof*
(
(fvc::interpolate(U) & mesh.Sf())
- fvc::meshPhi(rho, U)
)
);
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
surfaceScalarField phid2 = rhoReff/rhof*phi;
surfaceScalarField phid("phid", psisf/rhof*phi);
// Store pressure for under-relaxation
p.storePrevIter();
volScalarField divPhid
(
"divPhid",
fvc::div(phid)
);
fvScalarMatrix pEqn
(
fvm::ddt(psi, p)
fvm::ddt(psis, p)
+ fvm::div(phid, p)
- fvm::laplacian(rho/UEqn.A(), p)
// Convective flux relaxation terms
+ fvm::SuSp(-divPhid, p)
+ divPhid*p
+ fvc::div(phid2)
- fvm::laplacian(rho*rUA, p)
);
if
@ -42,9 +53,10 @@
pEqn.solve(mesh.solutionDict().solver(p.name()));
}
// Calculate the flux
if (nonOrth == nNonOrthCorr)
{
phi = pEqn.flux();
phi = phid2 + pEqn.flux();
}

View file

@ -27,10 +27,11 @@ Application
Description
Transient solver for trans-sonic/supersonic for laminar or turbulent
flow of a compressible gas with support for mesh motion and
topological changes
topological changes.
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
pseudo-transient simulations.
pseudo-transient simulations. The pressure-energy coupling is done
using the Rusche manoeuvre (isentropic compression/expansion).
Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
@ -107,31 +108,25 @@ int main(int argc, char *argv[])
label oCorr = 0;
do
{
// Under-relax pDivU term
pDivU.storePrevIter();
pDivU =
p*fvc::div
(
phi/fvc::interpolate(rho)
+ fvc::meshPhi(rho, U)
);
pDivU.relax();
# include "rhoEqn.H"
# include "eEqn.H"
# include "UEqn.H"
// --- PISO loop
volScalarField rUA = 1.0/UEqn.A();
surfaceScalarField psisf = fvc::interpolate(psis);
surfaceScalarField rhof = fvc::interpolate(rho);
// Needs to be outside of loop since p is changing,
// but psi and rho are not
surfaceScalarField rhoReff = rhof - psisf*fvc::interpolate(p);
for (int corr = 0; corr < nCorr; corr++)
{
# include "pEqn.H"
}
// Recalculate density
rho = thermo.rho();
turbulence->correct();
} while (++oCorr < nOuterCorr);

View file

@ -5,4 +5,20 @@ fvVectorMatrix UEqn
+ turbulence->divDevRhoReff(U)
);
if (oCorr == nOuterCorr - 1)
{
if (mesh.solutionDict().relax("UFinal"))
{
UEqn.relax(mesh.solutionDict().relaxationFactor("UFinal"));
}
else
{
UEqn.relax(1);
}
}
else
{
UEqn.relax();
}
solve(UEqn == -fvc::grad(p));

View file

@ -8,7 +8,9 @@
volScalarField& p = thermo.p();
volScalarField& e = thermo.e();
const volScalarField& psi = thermo.psi();
volScalarField psis("psi", thermo.psi()/thermo.Cp()*thermo.Cv());
psis.oldTime();
volScalarField rho
(
@ -37,7 +39,6 @@
# include "compressibleCreatePhi.H"
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence
(

View file

@ -1,12 +1,42 @@
{
solve
fvScalarMatrix eEqn
(
fvm::ddt(rho, e)
+ fvm::div(phi, e)
- fvm::laplacian(turbulence->alphaEff(), e)
==
- p*fvc::div(phi/fvc::interpolate(rho))
// - fvm::SuSp
// (
// p*fvc::div(phi/fvc::interpolate(rho))/e,
// e
// )
// viscous heating?
);
thermo.correct();
if (oCorr == nOuterCorr - 1)
{
if (mesh.solutionDict().relax("eFinal"))
{
eEqn.relax(mesh.solutionDict().relaxationFactor("eFinal"));
}
else
{
eEqn.relax(1);
}
}
else
{
eEqn.relax();
}
eEqn.solve();
thermo.correct();
// Recalculate compressibility
psis = thermo.psi()/thermo.Cp()*thermo.Cv();
// Recalculate density
rho = thermo.rho();
}

View file

@ -1,37 +1,52 @@
rho = thermo.rho();
volScalarField rUA = 1.0/UEqn.A();
U = rUA*UEqn.H();
surfaceScalarField phid
(
"phid",
fvc::interpolate(psi)
*(
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
)
);
{
U = UEqn.H()/UEqn.A();
for (int nonOrth = 0; nonOrth <= nNonOrthCorr; nonOrth++)
{
// Calculate phi for boundary conditions
phi = rhof*
(
(fvc::interpolate(U) & mesh.Sf())
);
surfaceScalarField phid2 = rhoReff/rhof*phi;
surfaceScalarField phid("phid", psisf/rhof*phi);
// Store pressure for under-relaxation
p.storePrevIter();
volScalarField divPhid
(
"divPhid",
fvc::div(phid)
);
fvScalarMatrix pEqn
(
fvm::ddt(psi, p)
fvm::ddt(psis, p)
+ fvm::div(phid, p)
// Convective flux relaxation terms
+ fvm::SuSp(-divPhid, p)
+ divPhid*p
+ fvc::div(phid2)
- fvm::laplacian(rho*rUA, p)
);
pEqn.solve();
// Calculate the flux
if (nonOrth == nNonOrthCorr)
{
phi = pEqn.flux();
}
phi = phid2 + pEqn.flux();
}
// Relax the pressure
p.relax();
}
#include "rhoEqn.H"
# include "compressibleContinuityErrs.H"
U -= rUA*fvc::grad(p);
U -= fvc::grad(p)/UEqn.A();
U.correctBoundaryConditions();
}

View file

@ -25,8 +25,17 @@ Application
sonicFoam
Description
Transient solver for trans-sonic/supersonic, laminar or turbulent flow
of a compressible gas.
Transient solver for trans-sonic/supersonic for laminar or turbulent
flow of a compressible gas.
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
pseudo-transient simulations. The pressure-energy coupling is done
using the Rusche manoeuvre (isentropic compression/expansion).
Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
Author
Hrvoje Jasak, Wikki Ltd. All rights reserved.
\*---------------------------------------------------------------------------*/
@ -48,21 +57,34 @@ int main(int argc, char *argv[])
Info<< "\nStarting time loop\n" << endl;
while (runTime.loop())
while (runTime.run())
{
# include "readTimeControls.H"
# include "readPIMPLEControls.H"
# include "compressibleCourantNo.H"
# include "setDeltaT.H"
runTime++;
Info<< "deltaT = " << runTime.deltaT().value() << nl << endl;
Info<< "Time = " << runTime.timeName() << nl << endl;
# include "readPISOControls.H"
# include "compressibleCourantNo.H"
// --- PIMPLE loop
label oCorr = 0;
do
{
# include "rhoEqn.H"
# include "eEqn.H"
# include "UEqn.H"
# include "eEqn.H"
// --- PISO loop
volScalarField rUA = 1.0/UEqn.A();
surfaceScalarField psisf = fvc::interpolate(psis);
surfaceScalarField rhof = fvc::interpolate(rho);
// Needs to be outside of loop since p is changing,
// but psi and rho are not
surfaceScalarField rhoReff = rhof - psisf*fvc::interpolate(p);
for (int corr = 0; corr < nCorr; corr++)
{
@ -70,8 +92,7 @@ int main(int argc, char *argv[])
}
turbulence->correct();
rho = thermo.rho();
} while (++oCorr < nOuterCorr);
runTime.write();
@ -82,7 +103,7 @@ int main(int argc, char *argv[])
Info<< "End\n" << endl;
return 0;
return(0);
}

View file

@ -2,7 +2,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/RASModel \
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/RASModel
EXE_LIBS = \
-lfiniteVolume \

View file

@ -1,33 +1,23 @@
{
volScalarField rUA = 1.0/UEqn.A();
<<<<<<< HEAD
=======
surfaceScalarField psisf = fvc::interpolate(psis);
surfaceScalarField rhof = fvc::interpolate(rho);
// Needs to be outside of loop since p is changing, but psi and rho are not
surfaceScalarField rhoReff = rhof - psisf*fvc::interpolate(p);
>>>>>>> 07efd81... Updated enthalpy equation
// --- PISO loop
for (int corr = 0; corr < nCorr; corr++)
{
U = rUA*UEqn.H();
// Execute ddtPhiCorr before recalculating flux
// HJ, 27/Apr/2010
surfaceScalarField phid
(
"phid",
fvc::interpolate(psi)*
(
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
)
);
// Calculate phi for boundary conditions
phi = fvc::interpolate(rho*U) & mesh.Sf();
phi = rhof*fvc::interpolate(U) & mesh.Sf();
surfaceScalarField phid2 = rhoReff/rhof*phi;
surfaceScalarField phid("phid", psisf/rhof*phi);
p.storePrevIter();
@ -35,8 +25,9 @@
{
fvScalarMatrix pEqn
(
fvm::ddt(psi, p)
fvm::ddt(psis, p)
+ fvm::div(phid, p)
+ fvc::div(phid2)
- fvm::laplacian(rho*rUA, p)
);
@ -51,7 +42,7 @@
// Calculate the flux
if (nonOrth == nNonOrthCorr)
{
phi = pEqn.flux();
phi = phid2 + pEqn.flux();
}
}

View file

@ -17,7 +17,7 @@
==
// ddt(p) term removed: steady-state. HJ, 27/Apr/2010
fvc::div(faceU, p, "div(U,p)")
- p*fvc::div(faceU))
- p*fvc::div(faceU)
// Viscous heating: note sign (devRhoReff has a minus in it)
- (turbulence->devRhoReff() && fvc::grad(Urel))
);

View file

@ -28,17 +28,17 @@ boundaryField
outlet
{
type waveTransmissive;
field p;
phi phi;
rho rho;
psi psi;
gamma 1.4;
fieldInf 1;
lInf 3;
inletOutlet off;
correctSupercritical off;
value uniform 1;
type zeroGradient;
// field p;
// phi phi;
// rho rho;
// psi psi;
// gamma 1.4;
// fieldInf 1;
// lInf 3;
// inletOutlet off;
// correctSupercritical on;
// value uniform 1;
}
bottom

View file

View file

@ -3,7 +3,7 @@
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{

View file

@ -29,7 +29,7 @@ deltaT 0.002;
writeControl runTime;
writeInterval 0.5;
writeInterval 1;
purgeWrite 0;
@ -37,7 +37,7 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression compressed;
timeFormat general;
@ -45,4 +45,59 @@ timePrecision 6;
runTimeModifiable yes;
adjustTimeStep no;
maxCo 10;
functions
(
Mach
{
type MachNumber;
UName U;
functionObjectLibs ("libutilityFunctionObjects.so");
}
minMaxU
{
type minMaxField;
// Where to load it from (if not already in solver)
functionObjectLibs ("libfieldFunctionObjects.so");
name U;
}
minMaxP
{
type minMaxField;
// Where to load it from (if not already in solver)
functionObjectLibs ("libfieldFunctionObjects.so");
name p;
}
minMaxRho
{
type minMaxField;
// Where to load it from (if not already in solver)
functionObjectLibs ("libfieldFunctionObjects.so");
name rho;
}
minMaxT
{
type minMaxField;
// Where to load it from (if not already in solver)
functionObjectLibs ("libfieldFunctionObjects.so");
name T;
}
);
// ************************************************************************* //

View file

@ -23,26 +23,20 @@ ddtSchemes
gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
grad(U) Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss upwind;
div(phid,p) Gauss limitedLinear 1;
div(phi,e) Gauss limitedLinear 1;
div(phiU,p) Gauss limitedLinear 1;
div((muEff*dev2(grad(U).T()))) Gauss linear 1;
div(phid,p) Gauss upwind;
div(phi,e) Gauss upwind;
div((muEff*dev2(grad(U).T()))) Gauss linear;
}
laplacianSchemes
{
default none;
laplacian((rho*(1|A(U))),p) Gauss linear corrected;
laplacian(muEff,U) Gauss linear corrected;
laplacian(alphaEff,e) Gauss linear corrected;
default Gauss linear limited 0.5;
}
interpolationSchemes

View file

@ -17,41 +17,37 @@ FoamFile
solvers
{
rho
{}
p
{
solver PBiCG;
solver BiCGStab;
preconditioner DILU;
tolerance 1e-06;
tolerance 1e-07;
relTol 0;
}
U
{
solver PBiCG;
solver BiCGStab;
preconditioner DILU;
tolerance 1e-05;
relTol 0;
}
rho
{
solver PCG;
preconditioner DIC;
tolerance 1e-05;
tolerance 1e-07;
relTol 0;
}
e
{
solver PBiCG;
solver BiCGStab;
preconditioner DILU;
tolerance 1e-05;
tolerance 1e-07;
relTol 0;
}
}
PISO
PIMPLE
{
nOuterCorrectors 1;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
}

View file

@ -4,6 +4,7 @@
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
rm -rf 0
cp -r 0.org 0
cleanSamples
\rm -rf 0
cp -r 0.org 0

View file

@ -45,4 +45,7 @@ timePrecision 6;
runTimeModifiable yes;
adjustTimeStep no;
maxCo 10;
// ************************************************************************* //

View file

@ -22,27 +22,24 @@ ddtSchemes
gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
grad(U) Gauss linear;
default cellLimited Gauss linear 1;
}
divSchemes
{
default none;
div(phi,U) Gauss upwind;
div(phid,p) Gauss limitedLinear 1;
div(phi,e) Gauss limitedLinear 1;
div(phiU,p) Gauss limitedLinear 1;
div((muEff*dev2(grad(U).T()))) Gauss linear 1;
div(phi,U) Gauss vanLeer;
div(phid,p) Gauss vanLeer;
div(phi,e) Gauss vanLeer;
div(phiU,p) Gauss vanLeer;
div((muEff*dev2(grad(U).T()))) Gauss linear;
div(interpolate(rho),U) Gauss linear;
}
laplacianSchemes
{
default none;
laplacian((rho*(1|A(U))),p) Gauss linear corrected;
laplacian(muEff,U) Gauss linear corrected;
laplacian(alphaEff,e) Gauss linear corrected;
default Gauss linear corrected;
}
interpolationSchemes

View file

@ -19,17 +19,17 @@ solvers
{
p
{
solver PBiCG;
solver BiCGStab;
preconditioner DILU;
tolerance 1e-15;
tolerance 1e-8;
relTol 0;
}
U
{
solver PBiCG;
solver BiCGStab;
preconditioner DILU;
tolerance 1e-15;
tolerance 1e-8;
relTol 0;
}
@ -37,21 +37,22 @@ solvers
{
solver PCG;
preconditioner DIC;
tolerance 1e-15;
tolerance 1e-8;
relTol 0;
}
e
{
solver PBiCG;
solver BiCGStab;
preconditioner DILU;
tolerance 1e-15;
tolerance 1e-8;
relTol 0;
}
}
PISO
PIMPLE
{
nOuterCorrectors 1;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
}

View file

@ -21,4 +21,6 @@ turbulence on;
printCoeffs on;
nuRatio 1000;
// ************************************************************************* //

View file

@ -3,7 +3,7 @@
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{

View file

@ -25,11 +25,11 @@ stopAt endTime;
endTime 0.01;
deltaT 4e-08;
deltaT 5e-08;
writeControl runTime;
writeInterval 2e-04;
writeInterval 1e-05;
purgeWrite 0;
@ -45,8 +45,11 @@ timePrecision 6;
runTimeModifiable yes;
adjustTimeStep no;
maxCo 10;
functions
{
(
forces
{
type forceCoeffs;
@ -69,6 +72,54 @@ functions
lRef 1;
Aref 1;
}
Mach
{
type MachNumber;
UName U;
functionObjectLibs ("libutilityFunctionObjects.so");
}
minMaxU
{
type minMaxField;
// Where to load it from (if not already in solver)
functionObjectLibs ("libfieldFunctionObjects.so");
name U;
}
minMaxP
{
type minMaxField;
// Where to load it from (if not already in solver)
functionObjectLibs ("libfieldFunctionObjects.so");
name p;
}
minMaxRho
{
type minMaxField;
// Where to load it from (if not already in solver)
functionObjectLibs ("libfieldFunctionObjects.so");
name rho;
}
minMaxT
{
type minMaxField;
// Where to load it from (if not already in solver)
functionObjectLibs ("libfieldFunctionObjects.so");
name T;
}
);
// ************************************************************************* //

View file

@ -41,13 +41,7 @@ divSchemes
laplacianSchemes
{
default none;
laplacian(muEff,U) Gauss linear limited 0.5;
laplacian(DkEff,k) Gauss linear limited 0.5;
laplacian(DREff,R) Gauss linear limited 0.5;
laplacian(DepsilonEff,epsilon) Gauss linear limited 0.5;
laplacian((rho*(1|A(U))),p) Gauss linear limited 0.5;
laplacian(alphaEff,e) Gauss linear limited 0.5;
default Gauss linear limited 0.5;
}
interpolationSchemes

View file

@ -17,41 +17,38 @@ FoamFile
solvers
{
rho
{}
p
{
solver PBiCG;
solver BiCGStab;
preconditioner DILU;
tolerance 1e-12;
relTol 0;
}
rho
{
solver PCG;
preconditioner DIC;
tolerance 1e-08;
minIter 1;
tolerance 1e-07;
relTol 0;
}
U
{
solver PBiCG;
solver BiCGStab;
preconditioner DILU;
tolerance 1e-08;
tolerance 1e-07;
relTol 0;
}
e
{
solver PBiCG;
solver BiCGStab;
preconditioner DILU;
tolerance 1e-08;
tolerance 1e-07;
relTol 0;
}
k
{
solver PBiCG;
solver BiCGStab;
preconditioner DILU;
tolerance 1e-08;
relTol 0;
@ -59,7 +56,7 @@ solvers
epsilon
{
solver PBiCG;
solver BiCGStab;
preconditioner DILU;
tolerance 1e-08;
relTol 0;
@ -74,10 +71,23 @@ solvers
}
}
PISO
SIMPLE
{
nCorrectors 2;
nNonOrthogonalCorrectors 2;
}
PIMPLE
{
nOuterCorrectors 2;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
}
relaxationFactors
{
U 0.8;
p 0.8;
e 0.8;
}
// ************************************************************************* //

View file

@ -16,7 +16,7 @@ FoamFile
dimensions [0 1 -1 0 0 0 0];
internalField uniform (650 0 0);
internalField uniform (0 0 0);
boundaryField
{

View file

@ -28,17 +28,7 @@ boundaryField
outlet
{
type waveTransmissive;
field p;
phi phi;
rho rho;
psi psi;
gamma 1.3;
fieldInf 100000;
lInf 1;
inletOutlet off;
correctSupercritical off;
value uniform 100000;
type zeroGradient;
}
bottomWall

0
tutorials/compressible/sonicFoam/ras/prism/Allrun Normal file → Executable file
View file

View file

@ -23,9 +23,9 @@ startTime 0;
stopAt endTime;
endTime 0.0004;
endTime 0.005;
deltaT 5e-07;
deltaT 1e-06;
writeControl runTime;
@ -37,7 +37,7 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression compressed;
timeFormat general;
@ -45,4 +45,59 @@ timePrecision 6;
runTimeModifiable yes;
adjustTimeStep no;
maxCo 10;
functions
(
Mach
{
type MachNumber;
UName U;
functionObjectLibs ("libutilityFunctionObjects.so");
}
minMaxU
{
type minMaxField;
// Where to load it from (if not already in solver)
functionObjectLibs ("libfieldFunctionObjects.so");
name U;
}
minMaxP
{
type minMaxField;
// Where to load it from (if not already in solver)
functionObjectLibs ("libfieldFunctionObjects.so");
name p;
}
minMaxRho
{
type minMaxField;
// Where to load it from (if not already in solver)
functionObjectLibs ("libfieldFunctionObjects.so");
name rho;
}
minMaxT
{
type minMaxField;
// Where to load it from (if not already in solver)
functionObjectLibs ("libfieldFunctionObjects.so");
name T;
}
);
// ************************************************************************* //

View file

@ -22,32 +22,26 @@ ddtSchemes
gradSchemes
{
default Gauss linear;
default cellLimited Gauss linear 1;
}
divSchemes
{
default none;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss upwind;
div(phid,p) Gauss upwind;
div(phi,e) Gauss upwind;
div((muEff*dev2(grad(U).T()))) Gauss linear;
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div(phi,R) Gauss upwind;
div(R) Gauss linear;
div(phid,p) Gauss limitedLinear 1;
div(phiU,p) Gauss limitedLinear 1;
div(phi,e) Gauss limitedLinear 1;
div((muEff*dev2(grad(U).T()))) Gauss linear;
}
laplacianSchemes
{
default none;
laplacian(muEff,U) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DREff,R) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
laplacian((rho*(1|A(U))),p) Gauss linear corrected;
laplacian(alphaEff,e) Gauss linear corrected;
default Gauss linear limited 0.5;
}
interpolationSchemes

View file

@ -17,41 +17,36 @@ FoamFile
solvers
{
rho
{}
p
{
solver PBiCG;
solver BiCGStab;
preconditioner DILU;
tolerance 1e-08;
relTol 0;
}
rho
{
solver PCG;
preconditioner DIC;
tolerance 1e-05;
relTol 0;
}
U
{
solver PBiCG;
solver BiCGStab;
preconditioner DILU;
tolerance 1e-05;
tolerance 1e-08;
relTol 0;
}
e
{
solver PBiCG;
solver BiCGStab;
preconditioner DILU;
tolerance 1e-05;
tolerance 1e-08;
relTol 0;
}
k
{
solver PBiCG;
solver BiCGStab;
preconditioner DILU;
tolerance 1e-08;
relTol 0;
@ -59,7 +54,7 @@ solvers
epsilon
{
solver PBiCG;
solver BiCGStab;
preconditioner DILU;
tolerance 1e-08;
relTol 0;
@ -67,17 +62,18 @@ solvers
R
{
solver PBiCG;
solver BiCGStab;
preconditioner DILU;
tolerance 1e-05;
relTol 0;
}
}
PISO
PIMPLE
{
nOuterCorrectors 2;
nCorrectors 2;
nNonOrthogonalCorrectors 2;
nNonOrthogonalCorrectors 0;
}
// ************************************************************************* //