ENH: Updated heat transfer solvers and tutorials to use p_rgh

This commit is contained in:
andy
2010-10-06 17:47:53 +01:00
parent aadacc5812
commit 590e2c3a52
128 changed files with 1255 additions and 1780 deletions

View File

@ -12,7 +12,7 @@
); );
TEqn.relax(); TEqn.relax();
TEqn.solve(); TEqn.solve(mesh.solver(T.select(finalIter)));
rhok = 1.0 - beta*(T - TRef); rhok = 1.0 - beta*(T - TRef);
} }

View File

@ -18,9 +18,10 @@
fvc::reconstruct fvc::reconstruct
( (
( (
fvc::interpolate(rhok)*(g & mesh.Sf()) - ghf*fvc::snGrad(rhok)
- fvc::snGrad(p)*mesh.magSf() - fvc::snGrad(p_rgh)
) )*mesh.magSf()
) ),
mesh.solver(U.select(finalIter))
); );
} }

View File

@ -87,7 +87,7 @@ int main(int argc, char *argv[])
if (nOuterCorr != 1) if (nOuterCorr != 1)
{ {
p.storePrevIter(); p_rgh.storePrevIter();
} }
#include "UEqn.H" #include "UEqn.H"

View File

@ -14,12 +14,12 @@
mesh mesh
); );
Info<< "Reading field p\n" << endl; Info<< "Reading field p_rgh\n" << endl;
volScalarField p volScalarField p_rgh
( (
IOobject IOobject
( (
"p", "p_rgh",
runTime.timeName(), runTime.timeName(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ,
@ -52,6 +52,18 @@
incompressible::RASModel::New(U, phi, laminarTransport) incompressible::RASModel::New(U, phi, laminarTransport)
); );
// Kinematic density for buoyancy force
volScalarField rhok
(
IOobject
(
"rhok",
runTime.timeName(),
mesh
),
1.0 - beta*(T - TRef)
);
// kinematic turbulent thermal thermal conductivity m2/s // kinematic turbulent thermal thermal conductivity m2/s
Info<< "Reading field kappat\n" << endl; Info<< "Reading field kappat\n" << endl;
volScalarField kappat volScalarField kappat
@ -67,25 +79,41 @@
mesh mesh
); );
Info<< "Calculating field g.h\n" << endl;
volScalarField gh("gh", g & mesh.C());
surfaceScalarField ghf("ghf", g & mesh.Cf());
volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
p_rgh + rhok*gh
);
label pRefCell = 0; label pRefCell = 0;
scalar pRefValue = 0.0; scalar pRefValue = 0.0;
setRefCell setRefCell
( (
p, p,
p_rgh,
mesh.solutionDict().subDict("PIMPLE"), mesh.solutionDict().subDict("PIMPLE"),
pRefCell, pRefCell,
pRefValue pRefValue
); );
if (p_rgh.needReference())
// Kinematic density for buoyancy force {
volScalarField rhok p += dimensionedScalar
(
IOobject
( (
"rhok", "p",
runTime.timeName(), p.dimensions(),
mesh pRefValue - getRefCellValue(p, pRefCell)
), );
1.0 - beta*(T - TRef) }
);

View File

@ -7,22 +7,23 @@
phi = (fvc::interpolate(U) & mesh.Sf()) phi = (fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, U, phi); + fvc::ddtPhiCorr(rUA, U, phi);
surfaceScalarField buoyancyPhi = surfaceScalarField buoyancyPhi = rUAf*ghf*fvc::snGrad(rhok)*mesh.magSf();
rUAf*fvc::interpolate(rhok)*(g & mesh.Sf()); phi -= buoyancyPhi;
phi += buoyancyPhi;
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{ {
fvScalarMatrix pEqn fvScalarMatrix p_rghEqn
( (
fvm::laplacian(rUAf, p) == fvc::div(phi) fvm::laplacian(rUAf, p_rgh) == fvc::div(phi)
); );
pEqn.solve p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
p_rghEqn.solve
( (
mesh.solver mesh.solver
( (
p.select p_rgh.select
( (
( (
finalIter finalIter
@ -36,17 +37,30 @@
if (nonOrth == nNonOrthCorr) if (nonOrth == nNonOrthCorr)
{ {
// Calculate the conservative fluxes // Calculate the conservative fluxes
phi -= pEqn.flux(); phi -= p_rghEqn.flux();
// Explicitly relax pressure for momentum corrector // Explicitly relax pressure for momentum corrector
p.relax(); p_rgh.relax();
// Correct the momentum source with the pressure gradient flux // Correct the momentum source with the pressure gradient flux
// calculated from the relaxed pressure // calculated from the relaxed pressure
U += rUA*fvc::reconstruct((buoyancyPhi - pEqn.flux())/rUAf); U -= rUA*fvc::reconstruct((buoyancyPhi + p_rghEqn.flux())/rUAf);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
} }
} }
#include "continuityErrs.H" #include "continuityErrs.H"
p = p_rgh + rhok*gh;
if (p_rgh.needReference())
{
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pRefCell)
);
p_rgh = p - rhok*gh;
}
} }

View File

@ -96,29 +96,23 @@
p_rgh + rhok*gh p_rgh + rhok*gh
); );
label p_rghRefCell = 0; label pRefCell = 0;
scalar p_rghRefValue = 0.0; scalar pRefValue = 0.0;
setRefCell setRefCell
( (
p,
p_rgh, p_rgh,
mesh.solutionDict().subDict("SIMPLE"), mesh.solutionDict().subDict("SIMPLE"),
p_rghRefCell, pRefCell,
p_rghRefValue pRefValue
); );
scalar pRefValue = 0.0;
if (p_rgh.needReference()) if (p_rgh.needReference())
{ {
pRefValue = readScalar
(
mesh.solutionDict().subDict("SIMPLE").lookup("pRefValue")
);
p += dimensionedScalar p += dimensionedScalar
( (
"p", "p",
p.dimensions(), p.dimensions(),
pRefValue - getRefCellValue(p, p_rghRefCell) pRefValue - getRefCellValue(p, pRefCell)
); );
} }

View File

@ -18,17 +18,9 @@
fvm::laplacian(rUAf, p_rgh) == fvc::div(phi) fvm::laplacian(rUAf, p_rgh) == fvc::div(phi)
); );
p_rghEqn.setReference(p_rghRefCell, p_rghRefValue); p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
// retain the residual from the first iteration p_rghEqn.solve();
if (nonOrth == 0)
{
p_rghEqn.solve();
}
else
{
p_rghEqn.solve();
}
if (nonOrth == nNonOrthCorr) if (nonOrth == nNonOrthCorr)
{ {
@ -55,7 +47,8 @@
( (
"p", "p",
p.dimensions(), p.dimensions(),
pRefValue - getRefCellValue(p, p_rghRefCell) pRefValue - getRefCellValue(p, pRefCell)
); );
p_rgh = p - rhok*gh;
} }
} }

View File

@ -17,8 +17,11 @@
== ==
fvc::reconstruct fvc::reconstruct
( (
fvc::interpolate(rho)*(g & mesh.Sf()) (
- fvc::snGrad(p)*mesh.magSf() - ghf*fvc::snGrad(rho)
) - fvc::snGrad(p_rgh)
)*mesh.magSf()
),
mesh.solver(U.select(finalIter))
); );
} }

View File

@ -80,7 +80,7 @@ int main(int argc, char *argv[])
if (nOuterCorr != 1) if (nOuterCorr != 1)
{ {
p.storePrevIter(); p_rgh.storePrevIter();
} }
#include "UEqn.H" #include "UEqn.H"

View File

@ -53,15 +53,30 @@
) )
); );
Info<< "Calculating field g.h\n" << endl;
volScalarField gh("gh", g & mesh.C());
surfaceScalarField ghf("ghf", g & mesh.Cf());
Info<< "Reading field p_rgh\n" << endl;
volScalarField p_rgh
(
IOobject
(
"p_rgh",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
// Force p_rgh to be consistent with p
p_rgh = p - rho*gh;
Info<< "Creating field DpDt\n" << endl; Info<< "Creating field DpDt\n" << endl;
volScalarField DpDt volScalarField DpDt
( (
"DpDt", "DpDt",
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p) fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
); );
thermo.correct();
dimensionedScalar initialMass = fvc::domainIntegrate(rho);
dimensionedScalar totalVolume = sum(mesh.V());

View File

@ -9,7 +9,7 @@
); );
hEqn.relax(); hEqn.relax();
hEqn.solve(); hEqn.solve(mesh.solver(h.select(finalIter)));
thermo.correct(); thermo.correct();
} }

View File

