Thermodynamics: Completed most of the conversion of the enthalpy source
This commit is contained in:
parent
93c8dc69e1
commit
dc810ea88d
@ -14,4 +14,5 @@ volScalarField rAU(1.0/UEqn().A());
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
solve(UEqn() == -fvc::grad(p));
|
||||
K = 0.5*magSqr(U);
|
||||
}
|
||||
|
@ -54,8 +54,8 @@
|
||||
)
|
||||
);
|
||||
|
||||
Info<< "Creating field DpDt\n" << endl;
|
||||
volScalarField DpDt
|
||||
(
|
||||
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
|
||||
);
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt("dpdt", fvc::ddt(p));
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
|
@ -5,7 +5,8 @@
|
||||
+ fvm::div(phi, h)
|
||||
- fvm::laplacian(turbulence->alphaEff(), h)
|
||||
==
|
||||
DpDt
|
||||
dpdt
|
||||
- (fvc::ddt(rho, K) + fvc::div(phi, K))
|
||||
);
|
||||
|
||||
hEqn.relax();
|
||||
|
@ -83,5 +83,6 @@ Info<< "rho max/min : " << max(rho).value()
|
||||
|
||||
U -= rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||
dpdt = fvc::ddt(p);
|
||||
|
@ -85,5 +85,6 @@ Info<< "rho max/min : " << max(rho).value()
|
||||
|
||||
U -= rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||
dpdt = fvc::ddt(p);
|
||||
|
@ -5,8 +5,7 @@
|
||||
- fvm::Sp(fvc::div(phi), h)
|
||||
- fvm::laplacian(turbulence->alphaEff(), h)
|
||||
==
|
||||
fvc::div(phi/fvc::interpolate(rho), rho/psi, "div(U,p)")
|
||||
- (rho/psi)*fvc::div(phi/fvc::interpolate(rho))
|
||||
- fvc::div(phi, 0.5*magSqr(U), "div(phi,K)")
|
||||
);
|
||||
|
||||
pZones.addEnthalpySource(thermo, rho, hEqn);
|
||||
|
@ -4,7 +4,7 @@
|
||||
fvm::ddt(rho, e)
|
||||
+ fvm::div(phi, e)
|
||||
- fvm::laplacian(turbulence->alphaEff(), e)
|
||||
==
|
||||
==
|
||||
- p*fvc::div(phi/fvc::interpolate(rho))
|
||||
);
|
||||
|
||||
|
@ -23,4 +23,5 @@
|
||||
)*mesh.magSf()
|
||||
)
|
||||
);
|
||||
K = 0.5*magSqr(U);
|
||||
}
|
||||
|
@ -74,9 +74,8 @@
|
||||
// Force p_rgh to be consistent with p
|
||||
p_rgh = p - rho*gh;
|
||||
|
||||
Info<< "Creating field DpDt\n" << endl;
|
||||
volScalarField DpDt
|
||||
(
|
||||
"DpDt",
|
||||
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
|
||||
);
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt("dpdt", fvc::ddt(p));
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
|
@ -5,7 +5,8 @@
|
||||
+ fvm::div(phi, h)
|
||||
- fvm::laplacian(turbulence->alphaEff(), h)
|
||||
==
|
||||
DpDt
|
||||
dpdt
|
||||
- (fvc::ddt(rho, K) + fvc::div(phi, K))
|
||||
);
|
||||
|
||||
hEqn.relax();
|
||||
|
@ -47,6 +47,7 @@
|
||||
// calculated from the relaxed pressure
|
||||
U += rAU*fvc::reconstruct((buoyancyPhi + p_rghEqn.flux())/rhorAUf);
|
||||
U.correctBoundaryConditions();
|
||||
K = 0.5*magSqr(U);
|
||||
}
|
||||
}
|
||||
|
||||
@ -55,7 +56,7 @@
|
||||
// Second part of thermodynamic density update
|
||||
thermo.rho() += psi*p_rgh;
|
||||
|
||||
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||
dpdt = fvc::ddt(p);
|
||||
|
||||
#include "rhoEqn.H"
|
||||
#include "compressibleContinuityErrs.H"
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Initialise fluid field pointer lists
|
||||
PtrList<basicRhoThermo> thermoFluid(fluidRegions.size());
|
||||
PtrList<volScalarField> rhoFluid(fluidRegions.size());
|
||||
PtrList<volScalarField> KFluid(fluidRegions.size());
|
||||
PtrList<volScalarField> kappaFluid(fluidRegions.size());
|
||||
PtrList<volVectorField> UFluid(fluidRegions.size());
|
||||
PtrList<surfaceScalarField> phiFluid(fluidRegions.size());
|
||||
PtrList<uniformDimensionedVectorField> gFluid(fluidRegions.size());
|
||||
@ -50,15 +50,15 @@
|
||||
)
|
||||
);
|
||||
|
||||
Info<< " Adding to KFluid\n" << endl;
|
||||
KFluid.set
|
||||
Info<< " Adding to kappaFluid\n" << endl;
|
||||
kappaFluid.set
|
||||
(
|
||||
i,
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"K",
|
||||
"kappa",
|
||||
runTime.timeName(),
|
||||
fluidRegions[i],
|
||||
IOobject::NO_READ,
|
||||
|
@ -71,5 +71,5 @@
|
||||
<< max(rho).value() << endl;
|
||||
|
||||
// Update thermal conductivity
|
||||
K = thermo.Cp()*turb.alphaEff();
|
||||
kappa = thermo.Cp()*turb.alphaEff();
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
basicRhoThermo& thermo = thermoFluid[i];
|
||||
volScalarField& rho = rhoFluid[i];
|
||||
volScalarField& K = KFluid[i];
|
||||
volScalarField& kappa = kappaFluid[i];
|
||||
volVectorField& U = UFluid[i];
|
||||
surfaceScalarField& phi = phiFluid[i];
|
||||
|
||||
|
@ -7,8 +7,8 @@
|
||||
tmp<volScalarField> tcp = thermo.Cp();
|
||||
const volScalarField& cp = tcp();
|
||||
|
||||
tmp<volScalarField> tK = thermo.K();
|
||||
//tmp<volSymmTensorField> tK = thermo.directionalK();
|
||||
const volScalarField& K = tK();
|
||||
tmp<volScalarField> tkappa = thermo.K();
|
||||
//tmp<volSymmTensorField> tkappa = thermo.directionalkappa();
|
||||
const volScalarField& kappa = tkappa();
|
||||
|
||||
volScalarField& T = thermo.T();
|
||||
|
@ -3,7 +3,7 @@
|
||||
{
|
||||
fvScalarMatrix tEqn
|
||||
(
|
||||
-fvm::laplacian(K, T)
|
||||
-fvm::laplacian(kappa, T)
|
||||
);
|
||||
tEqn.relax();
|
||||
tEqn.solve();
|
||||
|
@ -22,5 +22,6 @@
|
||||
)*mesh.magSf()
|
||||
),
|
||||
mesh.solver(U.select(finalIter))
|
||||
);
|
||||
);
|
||||
K = 0.5*magSqr(U);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Initialise fluid field pointer lists
|
||||
PtrList<basicRhoThermo> thermoFluid(fluidRegions.size());
|
||||
PtrList<volScalarField> rhoFluid(fluidRegions.size());
|
||||
PtrList<volScalarField> KFluid(fluidRegions.size());
|
||||
PtrList<volScalarField> kappaFluid(fluidRegions.size());
|
||||
PtrList<volVectorField> UFluid(fluidRegions.size());
|
||||
PtrList<surfaceScalarField> phiFluid(fluidRegions.size());
|
||||
PtrList<uniformDimensionedVectorField> gFluid(fluidRegions.size());
|
||||
@ -10,7 +10,8 @@
|
||||
PtrList<volScalarField> ghFluid(fluidRegions.size());
|
||||
PtrList<surfaceScalarField> ghfFluid(fluidRegions.size());
|
||||
PtrList<radiation::radiationModel> radiation(fluidRegions.size());
|
||||
PtrList<volScalarField> DpDtFluid(fluidRegions.size());
|
||||
PtrList<volScalarField> KFluid(fluidRegions.size());
|
||||
PtrList<volScalarField> dpdtFluid(fluidRegions.size());
|
||||
|
||||
List<scalar> initialMassFluid(fluidRegions.size());
|
||||
|
||||
@ -45,15 +46,15 @@
|
||||
)
|
||||
);
|
||||
|
||||
Info<< " Adding to KFluid\n" << endl;
|
||||
KFluid.set
|
||||
Info<< " Adding to kappaFluid\n" << endl;
|
||||
kappaFluid.set
|
||||
(
|
||||
i,
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"K",
|
||||
"kappa",
|
||||
runTime.timeName(),
|
||||
fluidRegions[i],
|
||||
IOobject::NO_READ,
|
||||
@ -175,22 +176,25 @@
|
||||
|
||||
initialMassFluid[i] = fvc::domainIntegrate(rhoFluid[i]).value();
|
||||
|
||||
Info<< " Adding to DpDtFluid\n" << endl;
|
||||
DpDtFluid.set
|
||||
Info<< " Adding to KFluid\n" << endl;
|
||||
KFluid.set
|
||||
(
|
||||
i,
|
||||
new volScalarField
|
||||
(
|
||||
"DpDt",
|
||||
fvc::DDt
|
||||
(
|
||||
surfaceScalarField
|
||||
(
|
||||
"phiU",
|
||||
phiFluid[i]/fvc::interpolate(rhoFluid[i])
|
||||
),
|
||||
thermoFluid[i].p()
|
||||
)
|
||||
"K",
|
||||
0.5*magSqr(UFluid[i])
|
||||
)
|
||||
);
|
||||
|
||||
Info<< " Adding to dpdtFluid\n" << endl;
|
||||
dpdtFluid.set
|
||||
(
|
||||
i,
|
||||
new volScalarField
|
||||
(
|
||||
"dpdt",
|
||||
fvc::ddt(thermoFluid[i].p())
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -5,7 +5,8 @@
|
||||
+ fvm::div(phi, h)
|
||||
- fvm::laplacian(turb.alphaEff(), h)
|
||||
==
|
||||
DpDt
|
||||
dpdt
|
||||
- (fvc::ddt(rho, K) + fvc::div(phi, K))
|
||||
+ rad.Sh(thermo)
|
||||
);
|
||||
|
||||
|
@ -68,11 +68,13 @@
|
||||
// Correct velocity field
|
||||
U += rAU*fvc::reconstruct((phi - phiU)/rhorAUf);
|
||||
U.correctBoundaryConditions();
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
p = p_rgh + rho*gh;
|
||||
|
||||
// Update pressure substantive derivative
|
||||
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||
// Update pressure time derivative
|
||||
dpdt = fvc::ddt(p);
|
||||
|
||||
|
||||
// Solve continuity
|
||||
#include "rhoEqn.H"
|
||||
@ -91,5 +93,5 @@
|
||||
}
|
||||
|
||||
// Update thermal conductivity
|
||||
K = thermoFluid[i].Cp()*turb.alphaEff();
|
||||
kappa = thermoFluid[i].Cp()*turb.alphaEff();
|
||||
}
|
||||
|
@ -2,12 +2,13 @@
|
||||
|
||||
basicRhoThermo& thermo = thermoFluid[i];
|
||||
volScalarField& rho = rhoFluid[i];
|
||||
volScalarField& K = KFluid[i];
|
||||
volScalarField& kappa = kappaFluid[i];
|
||||
volVectorField& U = UFluid[i];
|
||||
surfaceScalarField& phi = phiFluid[i];
|
||||
|
||||
compressible::turbulenceModel& turb = turbulence[i];
|
||||
volScalarField& DpDt = DpDtFluid[i];
|
||||
volScalarField& K = KFluid[i];
|
||||
volScalarField& dpdt = dpdtFluid[i];
|
||||
|
||||
volScalarField& p = thermo.p();
|
||||
const volScalarField& psi = thermo.psi();
|
||||
|
@ -7,9 +7,9 @@
|
||||
tmp<volScalarField> tcp = thermo.Cp();
|
||||
const volScalarField& cp = tcp();
|
||||
|
||||
tmp<volScalarField> tK = thermo.K();
|
||||
//tmp<volSymmTensorField> tK = thermo.directionalK();
|
||||
const volScalarField& K = tK();
|
||||
//const volSymmTensorField& K = tK();
|
||||
tmp<volScalarField> tkappa = thermo.K();
|
||||
//tmp<volSymmTensorField> tkappa = thermo.directionalkappa();
|
||||
const volScalarField& kappa = tkappa();
|
||||
//const volSymmTensorField& kappa = tkappa();
|
||||
|
||||
volScalarField& T = thermo.T();
|
||||
|
@ -31,7 +31,7 @@ Foam::scalar Foam::solidRegionDiffNo
|
||||
const fvMesh& mesh,
|
||||
const Time& runTime,
|
||||
const volScalarField& Cprho,
|
||||
const volScalarField& K
|
||||
const volScalarField& kappa
|
||||
)
|
||||
{
|
||||
scalar DiNum = 0.0;
|
||||
@ -39,16 +39,16 @@ Foam::scalar Foam::solidRegionDiffNo
|
||||
|
||||
//- Take care: can have fluid domains with 0 cells so do not test for
|
||||
// zero internal faces.
|
||||
surfaceScalarField KrhoCpbyDelta
|
||||
surfaceScalarField kapparhoCpbyDelta
|
||||
(
|
||||
mesh.surfaceInterpolation::deltaCoeffs()
|
||||
* fvc::interpolate(K)
|
||||
* fvc::interpolate(kappa)
|
||||
/ fvc::interpolate(Cprho)
|
||||
);
|
||||
|
||||
DiNum = gMax(KrhoCpbyDelta.internalField())*runTime.deltaT().value();
|
||||
DiNum = gMax(kapparhoCpbyDelta.internalField())*runTime.deltaT().value();
|
||||
|
||||
meanDiNum = (average(KrhoCpbyDelta)).value()*runTime.deltaT().value();
|
||||
meanDiNum = (average(kapparhoCpbyDelta)).value()*runTime.deltaT().value();
|
||||
|
||||
Info<< "Region: " << mesh.name() << " Diffusion Number mean: " << meanDiNum
|
||||
<< " max: " << DiNum << endl;
|
||||
@ -62,26 +62,26 @@ Foam::scalar Foam::solidRegionDiffNo
|
||||
const fvMesh& mesh,
|
||||
const Time& runTime,
|
||||
const volScalarField& Cprho,
|
||||
const volSymmTensorField& Kdirectional
|
||||
const volSymmTensorField& kappadirectional
|
||||
)
|
||||
{
|
||||
scalar DiNum = 0.0;
|
||||
scalar meanDiNum = 0.0;
|
||||
|
||||
volScalarField K(mag(Kdirectional));
|
||||
volScalarField kappa(mag(kappadirectional));
|
||||
|
||||
//- Take care: can have fluid domains with 0 cells so do not test for
|
||||
// zero internal faces.
|
||||
surfaceScalarField KrhoCpbyDelta
|
||||
surfaceScalarField kapparhoCpbyDelta
|
||||
(
|
||||
mesh.surfaceInterpolation::deltaCoeffs()
|
||||
* fvc::interpolate(K)
|
||||
* fvc::interpolate(kappa)
|
||||
/ fvc::interpolate(Cprho)
|
||||
);
|
||||
|
||||
DiNum = gMax(KrhoCpbyDelta.internalField())*runTime.deltaT().value();
|
||||
DiNum = gMax(kapparhoCpbyDelta.internalField())*runTime.deltaT().value();
|
||||
|
||||
meanDiNum = (average(KrhoCpbyDelta)).value()*runTime.deltaT().value();
|
||||
meanDiNum = (average(kapparhoCpbyDelta)).value()*runTime.deltaT().value();
|
||||
|
||||
Info<< "Region: " << mesh.name() << " Diffusion Number mean: " << meanDiNum
|
||||
<< " max: " << DiNum << endl;
|
||||
|
@ -39,7 +39,7 @@ namespace Foam
|
||||
const fvMesh& mesh,
|
||||
const Time& runTime,
|
||||
const volScalarField& Cprho,
|
||||
const volScalarField& K
|
||||
const volScalarField& kappa
|
||||
);
|
||||
|
||||
scalar solidRegionDiffNo
|
||||
@ -47,7 +47,7 @@ namespace Foam
|
||||
const fvMesh& mesh,
|
||||
const Time& runTime,
|
||||
const volScalarField& Cprho,
|
||||
const volSymmTensorField& K
|
||||
const volSymmTensorField& kappa
|
||||
);
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
forAll(solidRegions, i)
|
||||
{
|
||||
# include "setRegionSolidFields.H"
|
||||
#include "setRegionSolidFields.H"
|
||||
|
||||
DiNum = max
|
||||
(
|
||||
@ -11,7 +11,7 @@
|
||||
solidRegions[i],
|
||||
runTime,
|
||||
rho*cp,
|
||||
K
|
||||
kappa
|
||||
),
|
||||
DiNum
|
||||
);
|
||||
|
@ -9,7 +9,7 @@ if (finalIter)
|
||||
tmp<fvScalarMatrix> TEqn
|
||||
(
|
||||
fvm::ddt(rho*cp, T)
|
||||
- fvm::laplacian(K, T)
|
||||
- fvm::laplacian(kappa, T)
|
||||
);
|
||||
TEqn().relax();
|
||||
TEqn().solve(mesh.solver(T.select(finalIter)));
|
||||
|
@ -124,20 +124,3 @@
|
||||
dimensionedScalar("one", dimless/dimTime, 1),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
Info<< "Creating field DpDt\n" << endl;
|
||||
volScalarField DpDt
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"DpDt",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("zero", dimPressure/dimTime, 0.0)
|
||||
);
|
||||
|
||||
#include "setPressureWork.H"
|
||||
|
@ -5,7 +5,7 @@
|
||||
+ mvConvection->fvmDiv(phi, hs)
|
||||
- fvm::laplacian(turbulence->alphaEff(), hs)
|
||||
==
|
||||
DpDt
|
||||
- fvc::div(phi, 0.5*magSqr(U), "div(phi,K)")
|
||||
+ parcels.Sh(hs)
|
||||
+ radiation->Shs(thermo)
|
||||
+ combustion->Sh()
|
||||
|
@ -65,7 +65,5 @@
|
||||
rho = max(rho, rhoMin);
|
||||
rho = min(rho, rhoMax);
|
||||
|
||||
#include "setPressureWork.H"
|
||||
|
||||
Info<< "p min/max = " << min(p).value() << ", " << max(p).value() << endl;
|
||||
}
|
||||
|
@ -1,13 +0,0 @@
|
||||
DpDt == dimensionedScalar("zero", DpDt.dimensions(), 0.0);
|
||||
|
||||
if (pressureWork)
|
||||
{
|
||||
surfaceScalarField phiU("phiU", phi/fvc::interpolate(rho));
|
||||
|
||||
DpDt += fvc::div(phiU*fvc::interpolate(p)) - p*fvc::div(phiU);
|
||||
|
||||
if (pressureWorkTimeDerivative)
|
||||
{
|
||||
DpDt += fvc::ddt(p);
|
||||
}
|
||||
}
|
@ -74,10 +74,10 @@ Info<< "Time scales min/max:" << endl;
|
||||
runTime.deltaTValue()
|
||||
*mag
|
||||
(
|
||||
DpDt
|
||||
+ parcels.hsTrans()/(mesh.V()*runTime.deltaT())
|
||||
// + sources(rho, hs)
|
||||
parcels.hsTrans()/(mesh.V()*runTime.deltaT())
|
||||
// + sources(rho, hs)
|
||||
+ combustion->Sh()()
|
||||
- fvc::div(phi, 0.5*magSqr(U), "div(phi,K)")()
|
||||
)
|
||||
/rho
|
||||
);
|
||||
|
@ -17,4 +17,5 @@
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
K = 0.5*magSqr(U);
|
||||
}
|
||||
|
@ -115,12 +115,11 @@
|
||||
// Set the turbulence into the combustion model
|
||||
combustion->setTurbulence(turbulence());
|
||||
|
||||
Info<< "Creating field DpDt\n" << endl;
|
||||
volScalarField DpDt
|
||||
(
|
||||
"DpDt",
|
||||
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
|
||||
);
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt("dpdt", fvc::ddt(p));
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
|
||||
Info<< "\nConstructing sources" << endl;
|
||||
IObasicSourceList sources(mesh);
|
||||
|
@ -5,7 +5,8 @@
|
||||
+ mvConvection->fvmDiv(phi, hs)
|
||||
- fvm::laplacian(turbulence->alphaEff(), hs)
|
||||
==
|
||||
DpDt
|
||||
dpdt
|
||||
- (fvc::ddt(rho, K) + fvc::div(phi, K))
|
||||
+ combustion->Sh()
|
||||
+ coalParcels.Sh(hs)
|
||||
+ limestoneParcels.Sh(hs)
|
||||
|
@ -74,5 +74,6 @@ else
|
||||
|
||||
U -= rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||
dpdt = fvc::ddt(p);
|
||||
|
@ -23,4 +23,5 @@
|
||||
)*mesh.magSf()
|
||||
)
|
||||
);
|
||||
K = 0.5*magSqr(U);
|
||||
}
|
||||
|
@ -69,13 +69,11 @@
|
||||
// Set the turbulence into the combustion model
|
||||
combustion->setTurbulence(turbulence());
|
||||
|
||||
Info<< "Creating field DpDt\n" << endl;
|
||||
volScalarField DpDt
|
||||
(
|
||||
"DpDt",
|
||||
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
|
||||
);
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt("dpdt", fvc::ddt(p));
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
|
||||
Info<< "Calculating field g.h\n" << endl;
|
||||
volScalarField gh("gh", g & mesh.C());
|
||||
|
@ -5,7 +5,8 @@
|
||||
+ mvConvection->fvmDiv(phi, hs)
|
||||
- fvm::laplacian(turbulence->alphaEff(), hs)
|
||||
==
|
||||
DpDt
|
||||
dpdt
|
||||
- (fvc::ddt(rho, K) + fvc::div(phi, K))
|
||||
+ parcels.Sh(hs)
|
||||
+ surfaceFilm.Sh()
|
||||
+ radiation->Shs(thermo)
|
||||
|
@ -43,5 +43,6 @@ p = p_rgh + rho*gh;
|
||||
|
||||
U += rAU*fvc::reconstruct((phi - phiU)/rhorAUf);
|
||||
U.correctBoundaryConditions();
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||
dpdt = fvc::ddt(p);
|
||||
|
@ -13,4 +13,5 @@
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
K = 0.5*magSqr(U);
|
||||
}
|
||||
|
@ -76,13 +76,11 @@
|
||||
// Set the turbulence into the combustion model
|
||||
combustion->setTurbulence(turbulence());
|
||||
|
||||
Info<< "Creating field DpDt\n" << endl;
|
||||
volScalarField DpDt
|
||||
(
|
||||
"DpDt",
|
||||
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
|
||||
);
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt("dpdt", fvc::ddt(p));
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||
|
||||
forAll(Y, i)
|
||||
@ -103,4 +101,4 @@
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
);
|
||||
);
|
||||
|
@ -5,10 +5,11 @@
|
||||
+ mvConvection->fvmDiv(phi, hs)
|
||||
- fvm::laplacian(turbulence->alphaEff(), hs)
|
||||
==
|
||||
DpDt
|
||||
+ parcels.Sh(hs)
|
||||
+ radiation->Shs(thermo)
|
||||
+ combustion->Sh()
|
||||
dpdt
|
||||
- (fvc::ddt(rho, K) + fvc::div(phi, K))
|
||||
+ parcels.Sh(hs)
|
||||
+ radiation->Shs(thermo)
|
||||
+ combustion->Sh()
|
||||
);
|
||||
|
||||
hEqn.relax();
|
||||
|
@ -68,6 +68,6 @@ else
|
||||
|
||||
U -= rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
|
||||
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
|
||||
dpdt = fvc::ddt(p);
|
||||
|
@ -11,7 +11,7 @@
|
||||
==
|
||||
heatTransferCoeff*T2/Cp1/rho1
|
||||
- fvm::Sp(heatTransferCoeff/Cp1/rho1, T1)
|
||||
+ alpha1*Dp1Dt/Cp1/rho1
|
||||
+ alpha1*(dpdt - (fvc::ddt(rho1, K1) + fvc::div(phi1, K1)))/Cp1/rho1
|
||||
);
|
||||
|
||||
fvScalarMatrix T2Eqn
|
||||
@ -23,7 +23,7 @@
|
||||
==
|
||||
heatTransferCoeff*T1/Cp2/rho2
|
||||
- fvm::Sp(heatTransferCoeff/Cp2/rho2, T2)
|
||||
+ alpha2*Dp2Dt/Cp2/rho2
|
||||
+ alpha2*(dpdt - (fvc::ddt(rho2, K2) + fvc::div(phi2, K2)))/Cp2/rho2
|
||||
);
|
||||
|
||||
T1Eqn.relax();
|
||||
|
@ -357,6 +357,10 @@
|
||||
volScalarField dgdt =
|
||||
pos(alpha2)*fvc::div(phi)/max(alpha2, scalar(0.0001));
|
||||
|
||||
Info<< "Creating field DpDt\n" << endl;
|
||||
volScalarField Dp1Dt(fvc::DDt(phi1, p));
|
||||
volScalarField Dp2Dt(fvc::DDt(phi2, p));
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt("dpdt", fvc::ddt(p));
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K1("K1", 0.5*magSqr(U1));
|
||||
volScalarField K2("K2", 0.5*magSqr(U2));
|
||||
|
@ -127,6 +127,8 @@
|
||||
rho1 = rho10 + psi1*p;
|
||||
rho2 = rho20 + psi2*p;
|
||||
|
||||
Dp1Dt = fvc::DDt(phi1, p);
|
||||
Dp2Dt = fvc::DDt(phi2, p);
|
||||
K1 = 0.5*magSqr(U1);
|
||||
K2 = 0.5*magSqr(U1);
|
||||
|
||||
dpdt = fvc::ddt(p);
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ divSchemes
|
||||
default none;
|
||||
div(phi,U) Gauss filteredLinear2V 0.2 0;
|
||||
div(phi,h) Gauss filteredLinear2 0.2 0;
|
||||
div(phiU,p) Gauss linear;
|
||||
div(phi,K) Gauss linear;
|
||||
div(phi,k) Gauss limitedLinear 1;
|
||||
div(phi,B) Gauss limitedLinear 1;
|
||||
div(phi,muTilda) Gauss limitedLinear 1;
|
||||
|
@ -31,7 +31,7 @@ divSchemes
|
||||
default none;
|
||||
div(phi,U) Gauss upwind;
|
||||
div(phid,p) Gauss upwind;
|
||||
div(phiU,p) Gauss linear;
|
||||
div(phi,K) Gauss linear;
|
||||
div(phi,h) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
|
@ -31,7 +31,7 @@ divSchemes
|
||||
default none;
|
||||
div(phi,U) Gauss limitedLinearV 1;
|
||||
div(phid,p) Gauss limitedLinear 1;
|
||||
div(phiU,p) Gauss linear;
|
||||
div(phi,K) Gauss linear;
|
||||
div(phi,h) Gauss limitedLinear 1;
|
||||
div(phi,k) Gauss limitedLinear 1;
|
||||
div(phi,epsilon) Gauss limitedLinear 1;
|
||||
|
@ -31,7 +31,7 @@ divSchemes
|
||||
default none;
|
||||
div(phi,U) Gauss upwind;
|
||||
div(phid,p) Gauss upwind;
|
||||
div(phiU,p) Gauss linear;
|
||||
div(phi,K) Gauss linear;
|
||||
div(phi,h) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
|
@ -33,7 +33,7 @@ divSchemes
|
||||
div(phi,k) Gauss limitedLinear 1;
|
||||
div(phi,epsilon) Gauss limitedLinear 1;
|
||||
div((muEff*dev2(T(grad(U))))) Gauss linear;
|
||||
div(phiU,p) Gauss linear;
|
||||
div(phi,K) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
|
@ -32,7 +32,7 @@ divSchemes
|
||||
div(phi,h) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(U,p) Gauss upwind;
|
||||
div(phi,K) Gauss upwind;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
|
@ -8,7 +8,7 @@
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
format binary;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
|
@ -32,7 +32,7 @@ divSchemes
|
||||
div(phi,h) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(U,p) Gauss upwind;
|
||||
div(phi,K) Gauss upwind;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
|
@ -33,7 +33,7 @@ divSchemes
|
||||
div(phi,U) Gauss upwind;
|
||||
div(phid,p) Gauss limitedLinear 1;
|
||||
div(phi,e) Gauss limitedLinear 1;
|
||||
div(phiU,p) Gauss limitedLinear 1;
|
||||
div(phi,K) Gauss limitedLinear 1;
|
||||
div((muEff*dev2(T(grad(U))))) Gauss linear 1;
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ divSchemes
|
||||
div(phi,U) Gauss upwind;
|
||||
div(phid,p) Gauss limitedLinear 1;
|
||||
div(phi,e) Gauss limitedLinear 1;
|
||||
div(phiU,p) Gauss limitedLinear 1;
|
||||
div(phi,K) Gauss limitedLinear 1;
|
||||
div((muEff*dev2(T(grad(U))))) Gauss linear 1;
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ divSchemes
|
||||
div(phi,R) Gauss upwind;
|
||||
div(R) Gauss linear;
|
||||
div(phid,p) Gauss limitedLinear 1;
|
||||
div(phiU,p) Gauss limitedLinear 1;
|
||||
div(phi,K) Gauss limitedLinear 1;
|
||||
div(phi,e) Gauss limitedLinear 1;
|
||||
div((muEff*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ divSchemes
|
||||
div(phi,R) Gauss upwind;
|
||||
div(R) Gauss linear;
|
||||
div(phid,p) Gauss limitedLinear 1;
|
||||
div(phiU,p) Gauss limitedLinear 1;
|
||||
div(phi,K) Gauss limitedLinear 1;
|
||||
div(phi,e) Gauss limitedLinear 1;
|
||||
div((muEff*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ divSchemes
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
div(phi,R) Gauss upwind;
|
||||
div(phiU,p) Gauss linear;
|
||||
div(phi,K) Gauss linear;
|
||||
div(R) Gauss linear;
|
||||
div((muEff*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,U) Gauss upwind;
|
||||
div(phiU,p) Gauss linear;
|
||||
div(phi,K) Gauss linear;
|
||||
div(phi,h) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
|
@ -28,7 +28,7 @@ divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,U) Gauss upwind;
|
||||
div(phiU,p) Gauss linear;
|
||||
div(phi,K) Gauss linear;
|
||||
div(phi,h) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
|
@ -28,7 +28,7 @@ divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,U) Gauss upwind;
|
||||
div(phiU,p) Gauss linear;
|
||||
div(phi,K) Gauss linear;
|
||||
div(phi,h) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
|
@ -28,7 +28,7 @@ divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,U) Gauss upwind;
|
||||
div(phiU,p) Gauss linear;
|
||||
div(phi,K) Gauss linear;
|
||||
div(phi,h) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
|
@ -28,7 +28,7 @@ divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,U) Gauss upwind;
|
||||
div(phiU,p) Gauss linear;
|
||||
div(phi,K) Gauss linear;
|
||||
div(phi,h) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
|
@ -28,7 +28,7 @@ divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,U) Gauss upwind;
|
||||
div(phiU,p) Gauss linear;
|
||||
div(phi,K) Gauss linear;
|
||||
div(phi,h) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
|
@ -34,7 +34,7 @@ divSchemes
|
||||
div(phi,R) Gauss upwind;
|
||||
div(R) Gauss linear;
|
||||
div(phid,p) Gauss limitedLinear 1;
|
||||
div(phiU,p) Gauss limitedLinear 1;
|
||||
div(phi,K) Gauss limitedLinear 1;
|
||||
div(phi,e) Gauss limitedLinear 1;
|
||||
div((muEff*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ divSchemes
|
||||
div(phi,U) Gauss upwind;
|
||||
div(phi,Yi_h) Gauss upwind;
|
||||
div(phi,h) Gauss upwind;
|
||||
div(phiU,p) Gauss upwind;
|
||||
div(phi,K) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div((muEff*dev2(T(grad(U))))) Gauss linear;
|
||||
|
@ -92,8 +92,6 @@ PIMPLE
|
||||
|
||||
additional
|
||||
{
|
||||
pressureWork true;
|
||||
pressureWorkTimeDerivative true;
|
||||
solveSpecies true;
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ divSchemes
|
||||
default none;
|
||||
div(phi,U) Gauss upwind;
|
||||
div(phid,p) Gauss upwind;
|
||||
div(phiU,p) Gauss linear;
|
||||
div(phi,K) Gauss linear;
|
||||
div(phi,hs) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
|
@ -79,8 +79,6 @@ PIMPLE
|
||||
|
||||
additional
|
||||
{
|
||||
pressureWork true;
|
||||
pressureWorkTimeDerivative false; // true;
|
||||
solveSpecies true;
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ divSchemes
|
||||
default none;
|
||||
div(phi,U) Gauss upwind;
|
||||
div(phid,p) Gauss upwind;
|
||||
div(phiU,p) Gauss linear;
|
||||
div(phi,K) Gauss linear;
|
||||
div(phi,hs) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
|
@ -31,7 +31,7 @@ divSchemes
|
||||
default none;
|
||||
div(phi,U) Gauss upwind;
|
||||
div(phid,p) Gauss upwind;
|
||||
div(phiU,p) Gauss linear;
|
||||
div(phi,K) Gauss linear;
|
||||
div(phi,hs) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
|
@ -31,7 +31,7 @@ divSchemes
|
||||
default none;
|
||||
div(phi,U) Gauss upwind;
|
||||
div(phid,p) Gauss upwind;
|
||||
div(phiU,p) Gauss linear;
|
||||
div(phi,K) Gauss linear;
|
||||
div(phi,hs) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
|
@ -33,7 +33,7 @@ divSchemes
|
||||
default none;
|
||||
div(phi,U) Gauss upwind;
|
||||
div(phid,p) Gauss upwind;
|
||||
div(phiU,p) Gauss linear;
|
||||
div(phi,K) Gauss linear;
|
||||
div(phi,hs) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
|
@ -30,7 +30,7 @@ divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,U) Gauss upwind;
|
||||
div(phiU,p) Gauss upwind;
|
||||
div(phi,K) Gauss upwind;
|
||||
div(phi,h) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
|
@ -30,7 +30,7 @@ divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,U) Gauss upwind;
|
||||
div(phiU,p) Gauss upwind;
|
||||
div(phi,K) Gauss upwind;
|
||||
div(phi,h) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
|
@ -30,7 +30,7 @@ divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,U) Gauss upwind;
|
||||
div(phiU,p) Gauss upwind;
|
||||
div(phi,K) Gauss upwind;
|
||||
div(phi,h) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
|
@ -30,7 +30,7 @@ divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,U) Gauss upwind;
|
||||
div(phiU,p) Gauss upwind;
|
||||
div(phi,K) Gauss upwind;
|
||||
div(phi,h) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
|
@ -31,7 +31,7 @@ divSchemes
|
||||
default none;
|
||||
div(phi,U) Gauss upwind;
|
||||
div(phid,p) Gauss upwind;
|
||||
div(phiU,p) Gauss linear;
|
||||
div(phi,K) Gauss linear;
|
||||
div(phi,hs) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
|
@ -31,7 +31,7 @@ divSchemes
|
||||
default none;
|
||||
div(phi,U) Gauss upwind;
|
||||
div(phid,p) Gauss upwind;
|
||||
div(phiU,p) Gauss linear;
|
||||
div(phi,K) Gauss linear;
|
||||
div(phi,hs) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------* \
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
|
@ -44,8 +44,8 @@ divSchemes
|
||||
div(phi,Theta) Gauss limitedLinear 1;
|
||||
div(phid1,p) Gauss upwind;
|
||||
div(phid2,p) Gauss upwind;
|
||||
div(phi1,p) Gauss linear;
|
||||
div(phi2,p) Gauss linear;
|
||||
div(phi1,K1) Gauss limitedLinearV 1;
|
||||
div(phi2,K2) Gauss limitedLinearV 1;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
|
@ -44,8 +44,8 @@ divSchemes
|
||||
div((alpha2*Rc2)) Gauss linear;
|
||||
div(phid1,p) Gauss upwind;
|
||||
div(phid2,p) Gauss upwind;
|
||||
div(phi1,p) Gauss linear;
|
||||
div(phi2,p) Gauss linear;
|
||||
div(phi1,K1) Gauss limitedLinearV 1;
|
||||
div(phi2,K2) Gauss limitedLinearV 1;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
|
Loading…
Reference in New Issue
Block a user