@ -1,11 +1,9 @@
{ {
bool closedVolume = p.needReference();
rho = thermo.rho(); rho = thermo.rho();
// Thermodynamic density needs to be updated by psi*d(p) after the // Thermodynamic density needs to be updated by psi*d(p) after the
// pressure solution - done in 2 parts. Part 1: // pressure solution - done in 2 parts. Part 1:
thermo.rho() -= psi*p; thermo.rho() -= psi*p_rgh;
volScalarField rUA = 1.0/UEqn.A(); volScalarField rUA = 1.0/UEqn.A();
surfaceScalarField rhorUAf("(rho*(1|A(U)))", fvc::interpolate(rho*rUA)); surfaceScalarField rhorUAf("(rho*(1|A(U)))", fvc::interpolate(rho*rUA));
@ -18,24 +16,23 @@
+ fvc::ddtPhiCorr(rUA, rho, U, phi) + fvc::ddtPhiCorr(rUA, rho, U, phi)
); );
surfaceScalarField buoyancyPhi = surfaceScalarField buoyancyPhi = -rhorUAf*ghf*fvc::snGrad(rho)*mesh.magSf();
rhorUAf*fvc::interpolate(rho)*(g & mesh.Sf());
phi += buoyancyPhi; phi += buoyancyPhi;
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{ {
fvScalarMatrix pEqn fvScalarMatrix p_rghEqn
( (
fvc::ddt(rho) + psi*correction(fvm::ddt(p)) fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh))
+ fvc::div(phi) + fvc::div(phi)
- fvm::laplacian(rhorUAf, p) - fvm::laplacian(rhorUAf, p_rgh)
); );
pEqn.solve p_rghEqn.solve
( (
mesh.solver mesh.solver
( (
p.select p_rgh.select
( (
( (
finalIter finalIter
@ -49,34 +46,25 @@
if (nonOrth == nNonOrthCorr) if (nonOrth == nNonOrthCorr)
{ {
// Calculate the conservative fluxes // Calculate the conservative fluxes
phi += pEqn.flux(); phi += p_rghEqn.flux();
// Explicitly relax pressure for momentum corrector // Explicitly relax pressure for momentum corrector
p.relax(); p_rgh.relax();
// Correct the momentum source with the pressure gradient flux // Correct the momentum source with the pressure gradient flux
// calculated from the relaxed pressure // calculated from the relaxed pressure
U += rUA*fvc::reconstruct((buoyancyPhi + pEqn.flux())/rhorUAf); U += rUA*fvc::reconstruct((buoyancyPhi + p_rghEqn.flux())/rhorUAf);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
} }
} }
p = p_rgh + rho*gh;
// Second part of thermodynamic density update // Second part of thermodynamic density update
thermo.rho() += psi*p; thermo.rho() += psi*p_rgh;
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
#include "rhoEqn.H" #include "rhoEqn.H"
#include "compressibleContinuityErrs.H" #include "compressibleContinuityErrs.H"
// For closed-volume cases adjust the pressure and density levels
// to obey overall mass continuity
if (closedVolume)
{
p +=
(initialMass - fvc::domainIntegrate(psi*p))
/fvc::domainIntegrate(psi);
thermo.rho() = psi*p;
rho += (initialMass - fvc::domainIntegrate(rho))/totalVolume;
}
} }

View File

@ -62,10 +62,7 @@ int main(int argc, char *argv[])
{ {
#include "UEqn.H" #include "UEqn.H"
#include "hEqn.H" #include "hEqn.H"
for (int i=0; i<3; i++)
{
#include "pEqn.H" #include "pEqn.H"
}
} }
turbulence->correct(); turbulence->correct();

View File

@ -23,20 +23,6 @@
volScalarField& h = thermo.h(); volScalarField& h = thermo.h();
const volScalarField& psi = thermo.psi(); const volScalarField& psi = thermo.psi();
Info<< "Reading field p_rgh\n" << endl;
volScalarField p_rgh
(
IOobject
(
"p_rgh",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field U\n" << endl; Info<< "Reading field U\n" << endl;
volVectorField U volVectorField U
( (
@ -53,7 +39,6 @@
#include "compressibleCreatePhi.H" #include "compressibleCreatePhi.H"
Info<< "Creating turbulence model\n" << endl; Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::RASModel> turbulence autoPtr<compressible::RASModel> turbulence
( (
@ -66,40 +51,39 @@
) )
); );
Info<< "Calculating field g.h\n" << endl; Info<< "Calculating field g.h\n" << endl;
volScalarField gh("gh", g & mesh.C()); volScalarField gh("gh", g & mesh.C());
surfaceScalarField ghf("ghf", g & mesh.Cf()); surfaceScalarField ghf("ghf", g & mesh.Cf());
p = p_rgh + rho*gh; Info<< "Reading field p_rgh\n" << endl;
thermo.correct(); volScalarField p_rgh
rho = thermo.rho();
p_rgh = p - rho*gh;
label p_rghRefCell = 0;
scalar p_rghRefValue = 0.0;
setRefCell
( (
p_rgh, IOobject
mesh.solutionDict().subDict("SIMPLE"), (
p_rghRefCell, "p_rgh",
p_rghRefValue runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
); );
// Force p_rgh to be consistent with p
p_rgh = p - rho*gh;
label pRefCell = 0;
scalar pRefValue = 0.0; scalar pRefValue = 0.0;
setRefCell
if (p_rgh.needReference()) (
{ p,
pRefValue = readScalar p_rgh,
( mesh.solutionDict().subDict("SIMPLE"),
mesh.solutionDict().subDict("SIMPLE").lookup("pRefValue") pRefCell,
); pRefValue
);
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, p_rghRefCell)
);
}
dimensionedScalar initialMass = fvc::domainIntegrate(rho); dimensionedScalar initialMass = fvc::domainIntegrate(rho);
dimensionedScalar totalVolume = sum(mesh.V());

View File

@ -1,11 +1,12 @@
{ {
rho = thermo.rho(); rho = thermo.rho();
rho.relax();
volScalarField rUA = 1.0/UEqn().A(); volScalarField rUA = 1.0/UEqn().A();
surfaceScalarField rhorUAf("(rho*(1|A(U)))", fvc::interpolate(rho*rUA)); surfaceScalarField rhorUAf("(rho*(1|A(U)))", fvc::interpolate(rho*rUA));
U = rUA*UEqn().H(); U = rUA*UEqn().H();
//UEqn.clear(); UEqn.clear();
phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf()); phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf());
bool closedVolume = adjustPhi(phi, U, p_rgh); bool closedVolume = adjustPhi(phi, U, p_rgh);
@ -20,7 +21,7 @@
fvm::laplacian(rhorUAf, p_rgh) == fvc::div(phi) fvm::laplacian(rhorUAf, p_rgh) == fvc::div(phi)
); );
p_rghEqn.setReference(p_rghRefCell, p_rghRefValue); p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
p_rghEqn.solve(); p_rghEqn.solve();
if (nonOrth == nNonOrthCorr) if (nonOrth == nNonOrthCorr)
@ -42,13 +43,13 @@
p = p_rgh + rho*gh; p = p_rgh + rho*gh;
// For closed-volume cases adjust the pressure and density levels // For closed-volume cases adjust the pressure level
// to obey overall mass continuity // to obey overall mass continuity
if (closedVolume) if (closedVolume)
{ {
p += (initialMass - fvc::domainIntegrate(psi*p)) p += (initialMass - fvc::domainIntegrate(psi*p))
/fvc::domainIntegrate(psi); /fvc::domainIntegrate(psi);
p_rgh == p - rho*gh; p_rgh = p - rho*gh;
} }
rho = thermo.rho(); rho = thermo.rho();

View File

@ -58,7 +58,7 @@ int main(int argc, char *argv[])
#include "readSIMPLEControls.H" #include "readSIMPLEControls.H"
p.storePrevIter(); p_rgh.storePrevIter();
rho.storePrevIter(); rho.storePrevIter();
// Pressure-velocity SIMPLE corrector // Pressure-velocity SIMPLE corrector

View File

@ -93,6 +93,8 @@ int main(int argc, char *argv[])
// --- PIMPLE loop // --- PIMPLE loop
for (int oCorr=0; oCorr<nOuterCorr; oCorr++) for (int oCorr=0; oCorr<nOuterCorr; oCorr++)
{ {
bool finalIter = oCorr == nOuterCorr-1;
forAll(fluidRegions, i) forAll(fluidRegions, i)
{ {
Info<< "\nSolving for fluid region " Info<< "\nSolving for fluid region "

View File

@ -13,7 +13,9 @@
== ==
fvc::reconstruct fvc::reconstruct
( (
fvc::interpolate(rho)*(g & mesh.Sf()) (
- fvc::snGrad(p)*mesh.magSf() - ghf*fvc::snGrad(rho)
- fvc::snGrad(p_rgh)
)*mesh.magSf()
) )
); );

View File

@ -6,12 +6,16 @@
PtrList<surfaceScalarField> phiFluid(fluidRegions.size()); PtrList<surfaceScalarField> phiFluid(fluidRegions.size());
PtrList<uniformDimensionedVectorField> gFluid(fluidRegions.size()); PtrList<uniformDimensionedVectorField> gFluid(fluidRegions.size());
PtrList<compressible::turbulenceModel> turbulence(fluidRegions.size()); PtrList<compressible::turbulenceModel> turbulence(fluidRegions.size());
PtrList<volScalarField> DpDtf(fluidRegions.size()); PtrList<volScalarField> p_rghFluid(fluidRegions.size());
PtrList<volScalarField> ghFluid(fluidRegions.size());
PtrList<surfaceScalarField> ghfFluid(fluidRegions.size());
List<scalar> initialMassFluid(fluidRegions.size()); List<scalar> initialMassFluid(fluidRegions.size());
List<label> pRefCellFluid(fluidRegions.size(),0); List<label> pRefCellFluid(fluidRegions.size(),0);
List<scalar> pRefValueFluid(fluidRegions.size(),0.0); List<scalar> pRefValueFluid(fluidRegions.size(),0.0);
PtrList<dimensionedScalar> rhoMax(fluidRegions.size());
PtrList<dimensionedScalar> rhoMin(fluidRegions.size());
// Populate fluid field pointer lists // Populate fluid field pointer lists
forAll(fluidRegions, i) forAll(fluidRegions, i)
@ -130,15 +134,68 @@
).ptr() ).ptr()
); );
Info<< " Adding to ghFluid\n" << endl;
ghFluid.set
(
i,
new volScalarField("gh", gFluid[i] & fluidRegions[i].C())
);
Info<< " Adding to ghfFluid\n" << endl;
ghfFluid.set
(
i,
new surfaceScalarField("ghf", gFluid[i] & fluidRegions[i].Cf())
);
p_rghFluid.set
(
i,
new volScalarField
(
IOobject
(
"p_rgh",
runTime.timeName(),
fluidRegions[i],
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
fluidRegions[i]
)
);
// Force p_rgh to be consistent with p
p_rghFluid[i] = thermoFluid[i].p() - rhoFluid[i]*ghFluid[i];
initialMassFluid[i] = fvc::domainIntegrate(rhoFluid[i]).value(); initialMassFluid[i] = fvc::domainIntegrate(rhoFluid[i]).value();
setRefCell setRefCell
( (
thermoFluid[i].p(), thermoFluid[i].p(),
p_rghFluid[i],
fluidRegions[i].solutionDict().subDict("SIMPLE"), fluidRegions[i].solutionDict().subDict("SIMPLE"),
pRefCellFluid[i], pRefCellFluid[i],
pRefValueFluid[i] pRefValueFluid[i]
); );
rhoMax.set
(
i,
new dimensionedScalar
(
fluidRegions[i].solutionDict().subDict("SIMPLE").lookup("rhoMax")
)
);
rhoMin.set
(
i,
new dimensionedScalar
(
fluidRegions[i].solutionDict().subDict("SIMPLE").lookup("rhoMin")
)
);
} }

View File

@ -5,8 +5,8 @@
- fvm::Sp(fvc::div(phi), h) - fvm::Sp(fvc::div(phi), h)
- fvm::laplacian(turb.alphaEff(), h) - fvm::laplacian(turb.alphaEff(), h)
== ==
fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p)) fvc::div(phi/fvc::interpolate(rho), rho/psi, "div(U,p)")
- p*fvc::div(phi/fvc::interpolate(rho)) - (rho/psi)*fvc::div(phi/fvc::interpolate(rho))
); );
hEqn.relax(); hEqn.relax();

View File

@ -1,7 +1,9 @@
{ {
// From buoyantSimpleFoam // From buoyantSimpleFoam
rho = thermo.rho(); rho = thermo.rho();
rho = max(rho, rhoMin[i]);
rho = min(rho, rhoMax[i]);
rho.relax();
volScalarField rUA = 1.0/UEqn().A(); volScalarField rUA = 1.0/UEqn().A();
surfaceScalarField rhorUAf("(rho*(1|A(U)))", fvc::interpolate(rho*rUA)); surfaceScalarField rhorUAf("(rho*(1|A(U)))", fvc::interpolate(rho*rUA));
@ -10,59 +12,54 @@
UEqn.clear(); UEqn.clear();
phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf()); phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf());
bool closedVolume = adjustPhi(phi, U, p); bool closedVolume = adjustPhi(phi, U, p_rgh);
surfaceScalarField buoyancyPhi = surfaceScalarField buoyancyPhi = rhorUAf*ghf*fvc::snGrad(rho)*mesh.magSf();
rhorUAf*fvc::interpolate(rho)*(g & mesh.Sf()); phi -= buoyancyPhi;
phi += buoyancyPhi;
// Solve pressure // Solve pressure
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{ {
fvScalarMatrix pEqn fvScalarMatrix p_rghEqn
( (
fvm::laplacian(rhorUAf, p) == fvc::div(phi) fvm::laplacian(rhorUAf, p_rgh) == fvc::div(phi)
); );
pEqn.setReference(pRefCell, pRefValue); p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
// retain the residual from the first iteration p_rghEqn.solve();
if (nonOrth == 0)
{
pEqn.solve();
}
else
{
pEqn.solve();
}
if (nonOrth == nNonOrthCorr) if (nonOrth == nNonOrthCorr)
{ {
// For closed-volume cases adjust the pressure and density levels
// to obey overall mass continuity
if (closedVolume)
{
p += (initialMass - fvc::domainIntegrate(psi*p))
/fvc::domainIntegrate(psi);
}
// Calculate the conservative fluxes // Calculate the conservative fluxes
phi -= pEqn.flux(); phi -= p_rghEqn.flux();
// Explicitly relax pressure for momentum corrector // Explicitly relax pressure for momentum corrector
p.relax(); p_rgh.relax();
// Correct the momentum source with the pressure gradient flux // Correct the momentum source with the pressure gradient flux
// calculated from the relaxed pressure // calculated from the relaxed pressure
U += rUA*fvc::reconstruct((buoyancyPhi - pEqn.flux())/rhorUAf); U -= rUA*fvc::reconstruct((buoyancyPhi + p_rghEqn.flux())/rhorUAf);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
} }
} }
p = p_rgh + rho*gh;
#include "continuityErrs.H" #include "continuityErrs.H"
// For closed-volume cases adjust the pressure level
// to obey overall mass continuity
if (closedVolume)
{
p += (initialMass - fvc::domainIntegrate(psi*p))
/fvc::domainIntegrate(psi);
p_rgh = p - rho*gh;
}
rho = thermo.rho(); rho = thermo.rho();
rho = max(rho, rhoMin[i]);
rho = min(rho, rhoMax[i]);
rho.relax(); rho.relax();
Info<< "Min/max rho:" << min(rho).value() << ' ' Info<< "Min/max rho:" << min(rho).value() << ' '

View File

@ -5,7 +5,6 @@
volScalarField& K = KFluid[i]; volScalarField& K = KFluid[i];
volVectorField& U = UFluid[i]; volVectorField& U = UFluid[i];
surfaceScalarField& phi = phiFluid[i]; surfaceScalarField& phi = phiFluid[i];
const dimensionedVector& g = gFluid[i];
compressible::turbulenceModel& turb = turbulence[i]; compressible::turbulenceModel& turb = turbulence[i];
@ -22,3 +21,7 @@
const label pRefCell = pRefCellFluid[i]; const label pRefCell = pRefCellFluid[i];
const scalar pRefValue = pRefValueFluid[i]; const scalar pRefValue = pRefValueFluid[i];
volScalarField& p_rgh = p_rghFluid[i];
const volScalarField& gh = ghFluid[i];
const surfaceScalarField& ghf = ghfFluid[i];

View File

@ -1,6 +1,6 @@
// Pressure-velocity SIMPLE corrector // Pressure-velocity SIMPLE corrector
p.storePrevIter(); p_rgh.storePrevIter();
rho.storePrevIter(); rho.storePrevIter();
{ {
#include "UEqn.H" #include "UEqn.H"

View File

@ -16,8 +16,11 @@
== ==
fvc::reconstruct fvc::reconstruct
( (
fvc::interpolate(rho)*(g & mesh.Sf()) (
- fvc::snGrad(p)*mesh.magSf() - ghf*fvc::snGrad(rho)
) - fvc::snGrad(p_rgh)
)*mesh.magSf()
),
mesh.solver(U.select(finalIter))
); );
} }

View File

@ -6,6 +6,9 @@
PtrList<surfaceScalarField> phiFluid(fluidRegions.size()); PtrList<surfaceScalarField> phiFluid(fluidRegions.size());
PtrList<uniformDimensionedVectorField> gFluid(fluidRegions.size()); PtrList<uniformDimensionedVectorField> gFluid(fluidRegions.size());
PtrList<compressible::turbulenceModel> turbulence(fluidRegions.size()); PtrList<compressible::turbulenceModel> turbulence(fluidRegions.size());
PtrList<volScalarField> p_rghFluid(fluidRegions.size());
PtrList<volScalarField> ghFluid(fluidRegions.size());
PtrList<surfaceScalarField> ghfFluid(fluidRegions.size());
PtrList<volScalarField> DpDtFluid(fluidRegions.size()); PtrList<volScalarField> DpDtFluid(fluidRegions.size());
List<scalar> initialMassFluid(fluidRegions.size()); List<scalar> initialMassFluid(fluidRegions.size());
@ -129,6 +132,42 @@
).ptr() ).ptr()
); );
Info<< " Adding to ghFluid\n" << endl;
ghFluid.set
(
i,
new volScalarField("gh", gFluid[i] & fluidRegions[i].C())
);
Info<< " Adding to ghfFluid\n" << endl;
ghfFluid.set
(
i,
new surfaceScalarField("ghf", gFluid[i] & fluidRegions[i].Cf())
);
p_rghFluid.set
(
i,
new volScalarField
(
IOobject
(
"p_rgh",
runTime.timeName(),
fluidRegions[i],
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
fluidRegions[i]
)
);
// Force p_rgh to be consistent with p
p_rghFluid[i] = thermoFluid[i].p() - rhoFluid[i]*ghFluid[i];
initialMassFluid[i] = fvc::domainIntegrate(rhoFluid[i]).value();
Info<< " Adding to DpDtFluid\n" << endl; Info<< " Adding to DpDtFluid\n" << endl;
DpDtFluid.set DpDtFluid.set
( (
@ -147,6 +186,4 @@
) )
) )
); );
initialMassFluid[i] = fvc::domainIntegrate(rhoFluid[i]).value();
} }

View File

@ -7,16 +7,9 @@
== ==
DpDt DpDt
); );
if (oCorr == nOuterCorr-1)
{ hEqn.relax();
hEqn.relax(); hEqn.solve(mesh.solver(h.select(finalIter)));
hEqn.solve(mesh.solver("hFinal"));
}
else
{
hEqn.relax();
hEqn.solve();
}
thermo.correct(); thermo.correct();

View File

@ -1,5 +1,5 @@
{ {
bool closedVolume = p.needReference(); bool closedVolume = p_rgh.needReference();
rho = thermo.rho(); rho = thermo.rho();
@ -17,34 +17,35 @@
) )
); );
phi = phiU + fvc::interpolate(rho)*(g & mesh.Sf())*rhorUAf; phi = phiU - rhorUAf*ghf*fvc::snGrad(rho)*mesh.magSf();
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{ {
fvScalarMatrix pEqn fvScalarMatrix p_rghEqn
( (
fvm::ddt(psi, p) fvm::ddt(psi, p_rgh) + fvc::ddt(psi, rho)*gh
+ fvc::div(phi) + fvc::div(phi)
- fvm::laplacian(rhorUAf, p) - fvm::laplacian(rhorUAf, p_rgh)
); );
if p_rghEqn.solve
( (
oCorr == nOuterCorr-1 mesh.solver
&& corr == nCorr-1 (
&& nonOrth == nNonOrthCorr p_rgh.select
) (
{ (
pEqn.solve(mesh.solver(p.name() + "Final")); oCorr == nOuterCorr-1
} && corr == nCorr-1
else && nonOrth == nNonOrthCorr
{ )
pEqn.solve(mesh.solver(p.name())); )
} )
);
if (nonOrth == nNonOrthCorr) if (nonOrth == nNonOrthCorr)
{ {
phi += pEqn.flux(); phi += p_rghEqn.flux();
} }
} }
@ -52,6 +53,8 @@
U += rUA*fvc::reconstruct((phi - phiU)/rhorUAf); U += rUA*fvc::reconstruct((phi - phiU)/rhorUAf);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
p = p_rgh + rho*gh;
// Update pressure substantive derivative // Update pressure substantive derivative
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
@ -65,9 +68,10 @@
// to obey overall mass continuity // to obey overall mass continuity
if (closedVolume) if (closedVolume)
{ {
p += (massIni - fvc::domainIntegrate(psi*p)) p += (initialMass - fvc::domainIntegrate(psi*p))
/fvc::domainIntegrate(psi); /fvc::domainIntegrate(psi);
rho = thermo.rho(); rho = thermo.rho();
p_rgh = p - rho*gh;
} }
// Update thermal conductivity // Update thermal conductivity

View File

@ -1,17 +0,0 @@
const dictionary& piso = fluidRegions[i].solutionDict().subDict("PISO");
const int nOuterCorr =
piso.lookupOrDefault<int>("nOuterCorrectors", 1);
const int nCorr =
piso.lookupOrDefault<int>("nCorrectors", 1);
const int nNonOrthCorr =
piso.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0);
const bool momentumPredictor =
piso.lookupOrDefault("momentumPredictor", true);
const bool transonic =
piso.lookupOrDefault("transonic", false);

View File

@ -1,11 +1,10 @@
const fvMesh& mesh = fluidRegions[i]; fvMesh& mesh = fluidRegions[i];
basicPsiThermo& thermo = thermoFluid[i]; basicPsiThermo& thermo = thermoFluid[i];
volScalarField& rho = rhoFluid[i]; volScalarField& rho = rhoFluid[i];
volScalarField& K = KFluid[i]; volScalarField& K = KFluid[i];
volVectorField& U = UFluid[i]; volVectorField& U = UFluid[i];
surfaceScalarField& phi = phiFluid[i]; surfaceScalarField& phi = phiFluid[i];
const dimensionedVector& g = gFluid[i];
compressible::turbulenceModel& turb = turbulence[i]; compressible::turbulenceModel& turb = turbulence[i];
volScalarField& DpDt = DpDtFluid[i]; volScalarField& DpDt = DpDtFluid[i];
@ -14,4 +13,13 @@
const volScalarField& psi = thermo.psi(); const volScalarField& psi = thermo.psi();
volScalarField& h = thermo.h(); volScalarField& h = thermo.h();
const dimensionedScalar massIni("massIni", dimMass, initialMassFluid[i]); volScalarField& p_rgh = p_rghFluid[i];
const volScalarField& gh = ghFluid[i];
const surfaceScalarField& ghf = ghfFluid[i];
const dimensionedScalar initialMass
(
"initialMass",
dimMass,
initialMassFluid[i]
);

View File

@ -1,3 +1,8 @@
if (finalIter)
{
mesh.data::add("finalIteration", true);
}
if (oCorr == 0) if (oCorr == 0)
{ {
#include "rhoEqn.H" #include "rhoEqn.H"
@ -16,3 +21,8 @@ for (int corr=0; corr<nCorr; corr++)
turb.correct(); turb.correct();
rho = thermo.rho(); rho = thermo.rho();
if (finalIter)
{
mesh.data::remove("finalIteration");
}

View File

@ -1,2 +1,2 @@
p.storePrevIter(); p_rgh.storePrevIter();
rho.storePrevIter(); rho.storePrevIter();

View File

@ -8,9 +8,5 @@
<< solidRegions[i].name() << nl << endl; << solidRegions[i].name() << nl << endl;
Info<< " Adding to thermos\n" << endl; Info<< " Adding to thermos\n" << endl;
thermos.set thermos.set(i, basicSolidThermo::New(solidRegions[i]));
(
i,
basicSolidThermo::New(solidRegions[i])
);
} }

View File

@ -1,3 +1,8 @@
if (finalIter)
{
mesh.data::add("finalIteration", true);
}
{ {
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{ {
@ -7,8 +12,13 @@
- fvm::laplacian(K, T) - fvm::laplacian(K, T)
); );
TEqn().relax(); TEqn().relax();
TEqn().solve(); TEqn().solve(mesh.solver(T.select(finalIter)));
} }
Info<< "Min/max T:" << min(T) << ' ' << max(T) << endl; Info<< "Min/max T:" << min(T) << ' ' << max(T) << endl;
} }
if (finalIter)
{
mesh.data::remove("finalIteration");
}

View File

@ -13,5 +13,5 @@
if (momentumPredictor) if (momentumPredictor)
{ {
solve(UEqn == -fvc::grad(p)); solve(UEqn == -fvc::grad(p), mesh.solver(U.select(finalIter)));
} }

View File

@ -90,17 +90,28 @@ int main(int argc, char *argv[])
#include "rhoEqn.H" #include "rhoEqn.H"
// --- PIMPLE loop // --- PIMPLE loop
for (int ocorr=1; ocorr<=nOuterCorr; ocorr++) for (int oCorr=0; oCorr<nOuterCorr; oCorr++)
{ {
bool finalIter = oCorr == nOuterCorr - 1;
if (finalIter)
{
mesh.data::add("finalIteration", true);
}
#include "UEqn.H" #include "UEqn.H"
#include "YEqn.H" #include "YEqn.H"
#include "hsEqn.H" #include "hsEqn.H"
// --- PISO loop // --- PISO loop
for (int corr=1; corr<=nCorr; corr++) for (int corr=0; corr<nCorr; corr++)
{ {
#include "pEqn.H" #include "pEqn.H"
} }
if (finalIter)
{
mesh.data::remove("finalIteration");
}
} }
turbulence->correct(); turbulence->correct();

View File

@ -15,7 +15,7 @@
hsEqn.relax(); hsEqn.relax();
hsEqn.solve(); hsEqn.solve(mesh.solver(hs.select(finalIter)));
thermo.correct(); thermo.correct();

View File

@ -26,7 +26,20 @@ if (transonic)
coalParcels.Srho() coalParcels.Srho()
); );
pEqn.solve(); pEqn.solve
(
mesh.solver
(
p.select
(
(
finalIter
&& corr == nCorr-1
&& nonOrth == nNonOrthCorr
)
)
)
);
if (nonOrth == nNonOrthCorr) if (nonOrth == nNonOrthCorr)
{ {
@ -54,7 +67,20 @@ else
coalParcels.Srho() coalParcels.Srho()
); );
pEqn.solve(); pEqn.solve
(
mesh.solver
(
p.select
(
(
finalIter
&& corr == nCorr-1
&& nonOrth == nNonOrthCorr
)
)
)
);
if (nonOrth == nNonOrthCorr) if (nonOrth == nNonOrthCorr)
{ {

View File

@ -23,411 +23,7 @@ boundaryField
floor floor
{ {
type fixedValue; type fixedValue;
value nonuniform List<scalar> value uniform 300;
400
(
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
600
600
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
600
600
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
)
;
} }
ceiling ceiling
{ {

View File

@ -22,23 +22,20 @@ boundaryField
{ {
floor floor
{ {
type buoyantPressure; type calculated;
rho rhok; value $internalField;
value uniform 0;
} }
ceiling ceiling
{ {
type buoyantPressure; type calculated;
rho rhok; value $internalField;
value uniform 0;
} }
fixedWalls fixedWalls
{ {
type buoyantPressure; type calculated;
rho rhok; value $internalField;
value uniform 0;
} }
} }

View File

@ -0,0 +1,45 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
floor
{
type buoyantPressure;
rho rhok;
value uniform 0;
}
ceiling
{
type buoyantPressure;
rho rhok;
value uniform 0;
}
fixedWalls
{
type buoyantPressure;
rho rhok;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase cleanCase
cp 0/T.org 0/T rm -f 0/T
# ----------------------------------------------------------------- end-of-file # ----------------------------------------------------------------- end-of-file

View File

@ -8,6 +8,7 @@ application=`getApplication`
compileApplication ../../buoyantPimpleFoam/hotRoom/setHotRoom compileApplication ../../buoyantPimpleFoam/hotRoom/setHotRoom
runApplication blockMesh runApplication blockMesh
cp 0/T.org 0/T
runApplication setHotRoom runApplication setHotRoom
runApplication $application runApplication $application

View File

@ -40,12 +40,12 @@ divSchemes
laplacianSchemes laplacianSchemes
{ {
default none; default none;
laplacian(nuEff,U) Gauss linear corrected; laplacian(nuEff,U) Gauss linear uncorrected;
laplacian((1|A(U)),p) Gauss linear corrected; laplacian((1|A(U)),p_rgh) Gauss linear uncorrected;
laplacian(kappaEff,T) Gauss linear corrected; laplacian(kappaEff,T) Gauss linear uncorrected;
laplacian(DkEff,k) Gauss linear corrected; laplacian(DkEff,k) Gauss linear uncorrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected; laplacian(DepsilonEff,epsilon) Gauss linear uncorrected;
laplacian(DREff,R) Gauss linear corrected; laplacian(DREff,R) Gauss linear uncorrected;
} }
interpolationSchemes interpolationSchemes
@ -55,13 +55,13 @@ interpolationSchemes
snGradSchemes snGradSchemes
{ {
default corrected; default uncorrected;
} }
fluxRequired fluxRequired
{ {
default no; default no;
p ; p_rgh;
} }

View File

@ -17,17 +17,17 @@ FoamFile
solvers solvers
{ {
p p_rgh
{ {
solver PCG; solver PCG;
preconditioner DIC; preconditioner DIC;
tolerance 1e-8; tolerance 1e-8;
relTol 0.1; relTol 0.01;
} }
pFinal p_rghFinal
{ {
$p; $p_rgh;
relTol 0; relTol 0;
} }

View File

@ -22,23 +22,20 @@ boundaryField
{ {
floor floor
{ {
type buoyantPressure; type calculated;
rho rhok; value $internalField;
value uniform 0;
} }
ceiling ceiling
{ {
type buoyantPressure; type calculated;
rho rhok; value $internalField;
value uniform 0;
} }
fixedWalls fixedWalls
{ {
type buoyantPressure; type calculated;
rho rhok; value $internalField;
value uniform 0;
} }
} }

View File

@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase cleanCase
cp 0/T.org 0/T rm -f 0/T
# ----------------------------------------------------------------- end-of-file # ----------------------------------------------------------------- end-of-file

View File

@ -8,6 +8,7 @@ application=`getApplication`
compileApplication ../../buoyantPimpleFoam/hotRoom/setHotRoom compileApplication ../../buoyantPimpleFoam/hotRoom/setHotRoom
runApplication blockMesh runApplication blockMesh
cp 0/T.org 0/T
runApplication setHotRoom runApplication setHotRoom
runApplication $application runApplication $application

View File

@ -45,5 +45,25 @@ timePrecision 6;
runTimeModifiable true; runTimeModifiable true;
functions
{
residualControl1
{
type residualControl;
functionObjectLibs ( "libjobControl.so" );
outputControl timeStep;
outputInterval 1;
maxResiduals
{
p_rgh 1e-2;
U 1e-4;
T 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
}
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -37,17 +37,15 @@ solvers
SIMPLE SIMPLE
{ {
nNonOrthogonalCorrectors 0; nNonOrthogonalCorrectors 0;
p_rghRefCell 0; pRefCell 0;
p_rghRefValue 0;
pRefValue 0; pRefValue 0;
} }
relaxationFactors relaxationFactors
{ {
rho 1;
p_rgh 0.7; p_rgh 0.7;
U 0.2; U 0.2;
T 0.7; T 0.5;
"(k|epsilon|R)" 0.7; "(k|epsilon|R)" 0.7;
} }

View File

@ -22,30 +22,26 @@ boundaryField
{ {
ground ground
{ {
type buoyantPressure; type calculated;
rho rhok; value $internalField;
value uniform 0;
} }
igloo_region0 igloo_region0
{ {
type buoyantPressure; type calculated;
rho rhok; value $internalField;
value uniform 0;
} }
twoFridgeFreezers_seal_0 twoFridgeFreezers_seal_0
{ {
type buoyantPressure; type calculated;
rho rhok; value $internalField;
value uniform 0;
} }
twoFridgeFreezers_herring_1 twoFridgeFreezers_herring_1
{ {
type buoyantPressure; type calculated;
rho rhok; value $internalField;
value uniform 0;
} }
} }

View File

@ -21,55 +21,55 @@ FoamFile
{ {
type empty; type empty;
nFaces 0; nFaces 0;
startFace 60456; startFace 60336;
} }
minX minX
{ {
type empty; type empty;
nFaces 0; nFaces 0;
startFace 60456; startFace 60336;
} }
maxX maxX
{ {
type empty; type empty;
nFaces 0; nFaces 0;
startFace 60456; startFace 60336;
} }
minY minY
{ {
type empty; type empty;
nFaces 0; nFaces 0;
startFace 60456; startFace 60336;
} }
ground ground
{ {
type wall; type wall;
nFaces 590; nFaces 590;
startFace 60456; startFace 60336;
} }
maxZ maxZ
{ {
type empty; type empty;
nFaces 0; nFaces 0;
startFace 61046; startFace 60926;
} }
igloo_region0 igloo_region0
{ {
type wall; type wall;
nFaces 2260; nFaces 2260;
startFace 61046; startFace 60926;
} }
twoFridgeFreezers_seal_0 twoFridgeFreezers_seal_0
{ {
type wall; type wall;
nFaces 1344; nFaces 1344;
startFace 63306; startFace 63186;
} }
twoFridgeFreezers_herring_1 twoFridgeFreezers_herring_1
{ {
type wall; type wall;
nFaces 1116; nFaces 1116;
startFace 64650; startFace 64530;
} }
) )

View File

@ -45,5 +45,25 @@ timePrecision 6;
runTimeModifiable true; runTimeModifiable true;
functions
{
residualControl1
{
type residualControl;
functionObjectLibs ( "libjobControl.so" );
outputControl timeStep;
outputInterval 1;
maxResiduals
{
p_rgh 1e-2;
U 1e-4;
T 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
}
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -37,16 +37,15 @@ solvers
SIMPLE SIMPLE
{ {
nNonOrthogonalCorrectors 0; nNonOrthogonalCorrectors 0;
p_rghRefCell 0; pRefCell 0;
p_rghRefValue 0;
pRefValue 0; pRefValue 0;
} }
relaxationFactors relaxationFactors
{ {
p_rgh 0.8; p_rgh 0.7;
U 0.2; U 0.2;
T 0.7; T 0.5;
"(k|epsilon)" 0.7; "(k|epsilon)" 0.7;
} }

View File

@ -22,20 +22,20 @@ boundaryField
{ {
floor floor
{ {
type buoyantPressure; type calculated;
value uniform 1e5; value $internalField;
} }
ceiling ceiling
{ {
type buoyantPressure; type calculated;
value uniform 1e5; value $internalField;
} }
fixedWalls fixedWalls
{ {
type buoyantPressure; type calculated;
value uniform 1e5; value $internalField;
} }
} }

View File

@ -0,0 +1,42 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 1e5;
boundaryField
{
floor
{
type buoyantPressure;
value uniform 1e5;
}
ceiling
{
type buoyantPressure;
value uniform 1e5;
}
fixedWalls
{
type buoyantPressure;
value uniform 1e5;
}
}
// ************************************************************************* //

View File

@ -42,7 +42,7 @@ laplacianSchemes
{ {
default none; default none;
laplacian(muEff,U) Gauss linear corrected; laplacian(muEff,U) Gauss linear corrected;
laplacian((rho*(1|A(U))),p) Gauss linear corrected; laplacian((rho*(1|A(U))),p_rgh) Gauss linear corrected;
laplacian(alphaEff,h) Gauss linear corrected; laplacian(alphaEff,h) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected; laplacian(DkEff,k) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected; laplacian(DepsilonEff,epsilon) Gauss linear corrected;
@ -62,7 +62,7 @@ snGradSchemes
fluxRequired fluxRequired
{ {
default no; default no;
p ; p_rgh;
} }

View File

@ -25,17 +25,17 @@ solvers
relTol 0; relTol 0;
} }
p p_rgh
{ {
solver PCG; solver PCG;
preconditioner DIC; preconditioner DIC;
tolerance 1e-8; tolerance 1e-8;
relTol 0.1; relTol 0.01;
} }
pFinal p_rghFinal
{ {
$p; $p_rgh;
relTol 0; relTol 0;
} }
@ -44,7 +44,7 @@ solvers
solver PBiCG; solver PBiCG;
preconditioner DILU; preconditioner DILU;
tolerance 1e-6; tolerance 1e-6;
relTol 0; relTol 0.1;
} }
"(U|h|k|epsilon|R)Final" "(U|h|k|epsilon|R)Final"
@ -56,7 +56,7 @@ solvers
PIMPLE PIMPLE
{ {
momentumPredictor no; momentumPredictor yes;
nOuterCorrectors 1; nOuterCorrectors 1;
nCorrectors 2; nCorrectors 2;
nNonOrthogonalCorrectors 0; nNonOrthogonalCorrectors 0;

View File

@ -23,26 +23,26 @@ boundaryField
{ {
frontAndBack frontAndBack
{ {
type buoyantPressure; type calculated;
value uniform 1e5; value $internalField;
} }
topAndBottom topAndBottom
{ {
type buoyantPressure; type calculated;
value uniform 1e5; value $internalField;
} }
hot hot
{ {
type buoyantPressure; type calculated;
value uniform 1e5; value $internalField;
} }
cold cold
{ {
type buoyantPressure; type calculated;
value uniform 1e5; value $internalField;
} }
} }

View File

@ -44,5 +44,25 @@ timePrecision 6;
runTimeModifiable true; runTimeModifiable true;
functions
{
residualControl1
{
type residualControl;
functionObjectLibs ( "libjobControl.so" );
outputControl timeStep;
outputInterval 1;
maxResiduals
{
p_rgh 1e-2;
U 1e-4;
T 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
}
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -44,17 +44,16 @@ SIMPLE
{ {
momentumPredictor yes; momentumPredictor yes;
nNonOrthogonalCorrectors 0; nNonOrthogonalCorrectors 0;
p_rghRefCell 0; pRefCell 0;
p_rghRefValue 100000; pRefValue 0;
pRefValue 100000;
convergence 1e-04;
} }
relaxationFactors relaxationFactors
{ {
p_rgh 0.9; rho 1.0;
p_rgh 0.7;
U 0.3; U 0.3;
h 0.7; h 0.3;
"(k|epsilon|omega)" 0.7; "(k|epsilon|omega)" 0.7;
} }

View File

@ -23,411 +23,7 @@ boundaryField
floor floor
{ {
type fixedValue; type fixedValue;
value nonuniform List<scalar> value uniform 300;
400
(
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
600
600
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
600
600
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
)
;
} }
ceiling ceiling
{ {

View File

@ -23,411 +23,7 @@ boundaryField
floor floor
{ {
type fixedValue; type fixedValue;
value nonuniform List<scalar> value uniform 300;
400
(
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
600
600
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
600
600
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
300
)
;
} }
ceiling ceiling
{ {

View File

@ -22,20 +22,20 @@ boundaryField
{ {
floor floor
{ {
type buoyantPressure; type calculated;
value uniform 1e5; value $internalField;
} }
ceiling ceiling
{ {
type buoyantPressure; type calculated;
value uniform 1e5; value $internalField;
} }
fixedWalls fixedWalls
{ {
type buoyantPressure; type calculated;
value uniform 1e5; value $internalField;
} }
} }

View File

@ -0,0 +1,42 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 1e5;
boundaryField
{
floor
{
type buoyantPressure;
value uniform 1e5;
}
ceiling
{
type buoyantPressure;
value uniform 1e5;
}
fixedWalls
{
type buoyantPressure;
value uniform 1e5;
}
}
// ************************************************************************* //

View File

@ -45,5 +45,25 @@ timePrecision 6;
runTimeModifiable true; runTimeModifiable true;
functions
{
residualControl1
{
type residualControl;
functionObjectLibs ( "libjobControl.so" );
outputControl timeStep;
outputInterval 1;
maxResiduals
{
p_rgh 1e-2;
U 1e-4;
T 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
}
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -40,12 +40,12 @@ divSchemes
laplacianSchemes laplacianSchemes
{ {
default none; default none;
laplacian(muEff,U) Gauss linear corrected; laplacian(muEff,U) Gauss linear uncorrected;
laplacian((rho*(1|A(U))),p) Gauss linear corrected; laplacian((rho*(1|A(U))),p_rgh) Gauss linear uncorrected;
laplacian(alphaEff,h) Gauss linear corrected; laplacian(alphaEff,h) Gauss linear uncorrected;
laplacian(DkEff,k) Gauss linear corrected; laplacian(DkEff,k) Gauss linear uncorrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected; laplacian(DepsilonEff,epsilon) Gauss linear uncorrected;
laplacian(DREff,R) Gauss linear corrected; laplacian(DREff,R) Gauss linear uncorrected;
} }
interpolationSchemes interpolationSchemes
@ -61,7 +61,7 @@ snGradSchemes
fluxRequired fluxRequired
{ {
default no; default no;
p ; p_rgh;
} }

View File

@ -17,12 +17,12 @@ FoamFile
solvers solvers
{ {
p p_rgh
{ {
solver PCG; solver PCG;
preconditioner DIC; preconditioner DIC;
tolerance 1e-08; tolerance 1e-08;
relTol 0; relTol 0.01;
} }
"(U|h|k|epsilon|R)" "(U|h|k|epsilon|R)"
@ -30,7 +30,7 @@ solvers
solver PBiCG; solver PBiCG;
preconditioner DILU; preconditioner DILU;
tolerance 1e-05; tolerance 1e-05;
relTol 0; relTol 0.1;
} }
} }
@ -38,16 +38,16 @@ SIMPLE
{ {
nNonOrthogonalCorrectors 0; nNonOrthogonalCorrectors 0;
pRefCell 0; pRefCell 0;
pRefValue 100000; pRefValue 0;
} }
relaxationFactors relaxationFactors
{ {
rho 1; rho 1.0;
p 0.7; p_rgh 0.7;
U 0.2; U 0.2;
h 0.7; h 0.2;
"(k|epsilon|R)" 0.7; "(k|epsilon|R)" 0.5;
} }

View File

@ -25,7 +25,7 @@ boundaryField
type MarshakRadiation; type MarshakRadiation;
T T; T T;
emissivity 1; emissivity 1;
value uniform 0; // value uniform 0;
} }
fixedWalls fixedWalls
@ -33,7 +33,7 @@ boundaryField
type MarshakRadiation; type MarshakRadiation;
T T; T T;
emissivity 1; emissivity 1;
value uniform 0; // value uniform 0;
} }
ceiling ceiling
@ -41,7 +41,7 @@ boundaryField
type MarshakRadiation; type MarshakRadiation;
T T; T T;
emissivity 1; emissivity 1;
value uniform 0; // value uniform 0;
} }
box box
@ -49,7 +49,7 @@ boundaryField
type MarshakRadiation; type MarshakRadiation;
T T; T T;
emissivity 1; emissivity 1;
value uniform 0; // value uniform 0;
} }
} }

View File

@ -22,26 +22,26 @@ boundaryField
{ {
floor floor
{ {
type buoyantPressure; type calculated;
value uniform 100000; value $internalField;
} }
ceiling ceiling
{ {
type buoyantPressure; type calculated;
value uniform 100000; value $internalField;
} }
fixedWalls fixedWalls
{ {
type buoyantPressure; type calculated;
value uniform 100000; value $internalField;
} }
box box
{ {
type buoyantPressure; type calculated;
value uniform 100000; value $internalField;
} }
} }

View File

@ -0,0 +1,48 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 100000;
boundaryField
{
floor
{
type buoyantPressure;
value uniform 100000;
}
ceiling
{
type buoyantPressure;
value uniform 100000;
}
fixedWalls
{
type buoyantPressure;
value uniform 100000;
}
box
{
type buoyantPressure;
value uniform 100000;
}
}
// ************************************************************************* //

View File

@ -45,5 +45,25 @@ timePrecision 6;
runTimeModifiable true; runTimeModifiable true;
functions
{
residualControl1
{
type residualControl;
functionObjectLibs ( "libjobControl.so" );
outputControl timeStep;
outputInterval 1;
maxResiduals
{
p_rgh 1e-2;
U 1e-4;
T 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
}
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -41,7 +41,7 @@ laplacianSchemes
{ {
default none; default none;
laplacian(muEff,U) Gauss linear corrected; laplacian(muEff,U) Gauss linear corrected;
laplacian((rho*(1|A(U))),p) Gauss linear corrected; laplacian((rho*(1|A(U))),p_rgh) Gauss linear corrected;
laplacian(alphaEff,h) Gauss linear corrected; laplacian(alphaEff,h) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected; laplacian(DkEff,k) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected; laplacian(DepsilonEff,epsilon) Gauss linear corrected;
@ -62,7 +62,7 @@ snGradSchemes
fluxRequired fluxRequired
{ {
default no; default no;
p; p_rgh;
} }

View File

@ -17,7 +17,7 @@ FoamFile
solvers solvers
{ {
p p_rgh
{ {
solver PCG; solver PCG;
preconditioner DIC; preconditioner DIC;
@ -35,7 +35,7 @@ solvers
G G
{ {
$p; $p_rgh;
tolerance 1e-05; tolerance 1e-05;
relTol 0.1; relTol 0.1;
} }
@ -50,11 +50,11 @@ SIMPLE
relaxationFactors relaxationFactors
{ {
rho 1; rho 1.0;
p 0.3; p_rgh 0.7;
U 0.7; U 0.2;
h 0.7; h 0.2;
"(k|epsilon)" 0.7; "(k|epsilon|R)" 0.5;
G 0.7; G 0.7;
} }

View File

@ -24,7 +24,7 @@ boundaryField
{ {
type greyDiffusiveRadiation; type greyDiffusiveRadiation;
T T; T T;
emissivity 0.5; emissivity 1.0;
value uniform 0; value uniform 0;
} }
} }

View File

@ -22,25 +22,25 @@ boundaryField
{ {
floor floor
{ {
type buoyantPressure; type calculated;
value uniform 100000; value uniform 100000;
} }
ceiling ceiling
{ {
type buoyantPressure; type calculated;
value uniform 100000; value uniform 100000;
} }
fixedWalls fixedWalls
{ {
type buoyantPressure; type calculated;
value uniform 100000; value uniform 100000;
} }
box box
{ {
type buoyantPressure; type calculated;
value uniform 100000; value uniform 100000;
} }
} }

View File

@ -0,0 +1,48 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 100000;
boundaryField
{
floor
{
type buoyantPressure;
value uniform 100000;
}
ceiling
{
type buoyantPressure;
value uniform 100000;
}
fixedWalls
{
type buoyantPressure;
value uniform 100000;
}
box
{
type buoyantPressure;
value uniform 100000;
}
}
// ************************************************************************* //

View File

@ -45,5 +45,25 @@ timePrecision 6;
runTimeModifiable true; runTimeModifiable true;
functions
{
residualControl1
{
type residualControl;
functionObjectLibs ( "libjobControl.so" );
outputControl timeStep;
outputInterval 1;
maxResiduals
{
p_rgh 1e-2;
U 1e-4;
T 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
}
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -42,7 +42,7 @@ laplacianSchemes
{ {
default none; default none;
laplacian(muEff,U) Gauss linear corrected; laplacian(muEff,U) Gauss linear corrected;
laplacian((rho*(1|A(U))),p) Gauss linear corrected; laplacian((rho*(1|A(U))),p_rgh) Gauss linear corrected;
laplacian(alphaEff,h) Gauss linear corrected; laplacian(alphaEff,h) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected; laplacian(DkEff,k) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected; laplacian(DepsilonEff,epsilon) Gauss linear corrected;
@ -63,7 +63,7 @@ snGradSchemes
fluxRequired fluxRequired
{ {
default no; default no;
p; p_rgh;
} }

View File

@ -17,7 +17,7 @@ FoamFile
solvers solvers
{ {
p p_rgh
{ {
solver GAMG; solver GAMG;
tolerance 1e-06; tolerance 1e-06;
@ -47,11 +47,12 @@ SIMPLE
relaxationFactors relaxationFactors
{ {
rho 1; rho 1.0;
p 0.3; p_rgh 0.3;
U 0.7; U 0.7;
h 0.7; h 0.7;
"(k|epsilon)" 0.7; k 0.7;
epsilon 0.7;
"ILambda.*" 0.7; "ILambda.*" 0.7;
} }

View File

@ -10,7 +10,6 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0.001";
object epsilon; object epsilon;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -10,7 +10,6 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0.001";
object k; object k;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -0,0 +1,29 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 1e5;
boundaryField
{
".*"
{
type calculated;
}
}
// ************************************************************************* //

View File

@ -92,16 +92,30 @@ dictionaryReplacement
} }
} }
p p_rgh
{ {
internalField uniform 100000; internalField uniform 1e5;
boundaryField boundaryField
{ {
".*" ".*"
{ {
type buoyantPressure; type buoyantPressure;
value 1e5; value uniform 1e5;
}
}
}
p
{
internalField uniform 1e5;
boundaryField
{
".*"
{
type calculated;
value uniform 1e5;
} }
} }
} }

View File

@ -17,13 +17,11 @@ FoamFile
ddtSchemes ddtSchemes
{ {
default Euler; default Euler;
//default CoEuler phi rho 0.1;
} }
gradSchemes gradSchemes
{ {
default Gauss linear; default Gauss linear;
// grad(U) cellLimited Gauss linear 1;
} }
divSchemes divSchemes
@ -43,7 +41,7 @@ laplacianSchemes
{ {
default none; default none;
laplacian(muEff,U) Gauss linear limited 0.333; laplacian(muEff,U) Gauss linear limited 0.333;
laplacian((rho*(1|A(U))),p) Gauss linear limited 0.333; laplacian((rho*(1|A(U))),p_rgh) Gauss linear limited 0.333;
laplacian(alphaEff,h) Gauss linear limited 0.333; laplacian(alphaEff,h) Gauss linear limited 0.333;
laplacian(DkEff,k) Gauss linear limited 0.333; laplacian(DkEff,k) Gauss linear limited 0.333;
laplacian(DepsilonEff,epsilon) Gauss linear limited 0.333; laplacian(DepsilonEff,epsilon) Gauss linear limited 0.333;
@ -63,7 +61,7 @@ snGradSchemes
fluxRequired fluxRequired
{ {
default no; default no;
p; p_rgh;
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -24,7 +24,7 @@ solvers
relTol 0; relTol 0;
} }
p p_rgh
{ {
solver GAMG; solver GAMG;
tolerance 1e-8; tolerance 1e-8;
@ -38,31 +38,26 @@ solvers
mergeLevels 1; mergeLevels 1;
} }
pFinal p_rghFinal
{ {
$p; $p_rgh;
tolerance 1e-8; tolerance 1e-8;
relTol 0; relTol 0;
} }
U "(U|h|k|epsilon|R)"
{ {
solver PBiCG; solver PBiCG;
preconditioner DILU; preconditioner DILU;
tolerance 1e-08; tolerance 1e-08;
relTol 0;
}
h
{
$U;
tolerance 1e-08;
relTol 0.1; relTol 0.1;
} }
"(hFinal|k|epsilon|R)" "(U|h|k|epsilon|R)Final"
{ {
$U; $U;
tolerance 1e-08;
relTol 0;
} }
} }

View File

@ -35,9 +35,9 @@ writeInterval 50;
purgeWrite 0; purgeWrite 0;
writeFormat ascii; writeFormat binary;
writePrecision 7; writePrecision 8;
writeCompression off; writeCompression off;
@ -45,11 +45,12 @@ timeFormat general;
timePrecision 6; timePrecision 6;
runTimeModifiable true; runTimeModifiable yes;
maxCo 0.3; maxCo 0.3;
maxDi 10.0; // Maximum diffusion number
maxDi 10.0;
adjustTimeStep yes; adjustTimeStep yes;

View File

@ -76,7 +76,7 @@ manualCoeffs
//// Is the case distributed //// Is the case distributed
//distributed yes; //distributed yes;
//// Per slave (so nProcs-1 entries) the directory above the case. //// Per slave (so nProcs-1 entries) the directory above the case.
//roots //roots
//( //(
// "/tmp" // "/tmp"
// "/tmp" // "/tmp"

View File

@ -21,6 +21,12 @@ solvers
solver PCG; solver PCG;
preconditioner DIC; preconditioner DIC;
tolerance 1E-06; tolerance 1E-06;
relTol 0.1;
}
TFinal
{
$T;
tolerance 1E-06;
relTol 0; relTol 0;
} }
} }

View File

@ -21,6 +21,12 @@ solvers
solver PCG; solver PCG;
preconditioner DIC; preconditioner DIC;
tolerance 1E-06; tolerance 1E-06;
relTol 0.1;
}
TFinal
{
$T;
tolerance 1E-06;
relTol 0; relTol 0;
} }
} }

View File

@ -21,6 +21,12 @@ solvers
solver PCG; solver PCG;
preconditioner DIC; preconditioner DIC;
tolerance 1E-06; tolerance 1E-06;
relTol 0.1;
}
TFinal
{
$T;
tolerance 1E-06;
relTol 0; relTol 0;
} }
} }

View File

@ -18,7 +18,7 @@ dictionaryReplacement
{ {
U U
{ {
internalField uniform (0.01 0 0); internalField uniform (0.1 0 0);
boundaryField boundaryField
{ {
@ -30,13 +30,13 @@ dictionaryReplacement
minX minX
{ {
type fixedValue; type fixedValue;
value uniform ( 0.01 0 0 ); value uniform ( 0.1 0 0 );
} }
maxX maxX
{ {
type inletOutlet; type inletOutlet;
inletValue uniform ( 0 0 0 ); inletValue uniform ( 0 0 0 );
value uniform ( 0 0 0 ); value uniform ( 0.1 0 0 );
} }
} }
} }
@ -127,25 +127,42 @@ dictionaryReplacement
} }
} }
p p_rgh
{ {
internalField uniform 100000; internalField uniform 1e5;
boundaryField boundaryField
{ {
".*" ".*"
{ {
type buoyantPressure; type buoyantPressure;
value 1e5; value uniform 1e5;
} }
maxX maxX
{ {
type waveTransmissive; type fixedValue;
gamma 1.4; value uniform 1e5;
fieldInf 100000; }
lInf 0.4; }
value uniform 100000; }
p
{
internalField uniform 1e5;
boundaryField
{
".*"
{
type calculated;
value uniform 1e5;
}
maxX
{
type calculated;
value uniform 1e5;
} }
} }
} }

View File

@ -17,13 +17,11 @@ FoamFile
ddtSchemes ddtSchemes
{ {
default Euler; default Euler;
//default CoEuler phi rho 0.1;
} }
gradSchemes gradSchemes
{ {
default Gauss linear; default Gauss linear;
// grad(U) cellLimited Gauss linear 1;
} }
divSchemes divSchemes
@ -43,7 +41,7 @@ laplacianSchemes
{ {
default none; default none;
laplacian(muEff,U) Gauss linear limited 0.333; laplacian(muEff,U) Gauss linear limited 0.333;
laplacian((rho*(1|A(U))),p) Gauss linear limited 0.333; laplacian((rho*(1|A(U))),p_rgh) Gauss linear limited 0.333;
laplacian(alphaEff,h) Gauss linear limited 0.333; laplacian(alphaEff,h) Gauss linear limited 0.333;
laplacian(DkEff,k) Gauss linear limited 0.333; laplacian(DkEff,k) Gauss linear limited 0.333;
laplacian(DepsilonEff,epsilon) Gauss linear limited 0.333; laplacian(DepsilonEff,epsilon) Gauss linear limited 0.333;
@ -63,7 +61,7 @@ snGradSchemes
fluxRequired fluxRequired
{ {
default no; default no;
p; p_rgh;
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -20,14 +20,14 @@ solvers
{ {
solver PCG solver PCG
preconditioner DIC; preconditioner DIC;
tolerance 1e-8; tolerance 1e-7;
relTol 0; relTol 0;
} }
p p_rgh
{ {
solver GAMG; solver GAMG;
tolerance 1e-8; tolerance 1e-7;
relTol 0.01; relTol 0.01;
smoother GaussSeidel; smoother GaussSeidel;
@ -36,47 +36,43 @@ solvers
nCellsInCoarsestLevel 10; nCellsInCoarsestLevel 10;
agglomerator faceAreaPair; agglomerator faceAreaPair;
mergeLevels 1; mergeLevels 1;
maxIter 100;
} }
pFinal p_rghFinal
{ {
$p; $p_rgh;
tolerance 1e-8; tolerance 1e-7;
relTol 0; relTol 0;
} }
U "(U|h|k|epsilon|R)"
{ {
solver PBiCG; solver PBiCG;
preconditioner DILU; preconditioner DILU;
tolerance 1e-08; tolerance 1e-7;
relTol 0;
}
h
{
$U;
tolerance 1e-08;
relTol 0.1; relTol 0.1;
} }
"(hFinal|k|epsilon|R)" "(U|h|k|epsilon|R)Final"
{ {
$U; $U;
tolerance 1e-07;
relTol 0;
} }
} }
PISO PISO
{ {
momentumPredictor off; momentumPredictor off;
nOuterCorrectors 1; nOuterCorrectors 1;
nCorrectors 2; nCorrectors 2;
nNonOrthogonalCorrectors 1; nNonOrthogonalCorrectors 1;
pRefPoint (-0.081 -0.0257 8.01); pRefPoint (-0.081 -0.0257 8.01);
pRefValue 1e5; pRefValue 1e5;
} }
PIMPLE PIMPLE
{ {
momentumPredictor on; momentumPredictor on;
@ -84,11 +80,10 @@ PIMPLE
nNonOrthogonalCorrectors 0; nNonOrthogonalCorrectors 0;
} }
relaxationFactors relaxationFactors
{ {
// h 0.9; h 1;
// U 0.9; U 1;
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -10,7 +10,6 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0.001";
object alphat; object alphat;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -10,7 +10,6 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0.001";
object epsilon; object epsilon;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -10,7 +10,6 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0.001";
object k; object k;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -0,0 +1,29 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 1e5;
boundaryField
{
".*"
{
type calculated;
}
}
// ************************************************************************* //

View File

@ -94,16 +94,30 @@ dictionaryReplacement
} }
} }
p p_rgh
{ {
internalField uniform 100000; internalField uniform 1e5;
boundaryField boundaryField
{ {
".*" ".*"
{ {
type buoyantPressure; type buoyantPressure;
value 1e5; value uniform 1e5;
}
}
}
p
{
internalField uniform 1e5;
boundaryField
{
".*"
{
type calculated;
value uniform 1e5;
} }
} }
} }

View File

@ -76,7 +76,7 @@ manualCoeffs
//// Is the case distributed //// Is the case distributed
//distributed yes; //distributed yes;
//// Per slave (so nProcs-1 entries) the directory above the case. //// Per slave (so nProcs-1 entries) the directory above the case.
//roots //roots
//( //(
// "/tmp" // "/tmp"
// "/tmp" // "/tmp"

View File

@ -17,13 +17,11 @@ FoamFile
ddtSchemes ddtSchemes
{ {
default Euler; default Euler;
//default CoEuler phi rho 0.1;
} }
gradSchemes gradSchemes
{ {
default Gauss linear; default Gauss linear;
// grad(U) cellLimited Gauss linear 1;
} }
divSchemes divSchemes
@ -43,7 +41,7 @@ laplacianSchemes
{ {
default none; default none;
laplacian(muEff,U) Gauss linear limited 0.333; laplacian(muEff,U) Gauss linear limited 0.333;
laplacian((rho*(1|A(U))),p) Gauss linear limited 0.333; laplacian((rho*(1|A(U))),p_rgh) Gauss linear limited 0.333;
laplacian(alphaEff,h) Gauss linear limited 0.333; laplacian(alphaEff,h) Gauss linear limited 0.333;
laplacian(DkEff,k) Gauss linear limited 0.333; laplacian(DkEff,k) Gauss linear limited 0.333;
laplacian(DepsilonEff,epsilon) Gauss linear limited 0.333; laplacian(DepsilonEff,epsilon) Gauss linear limited 0.333;
@ -63,7 +61,7 @@ snGradSchemes
fluxRequired fluxRequired
{ {
default no; default no;
p; p_rgh;
} }
// ************************************************************************* // // ************************************************************************* //

Some files were not shown because too many files have changed in this diff Show More