Thermodynamics: Completed most of the conversion of the enthalpy source

This commit is contained in:
Henry
2011-11-23 16:56:13 +00:00
parent 93c8dc69e1
commit dc810ea88d
83 changed files with 173 additions and 186 deletions

View File

@ -14,4 +14,5 @@ volScalarField rAU(1.0/UEqn().A());
if (pimple.momentumPredictor()) if (pimple.momentumPredictor())
{ {
solve(UEqn() == -fvc::grad(p)); solve(UEqn() == -fvc::grad(p));
K = 0.5*magSqr(U);
} }

View File

@ -54,8 +54,8 @@
) )
); );
Info<< "Creating field DpDt\n" << endl; Info<< "Creating field dpdt\n" << endl;
volScalarField DpDt volScalarField dpdt("dpdt", fvc::ddt(p));
(
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p) Info<< "Creating field kinetic energy K\n" << endl;
); volScalarField K("K", 0.5*magSqr(U));

View File

@ -5,7 +5,8 @@
+ fvm::div(phi, h) + fvm::div(phi, h)
- fvm::laplacian(turbulence->alphaEff(), h) - fvm::laplacian(turbulence->alphaEff(), h)
== ==
DpDt dpdt
- (fvc::ddt(rho, K) + fvc::div(phi, K))
); );
hEqn.relax(); hEqn.relax();

View File

@ -83,5 +83,6 @@ Info<< "rho max/min : " << max(rho).value()
U -= rAU*fvc::grad(p); U -= rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
K = 0.5*magSqr(U);
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); dpdt = fvc::ddt(p);

View File

@ -85,5 +85,6 @@ Info<< "rho max/min : " << max(rho).value()
U -= rAU*fvc::grad(p); U -= rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
K = 0.5*magSqr(U);
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); dpdt = fvc::ddt(p);

View File

@ -5,8 +5,7 @@
- fvm::Sp(fvc::div(phi), h) - fvm::Sp(fvc::div(phi), h)
- fvm::laplacian(turbulence->alphaEff(), h) - fvm::laplacian(turbulence->alphaEff(), h)
== ==
fvc::div(phi/fvc::interpolate(rho), rho/psi, "div(U,p)") - fvc::div(phi, 0.5*magSqr(U), "div(phi,K)")
- (rho/psi)*fvc::div(phi/fvc::interpolate(rho))
); );
pZones.addEnthalpySource(thermo, rho, hEqn); pZones.addEnthalpySource(thermo, rho, hEqn);

View File

@ -23,4 +23,5 @@
)*mesh.magSf() )*mesh.magSf()
) )
); );
K = 0.5*magSqr(U);
} }

View File

@ -74,9 +74,8 @@
// Force p_rgh to be consistent with p // Force p_rgh to be consistent with p
p_rgh = p - rho*gh; p_rgh = p - rho*gh;
Info<< "Creating field DpDt\n" << endl; Info<< "Creating field dpdt\n" << endl;
volScalarField DpDt volScalarField dpdt("dpdt", fvc::ddt(p));
(
"DpDt", Info<< "Creating field kinetic energy K\n" << endl;
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p) volScalarField K("K", 0.5*magSqr(U));
);

View File

@ -5,7 +5,8 @@
+ fvm::div(phi, h) + fvm::div(phi, h)
- fvm::laplacian(turbulence->alphaEff(), h) - fvm::laplacian(turbulence->alphaEff(), h)
== ==
DpDt dpdt
- (fvc::ddt(rho, K) + fvc::div(phi, K))
); );
hEqn.relax(); hEqn.relax();

View File

@ -47,6 +47,7 @@
// calculated from the relaxed pressure // calculated from the relaxed pressure
U += rAU*fvc::reconstruct((buoyancyPhi + p_rghEqn.flux())/rhorAUf); U += rAU*fvc::reconstruct((buoyancyPhi + p_rghEqn.flux())/rhorAUf);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
K = 0.5*magSqr(U);
} }
} }
@ -55,7 +56,7 @@
// Second part of thermodynamic density update // Second part of thermodynamic density update
thermo.rho() += psi*p_rgh; thermo.rho() += psi*p_rgh;
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); dpdt = fvc::ddt(p);
#include "rhoEqn.H" #include "rhoEqn.H"
#include "compressibleContinuityErrs.H" #include "compressibleContinuityErrs.H"

View File

@ -1,7 +1,7 @@
// Initialise fluid field pointer lists // Initialise fluid field pointer lists
PtrList<basicRhoThermo> thermoFluid(fluidRegions.size()); PtrList<basicRhoThermo> thermoFluid(fluidRegions.size());
PtrList<volScalarField> rhoFluid(fluidRegions.size()); PtrList<volScalarField> rhoFluid(fluidRegions.size());
PtrList<volScalarField> KFluid(fluidRegions.size()); PtrList<volScalarField> kappaFluid(fluidRegions.size());
PtrList<volVectorField> UFluid(fluidRegions.size()); PtrList<volVectorField> UFluid(fluidRegions.size());
PtrList<surfaceScalarField> phiFluid(fluidRegions.size()); PtrList<surfaceScalarField> phiFluid(fluidRegions.size());
PtrList<uniformDimensionedVectorField> gFluid(fluidRegions.size()); PtrList<uniformDimensionedVectorField> gFluid(fluidRegions.size());
@ -50,15 +50,15 @@
) )
); );
Info<< " Adding to KFluid\n" << endl; Info<< " Adding to kappaFluid\n" << endl;
KFluid.set kappaFluid.set
( (
i, i,
new volScalarField new volScalarField
( (
IOobject IOobject
( (
"K", "kappa",
runTime.timeName(), runTime.timeName(),
fluidRegions[i], fluidRegions[i],
IOobject::NO_READ, IOobject::NO_READ,

View File

@ -71,5 +71,5 @@
<< max(rho).value() << endl; << max(rho).value() << endl;
// Update thermal conductivity // Update thermal conductivity
K = thermo.Cp()*turb.alphaEff(); kappa = thermo.Cp()*turb.alphaEff();
} }

View File

@ -2,7 +2,7 @@
basicRhoThermo& thermo = thermoFluid[i]; basicRhoThermo& thermo = thermoFluid[i];
volScalarField& rho = rhoFluid[i]; volScalarField& rho = rhoFluid[i];
volScalarField& K = KFluid[i]; volScalarField& kappa = kappaFluid[i];
volVectorField& U = UFluid[i]; volVectorField& U = UFluid[i];
surfaceScalarField& phi = phiFluid[i]; surfaceScalarField& phi = phiFluid[i];

View File

@ -7,8 +7,8 @@
tmp<volScalarField> tcp = thermo.Cp(); tmp<volScalarField> tcp = thermo.Cp();
const volScalarField& cp = tcp(); const volScalarField& cp = tcp();
tmp<volScalarField> tK = thermo.K(); tmp<volScalarField> tkappa = thermo.K();
//tmp<volSymmTensorField> tK = thermo.directionalK(); //tmp<volSymmTensorField> tkappa = thermo.directionalkappa();
const volScalarField& K = tK(); const volScalarField& kappa = tkappa();
volScalarField& T = thermo.T(); volScalarField& T = thermo.T();

View File

@ -3,7 +3,7 @@
{ {
fvScalarMatrix tEqn fvScalarMatrix tEqn
( (
-fvm::laplacian(K, T) -fvm::laplacian(kappa, T)
); );
tEqn.relax(); tEqn.relax();
tEqn.solve(); tEqn.solve();

View File

@ -23,4 +23,5 @@
), ),
mesh.solver(U.select(finalIter)) mesh.solver(U.select(finalIter))
); );
K = 0.5*magSqr(U);
} }

View File

@ -1,7 +1,7 @@
// Initialise fluid field pointer lists // Initialise fluid field pointer lists
PtrList<basicRhoThermo> thermoFluid(fluidRegions.size()); PtrList<basicRhoThermo> thermoFluid(fluidRegions.size());
PtrList<volScalarField> rhoFluid(fluidRegions.size()); PtrList<volScalarField> rhoFluid(fluidRegions.size());
PtrList<volScalarField> KFluid(fluidRegions.size()); PtrList<volScalarField> kappaFluid(fluidRegions.size());
PtrList<volVectorField> UFluid(fluidRegions.size()); PtrList<volVectorField> UFluid(fluidRegions.size());
PtrList<surfaceScalarField> phiFluid(fluidRegions.size()); PtrList<surfaceScalarField> phiFluid(fluidRegions.size());
PtrList<uniformDimensionedVectorField> gFluid(fluidRegions.size()); PtrList<uniformDimensionedVectorField> gFluid(fluidRegions.size());
@ -10,7 +10,8 @@
PtrList<volScalarField> ghFluid(fluidRegions.size()); PtrList<volScalarField> ghFluid(fluidRegions.size());
PtrList<surfaceScalarField> ghfFluid(fluidRegions.size()); PtrList<surfaceScalarField> ghfFluid(fluidRegions.size());
PtrList<radiation::radiationModel> radiation(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()); List<scalar> initialMassFluid(fluidRegions.size());
@ -45,15 +46,15 @@
) )
); );
Info<< " Adding to KFluid\n" << endl; Info<< " Adding to kappaFluid\n" << endl;
KFluid.set kappaFluid.set
( (
i, i,
new volScalarField new volScalarField
( (
IOobject IOobject
( (
"K", "kappa",
runTime.timeName(), runTime.timeName(),
fluidRegions[i], fluidRegions[i],
IOobject::NO_READ, IOobject::NO_READ,
@ -175,22 +176,25 @@
initialMassFluid[i] = fvc::domainIntegrate(rhoFluid[i]).value(); initialMassFluid[i] = fvc::domainIntegrate(rhoFluid[i]).value();
Info<< " Adding to DpDtFluid\n" << endl; Info<< " Adding to KFluid\n" << endl;
DpDtFluid.set KFluid.set
( (
i, i,
new volScalarField new volScalarField
( (
"DpDt", "K",
fvc::DDt 0.5*magSqr(UFluid[i])
(
surfaceScalarField
(
"phiU",
phiFluid[i]/fvc::interpolate(rhoFluid[i])
),
thermoFluid[i].p()
) )
);
Info<< " Adding to dpdtFluid\n" << endl;
dpdtFluid.set
(
i,
new volScalarField
(
"dpdt",
fvc::ddt(thermoFluid[i].p())
) )
); );
} }

View File

@ -5,7 +5,8 @@
+ fvm::div(phi, h) + fvm::div(phi, h)
- fvm::laplacian(turb.alphaEff(), h) - fvm::laplacian(turb.alphaEff(), h)
== ==
DpDt dpdt
- (fvc::ddt(rho, K) + fvc::div(phi, K))
+ rad.Sh(thermo) + rad.Sh(thermo)
); );

View File

@ -68,11 +68,13 @@
// Correct velocity field // Correct velocity field
U += rAU*fvc::reconstruct((phi - phiU)/rhorAUf); U += rAU*fvc::reconstruct((phi - phiU)/rhorAUf);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
K = 0.5*magSqr(U);
p = p_rgh + rho*gh; p = p_rgh + rho*gh;
// Update pressure substantive derivative // Update pressure time derivative
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); dpdt = fvc::ddt(p);
// Solve continuity // Solve continuity
#include "rhoEqn.H" #include "rhoEqn.H"
@ -91,5 +93,5 @@
} }
// Update thermal conductivity // Update thermal conductivity
K = thermoFluid[i].Cp()*turb.alphaEff(); kappa = thermoFluid[i].Cp()*turb.alphaEff();
} }

View File

@ -2,12 +2,13 @@
basicRhoThermo& thermo = thermoFluid[i]; basicRhoThermo& thermo = thermoFluid[i];
volScalarField& rho = rhoFluid[i]; volScalarField& rho = rhoFluid[i];
volScalarField& K = KFluid[i]; volScalarField& kappa = kappaFluid[i];
volVectorField& U = UFluid[i]; volVectorField& U = UFluid[i];
surfaceScalarField& phi = phiFluid[i]; surfaceScalarField& phi = phiFluid[i];
compressible::turbulenceModel& turb = turbulence[i]; compressible::turbulenceModel& turb = turbulence[i];
volScalarField& DpDt = DpDtFluid[i]; volScalarField& K = KFluid[i];
volScalarField& dpdt = dpdtFluid[i];
volScalarField& p = thermo.p(); volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi(); const volScalarField& psi = thermo.psi();

View File

@ -7,9 +7,9 @@
tmp<volScalarField> tcp = thermo.Cp(); tmp<volScalarField> tcp = thermo.Cp();
const volScalarField& cp = tcp(); const volScalarField& cp = tcp();
tmp<volScalarField> tK = thermo.K(); tmp<volScalarField> tkappa = thermo.K();
//tmp<volSymmTensorField> tK = thermo.directionalK(); //tmp<volSymmTensorField> tkappa = thermo.directionalkappa();
const volScalarField& K = tK(); const volScalarField& kappa = tkappa();
//const volSymmTensorField& K = tK(); //const volSymmTensorField& kappa = tkappa();
volScalarField& T = thermo.T(); volScalarField& T = thermo.T();

View File

@ -31,7 +31,7 @@ Foam::scalar Foam::solidRegionDiffNo
const fvMesh& mesh, const fvMesh& mesh,
const Time& runTime, const Time& runTime,
const volScalarField& Cprho, const volScalarField& Cprho,
const volScalarField& K const volScalarField& kappa
) )
{ {
scalar DiNum = 0.0; 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 //- Take care: can have fluid domains with 0 cells so do not test for
// zero internal faces. // zero internal faces.
surfaceScalarField KrhoCpbyDelta surfaceScalarField kapparhoCpbyDelta
( (
mesh.surfaceInterpolation::deltaCoeffs() mesh.surfaceInterpolation::deltaCoeffs()
* fvc::interpolate(K) * fvc::interpolate(kappa)
/ fvc::interpolate(Cprho) / 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 Info<< "Region: " << mesh.name() << " Diffusion Number mean: " << meanDiNum
<< " max: " << DiNum << endl; << " max: " << DiNum << endl;
@ -62,26 +62,26 @@ Foam::scalar Foam::solidRegionDiffNo
const fvMesh& mesh, const fvMesh& mesh,
const Time& runTime, const Time& runTime,
const volScalarField& Cprho, const volScalarField& Cprho,
const volSymmTensorField& Kdirectional const volSymmTensorField& kappadirectional
) )
{ {
scalar DiNum = 0.0; scalar DiNum = 0.0;
scalar meanDiNum = 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 //- Take care: can have fluid domains with 0 cells so do not test for
// zero internal faces. // zero internal faces.
surfaceScalarField KrhoCpbyDelta surfaceScalarField kapparhoCpbyDelta
( (
mesh.surfaceInterpolation::deltaCoeffs() mesh.surfaceInterpolation::deltaCoeffs()
* fvc::interpolate(K) * fvc::interpolate(kappa)
/ fvc::interpolate(Cprho) / 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 Info<< "Region: " << mesh.name() << " Diffusion Number mean: " << meanDiNum
<< " max: " << DiNum << endl; << " max: " << DiNum << endl;

View File

@ -39,7 +39,7 @@ namespace Foam
const fvMesh& mesh, const fvMesh& mesh,
const Time& runTime, const Time& runTime,
const volScalarField& Cprho, const volScalarField& Cprho,
const volScalarField& K const volScalarField& kappa
); );
scalar solidRegionDiffNo scalar solidRegionDiffNo
@ -47,7 +47,7 @@ namespace Foam
const fvMesh& mesh, const fvMesh& mesh,
const Time& runTime, const Time& runTime,
const volScalarField& Cprho, const volScalarField& Cprho,
const volSymmTensorField& K const volSymmTensorField& kappa
); );
} }

View File

@ -11,7 +11,7 @@
solidRegions[i], solidRegions[i],
runTime, runTime,
rho*cp, rho*cp,
K kappa
), ),
DiNum DiNum
); );

View File

@ -9,7 +9,7 @@ if (finalIter)
tmp<fvScalarMatrix> TEqn tmp<fvScalarMatrix> TEqn
( (
fvm::ddt(rho*cp, T) fvm::ddt(rho*cp, T)
- fvm::laplacian(K, T) - fvm::laplacian(kappa, T)
); );
TEqn().relax(); TEqn().relax();
TEqn().solve(mesh.solver(T.select(finalIter))); TEqn().solve(mesh.solver(T.select(finalIter)));

View File

@ -124,20 +124,3 @@
dimensionedScalar("one", dimless/dimTime, 1), dimensionedScalar("one", dimless/dimTime, 1),
zeroGradientFvPatchScalarField::typeName 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"

View File

@ -5,7 +5,7 @@
+ mvConvection->fvmDiv(phi, hs) + mvConvection->fvmDiv(phi, hs)
- fvm::laplacian(turbulence->alphaEff(), hs) - fvm::laplacian(turbulence->alphaEff(), hs)
== ==
DpDt - fvc::div(phi, 0.5*magSqr(U), "div(phi,K)")
+ parcels.Sh(hs) + parcels.Sh(hs)
+ radiation->Shs(thermo) + radiation->Shs(thermo)
+ combustion->Sh() + combustion->Sh()

View File

@ -65,7 +65,5 @@
rho = max(rho, rhoMin); rho = max(rho, rhoMin);
rho = min(rho, rhoMax); rho = min(rho, rhoMax);
#include "setPressureWork.H"
Info<< "p min/max = " << min(p).value() << ", " << max(p).value() << endl; Info<< "p min/max = " << min(p).value() << ", " << max(p).value() << endl;
} }

View File

@ -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);
}
}

View File

@ -74,10 +74,10 @@ Info<< "Time scales min/max:" << endl;
runTime.deltaTValue() runTime.deltaTValue()
*mag *mag
( (
DpDt parcels.hsTrans()/(mesh.V()*runTime.deltaT())
+ parcels.hsTrans()/(mesh.V()*runTime.deltaT())
// + sources(rho, hs) // + sources(rho, hs)
+ combustion->Sh()() + combustion->Sh()()
- fvc::div(phi, 0.5*magSqr(U), "div(phi,K)")()
) )
/rho /rho
); );

View File

@ -17,4 +17,5 @@
if (pimple.momentumPredictor()) if (pimple.momentumPredictor())
{ {
solve(UEqn == -fvc::grad(p)); solve(UEqn == -fvc::grad(p));
K = 0.5*magSqr(U);
} }

View File

@ -115,12 +115,11 @@
// Set the turbulence into the combustion model // Set the turbulence into the combustion model
combustion->setTurbulence(turbulence()); combustion->setTurbulence(turbulence());
Info<< "Creating field DpDt\n" << endl; Info<< "Creating field dpdt\n" << endl;
volScalarField DpDt volScalarField dpdt("dpdt", fvc::ddt(p));
(
"DpDt", Info<< "Creating field kinetic energy K\n" << endl;
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p) volScalarField K("K", 0.5*magSqr(U));
);
Info<< "\nConstructing sources" << endl; Info<< "\nConstructing sources" << endl;
IObasicSourceList sources(mesh); IObasicSourceList sources(mesh);

View File

@ -5,7 +5,8 @@
+ mvConvection->fvmDiv(phi, hs) + mvConvection->fvmDiv(phi, hs)
- fvm::laplacian(turbulence->alphaEff(), hs) - fvm::laplacian(turbulence->alphaEff(), hs)
== ==
DpDt dpdt
- (fvc::ddt(rho, K) + fvc::div(phi, K))
+ combustion->Sh() + combustion->Sh()
+ coalParcels.Sh(hs) + coalParcels.Sh(hs)
+ limestoneParcels.Sh(hs) + limestoneParcels.Sh(hs)

View File

@ -74,5 +74,6 @@ else
U -= rAU*fvc::grad(p); U -= rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
K = 0.5*magSqr(U);
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); dpdt = fvc::ddt(p);

View File

@ -23,4 +23,5 @@
)*mesh.magSf() )*mesh.magSf()
) )
); );
K = 0.5*magSqr(U);
} }

View File

@ -69,13 +69,11 @@
// Set the turbulence into the combustion model // Set the turbulence into the combustion model
combustion->setTurbulence(turbulence()); combustion->setTurbulence(turbulence());
Info<< "Creating field DpDt\n" << endl; Info<< "Creating field dpdt\n" << endl;
volScalarField DpDt volScalarField dpdt("dpdt", fvc::ddt(p));
(
"DpDt",
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
);
Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U));
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());

View File

@ -5,7 +5,8 @@
+ mvConvection->fvmDiv(phi, hs) + mvConvection->fvmDiv(phi, hs)
- fvm::laplacian(turbulence->alphaEff(), hs) - fvm::laplacian(turbulence->alphaEff(), hs)
== ==
DpDt dpdt
- (fvc::ddt(rho, K) + fvc::div(phi, K))
+ parcels.Sh(hs) + parcels.Sh(hs)
+ surfaceFilm.Sh() + surfaceFilm.Sh()
+ radiation->Shs(thermo) + radiation->Shs(thermo)

View File

@ -43,5 +43,6 @@ p = p_rgh + rho*gh;
U += rAU*fvc::reconstruct((phi - phiU)/rhorAUf); U += rAU*fvc::reconstruct((phi - phiU)/rhorAUf);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
K = 0.5*magSqr(U);
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); dpdt = fvc::ddt(p);

View File

@ -13,4 +13,5 @@
if (pimple.momentumPredictor()) if (pimple.momentumPredictor())
{ {
solve(UEqn == -fvc::grad(p)); solve(UEqn == -fvc::grad(p));
K = 0.5*magSqr(U);
} }

View File

@ -76,13 +76,11 @@
// Set the turbulence into the combustion model // Set the turbulence into the combustion model
combustion->setTurbulence(turbulence()); combustion->setTurbulence(turbulence());
Info<< "Creating field DpDt\n" << endl; Info<< "Creating field dpdt\n" << endl;
volScalarField DpDt volScalarField dpdt("dpdt", fvc::ddt(p));
(
"DpDt",
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
);
Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U));
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields; multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
forAll(Y, i) forAll(Y, i)

View File

@ -5,7 +5,8 @@
+ mvConvection->fvmDiv(phi, hs) + mvConvection->fvmDiv(phi, hs)
- fvm::laplacian(turbulence->alphaEff(), hs) - fvm::laplacian(turbulence->alphaEff(), hs)
== ==
DpDt dpdt
- (fvc::ddt(rho, K) + fvc::div(phi, K))
+ parcels.Sh(hs) + parcels.Sh(hs)
+ radiation->Shs(thermo) + radiation->Shs(thermo)
+ combustion->Sh() + combustion->Sh()

View File

@ -68,6 +68,6 @@ else
U -= rAU*fvc::grad(p); U -= rAU*fvc::grad(p);
U.correctBoundaryConditions(); U.correctBoundaryConditions();
K = 0.5*magSqr(U);
dpdt = fvc::ddt(p);
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);

View File

@ -11,7 +11,7 @@
== ==
heatTransferCoeff*T2/Cp1/rho1 heatTransferCoeff*T2/Cp1/rho1
- fvm::Sp(heatTransferCoeff/Cp1/rho1, T1) - fvm::Sp(heatTransferCoeff/Cp1/rho1, T1)
+ alpha1*Dp1Dt/Cp1/rho1 + alpha1*(dpdt - (fvc::ddt(rho1, K1) + fvc::div(phi1, K1)))/Cp1/rho1
); );
fvScalarMatrix T2Eqn fvScalarMatrix T2Eqn
@ -23,7 +23,7 @@
== ==
heatTransferCoeff*T1/Cp2/rho2 heatTransferCoeff*T1/Cp2/rho2
- fvm::Sp(heatTransferCoeff/Cp2/rho2, T2) - fvm::Sp(heatTransferCoeff/Cp2/rho2, T2)
+ alpha2*Dp2Dt/Cp2/rho2 + alpha2*(dpdt - (fvc::ddt(rho2, K2) + fvc::div(phi2, K2)))/Cp2/rho2
); );
T1Eqn.relax(); T1Eqn.relax();

View File

@ -357,6 +357,10 @@
volScalarField dgdt = volScalarField dgdt =
pos(alpha2)*fvc::div(phi)/max(alpha2, scalar(0.0001)); pos(alpha2)*fvc::div(phi)/max(alpha2, scalar(0.0001));
Info<< "Creating field DpDt\n" << endl;
volScalarField Dp1Dt(fvc::DDt(phi1, p)); Info<< "Creating field dpdt\n" << endl;
volScalarField Dp2Dt(fvc::DDt(phi2, p)); 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));

View File

@ -127,6 +127,8 @@
rho1 = rho10 + psi1*p; rho1 = rho10 + psi1*p;
rho2 = rho20 + psi2*p; rho2 = rho20 + psi2*p;
Dp1Dt = fvc::DDt(phi1, p); K1 = 0.5*magSqr(U1);
Dp2Dt = fvc::DDt(phi2, p); K2 = 0.5*magSqr(U1);
dpdt = fvc::ddt(p);
} }

View File

@ -30,7 +30,7 @@ divSchemes
default none; default none;
div(phi,U) Gauss filteredLinear2V 0.2 0; div(phi,U) Gauss filteredLinear2V 0.2 0;
div(phi,h) Gauss filteredLinear2 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,k) Gauss limitedLinear 1;
div(phi,B) Gauss limitedLinear 1; div(phi,B) Gauss limitedLinear 1;
div(phi,muTilda) Gauss limitedLinear 1; div(phi,muTilda) Gauss limitedLinear 1;

View File

@ -31,7 +31,7 @@ divSchemes
default none; default none;
div(phi,U) Gauss upwind; div(phi,U) Gauss upwind;
div(phid,p) Gauss upwind; div(phid,p) Gauss upwind;
div(phiU,p) Gauss linear; div(phi,K) Gauss linear;
div(phi,h) Gauss upwind; div(phi,h) Gauss upwind;
div(phi,k) Gauss upwind; div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind; div(phi,epsilon) Gauss upwind;

View File

@ -31,7 +31,7 @@ divSchemes
default none; default none;
div(phi,U) Gauss limitedLinearV 1; div(phi,U) Gauss limitedLinearV 1;
div(phid,p) Gauss limitedLinear 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,h) Gauss limitedLinear 1;
div(phi,k) Gauss limitedLinear 1; div(phi,k) Gauss limitedLinear 1;
div(phi,epsilon) Gauss limitedLinear 1; div(phi,epsilon) Gauss limitedLinear 1;

View File

@ -31,7 +31,7 @@ divSchemes
default none; default none;
div(phi,U) Gauss upwind; div(phi,U) Gauss upwind;
div(phid,p) Gauss upwind; div(phid,p) Gauss upwind;
div(phiU,p) Gauss linear; div(phi,K) Gauss linear;
div(phi,h) Gauss upwind; div(phi,h) Gauss upwind;
div(phi,k) Gauss upwind; div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind; div(phi,epsilon) Gauss upwind;

View File

@ -33,7 +33,7 @@ divSchemes
div(phi,k) Gauss limitedLinear 1; div(phi,k) Gauss limitedLinear 1;
div(phi,epsilon) Gauss limitedLinear 1; div(phi,epsilon) Gauss limitedLinear 1;
div((muEff*dev2(T(grad(U))))) Gauss linear; div((muEff*dev2(T(grad(U))))) Gauss linear;
div(phiU,p) Gauss linear; div(phi,K) Gauss linear;
} }
laplacianSchemes laplacianSchemes

View File

@ -32,7 +32,7 @@ divSchemes
div(phi,h) Gauss upwind; div(phi,h) Gauss upwind;
div(phi,epsilon) Gauss upwind; div(phi,epsilon) Gauss upwind;
div(phi,k) Gauss upwind; div(phi,k) Gauss upwind;
div(U,p) Gauss upwind; div(phi,K) Gauss upwind;
} }
laplacianSchemes laplacianSchemes

View File

@ -8,7 +8,7 @@
FoamFile FoamFile
{ {
version 2.0; version 2.0;
format ascii; format binary;
class polyBoundaryMesh; class polyBoundaryMesh;
location "constant/polyMesh"; location "constant/polyMesh";
object boundary; object boundary;

View File

@ -32,7 +32,7 @@ divSchemes
div(phi,h) Gauss upwind; div(phi,h) Gauss upwind;
div(phi,epsilon) Gauss upwind; div(phi,epsilon) Gauss upwind;
div(phi,k) Gauss upwind; div(phi,k) Gauss upwind;
div(U,p) Gauss upwind; div(phi,K) Gauss upwind;
} }
laplacianSchemes laplacianSchemes

View File

@ -33,7 +33,7 @@ divSchemes
div(phi,U) Gauss upwind; div(phi,U) Gauss upwind;
div(phid,p) Gauss limitedLinear 1; div(phid,p) Gauss limitedLinear 1;
div(phi,e) 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; div((muEff*dev2(T(grad(U))))) Gauss linear 1;
} }

View File

@ -33,7 +33,7 @@ divSchemes
div(phi,U) Gauss upwind; div(phi,U) Gauss upwind;
div(phid,p) Gauss limitedLinear 1; div(phid,p) Gauss limitedLinear 1;
div(phi,e) 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; div((muEff*dev2(T(grad(U))))) Gauss linear 1;
} }

View File

@ -34,7 +34,7 @@ divSchemes
div(phi,R) Gauss upwind; div(phi,R) Gauss upwind;
div(R) Gauss linear; div(R) Gauss linear;
div(phid,p) Gauss limitedLinear 1; 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(phi,e) Gauss limitedLinear 1;
div((muEff*dev2(T(grad(U))))) Gauss linear; div((muEff*dev2(T(grad(U))))) Gauss linear;
} }

View File

@ -34,7 +34,7 @@ divSchemes
div(phi,R) Gauss upwind; div(phi,R) Gauss upwind;
div(R) Gauss linear; div(R) Gauss linear;
div(phid,p) Gauss limitedLinear 1; 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(phi,e) Gauss limitedLinear 1;
div((muEff*dev2(T(grad(U))))) Gauss linear; div((muEff*dev2(T(grad(U))))) Gauss linear;
} }

View File

@ -33,7 +33,7 @@ divSchemes
div(phi,k) Gauss upwind; div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind; div(phi,epsilon) Gauss upwind;
div(phi,R) Gauss upwind; div(phi,R) Gauss upwind;
div(phiU,p) Gauss linear; div(phi,K) Gauss linear;
div(R) Gauss linear; div(R) Gauss linear;
div((muEff*dev2(T(grad(U))))) Gauss linear; div((muEff*dev2(T(grad(U))))) Gauss linear;
} }

View File

@ -28,7 +28,7 @@ divSchemes
{ {
default none; default none;
div(phi,U) Gauss upwind; div(phi,U) Gauss upwind;
div(phiU,p) Gauss linear; div(phi,K) Gauss linear;
div(phi,h) Gauss upwind; div(phi,h) Gauss upwind;
div(phi,k) Gauss upwind; div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind; div(phi,epsilon) Gauss upwind;

View File

@ -28,7 +28,7 @@ divSchemes
{ {
default none; default none;
div(phi,U) Gauss upwind; div(phi,U) Gauss upwind;
div(phiU,p) Gauss linear; div(phi,K) Gauss linear;
div(phi,h) Gauss upwind; div(phi,h) Gauss upwind;
div(phi,k) Gauss upwind; div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind; div(phi,epsilon) Gauss upwind;

View File

@ -28,7 +28,7 @@ divSchemes
{ {
default none; default none;
div(phi,U) Gauss upwind; div(phi,U) Gauss upwind;
div(phiU,p) Gauss linear; div(phi,K) Gauss linear;
div(phi,h) Gauss upwind; div(phi,h) Gauss upwind;
div(phi,k) Gauss upwind; div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind; div(phi,epsilon) Gauss upwind;

View File

@ -28,7 +28,7 @@ divSchemes
{ {
default none; default none;
div(phi,U) Gauss upwind; div(phi,U) Gauss upwind;
div(phiU,p) Gauss linear; div(phi,K) Gauss linear;
div(phi,h) Gauss upwind; div(phi,h) Gauss upwind;
div(phi,k) Gauss upwind; div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind; div(phi,epsilon) Gauss upwind;

View File

@ -28,7 +28,7 @@ divSchemes
{ {
default none; default none;
div(phi,U) Gauss upwind; div(phi,U) Gauss upwind;
div(phiU,p) Gauss linear; div(phi,K) Gauss linear;
div(phi,h) Gauss upwind; div(phi,h) Gauss upwind;
div(phi,k) Gauss upwind; div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind; div(phi,epsilon) Gauss upwind;

View File

@ -28,7 +28,7 @@ divSchemes
{ {
default none; default none;
div(phi,U) Gauss upwind; div(phi,U) Gauss upwind;
div(phiU,p) Gauss linear; div(phi,K) Gauss linear;
div(phi,h) Gauss upwind; div(phi,h) Gauss upwind;
div(phi,k) Gauss upwind; div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind; div(phi,epsilon) Gauss upwind;

View File

@ -34,7 +34,7 @@ divSchemes
div(phi,R) Gauss upwind; div(phi,R) Gauss upwind;
div(R) Gauss linear; div(R) Gauss linear;
div(phid,p) Gauss limitedLinear 1; 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(phi,e) Gauss limitedLinear 1;
div((muEff*dev2(T(grad(U))))) Gauss linear; div((muEff*dev2(T(grad(U))))) Gauss linear;
} }

View File

@ -33,7 +33,7 @@ divSchemes
div(phi,U) Gauss upwind; div(phi,U) Gauss upwind;
div(phi,Yi_h) Gauss upwind; div(phi,Yi_h) Gauss upwind;
div(phi,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,epsilon) Gauss upwind;
div(phi,k) Gauss upwind; div(phi,k) Gauss upwind;
div((muEff*dev2(T(grad(U))))) Gauss linear; div((muEff*dev2(T(grad(U))))) Gauss linear;

View File

@ -92,8 +92,6 @@ PIMPLE
additional additional
{ {
pressureWork true;
pressureWorkTimeDerivative true;
solveSpecies true; solveSpecies true;
} }

View File

@ -31,7 +31,7 @@ divSchemes
default none; default none;
div(phi,U) Gauss upwind; div(phi,U) Gauss upwind;
div(phid,p) Gauss upwind; div(phid,p) Gauss upwind;
div(phiU,p) Gauss linear; div(phi,K) Gauss linear;
div(phi,hs) Gauss upwind; div(phi,hs) Gauss upwind;
div(phi,k) Gauss upwind; div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind; div(phi,epsilon) Gauss upwind;

View File

@ -79,8 +79,6 @@ PIMPLE
additional additional
{ {
pressureWork true;
pressureWorkTimeDerivative false; // true;
solveSpecies true; solveSpecies true;
} }

View File

@ -31,7 +31,7 @@ divSchemes
default none; default none;
div(phi,U) Gauss upwind; div(phi,U) Gauss upwind;
div(phid,p) Gauss upwind; div(phid,p) Gauss upwind;
div(phiU,p) Gauss linear; div(phi,K) Gauss linear;
div(phi,hs) Gauss upwind; div(phi,hs) Gauss upwind;
div(phi,k) Gauss upwind; div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind; div(phi,epsilon) Gauss upwind;

View File

@ -31,7 +31,7 @@ divSchemes
default none; default none;
div(phi,U) Gauss upwind; div(phi,U) Gauss upwind;
div(phid,p) Gauss upwind; div(phid,p) Gauss upwind;
div(phiU,p) Gauss linear; div(phi,K) Gauss linear;
div(phi,hs) Gauss upwind; div(phi,hs) Gauss upwind;
div(phi,k) Gauss upwind; div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind; div(phi,epsilon) Gauss upwind;

View File

@ -31,7 +31,7 @@ divSchemes
default none; default none;
div(phi,U) Gauss upwind; div(phi,U) Gauss upwind;
div(phid,p) Gauss upwind; div(phid,p) Gauss upwind;
div(phiU,p) Gauss linear; div(phi,K) Gauss linear;
div(phi,hs) Gauss upwind; div(phi,hs) Gauss upwind;
div(phi,k) Gauss upwind; div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind; div(phi,epsilon) Gauss upwind;

View File

@ -33,7 +33,7 @@ divSchemes
default none; default none;
div(phi,U) Gauss upwind; div(phi,U) Gauss upwind;
div(phid,p) Gauss upwind; div(phid,p) Gauss upwind;
div(phiU,p) Gauss linear; div(phi,K) Gauss linear;
div(phi,hs) Gauss upwind; div(phi,hs) Gauss upwind;
div(phi,k) Gauss upwind; div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind; div(phi,epsilon) Gauss upwind;

View File

@ -30,7 +30,7 @@ divSchemes
{ {
default none; default none;
div(phi,U) Gauss upwind; div(phi,U) Gauss upwind;
div(phiU,p) Gauss upwind; div(phi,K) Gauss upwind;
div(phi,h) Gauss upwind; div(phi,h) Gauss upwind;
div(phi,k) Gauss upwind; div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind; div(phi,epsilon) Gauss upwind;

View File

@ -30,7 +30,7 @@ divSchemes
{ {
default none; default none;
div(phi,U) Gauss upwind; div(phi,U) Gauss upwind;
div(phiU,p) Gauss upwind; div(phi,K) Gauss upwind;
div(phi,h) Gauss upwind; div(phi,h) Gauss upwind;
div(phi,k) Gauss upwind; div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind; div(phi,epsilon) Gauss upwind;

View File

@ -30,7 +30,7 @@ divSchemes
{ {
default none; default none;
div(phi,U) Gauss upwind; div(phi,U) Gauss upwind;
div(phiU,p) Gauss upwind; div(phi,K) Gauss upwind;
div(phi,h) Gauss upwind; div(phi,h) Gauss upwind;
div(phi,k) Gauss upwind; div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind; div(phi,epsilon) Gauss upwind;

View File

@ -30,7 +30,7 @@ divSchemes
{ {
default none; default none;
div(phi,U) Gauss upwind; div(phi,U) Gauss upwind;
div(phiU,p) Gauss upwind; div(phi,K) Gauss upwind;
div(phi,h) Gauss upwind; div(phi,h) Gauss upwind;
div(phi,k) Gauss upwind; div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind; div(phi,epsilon) Gauss upwind;

View File

@ -31,7 +31,7 @@ divSchemes
default none; default none;
div(phi,U) Gauss upwind; div(phi,U) Gauss upwind;
div(phid,p) Gauss upwind; div(phid,p) Gauss upwind;
div(phiU,p) Gauss linear; div(phi,K) Gauss linear;
div(phi,hs) Gauss upwind; div(phi,hs) Gauss upwind;
div(phi,k) Gauss upwind; div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind; div(phi,epsilon) Gauss upwind;

View File

@ -31,7 +31,7 @@ divSchemes
default none; default none;
div(phi,U) Gauss upwind; div(phi,U) Gauss upwind;
div(phid,p) Gauss upwind; div(phid,p) Gauss upwind;
div(phiU,p) Gauss linear; div(phi,K) Gauss linear;
div(phi,hs) Gauss upwind; div(phi,hs) Gauss upwind;
div(phi,k) Gauss upwind; div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind; div(phi,epsilon) Gauss upwind;

View File

@ -44,8 +44,8 @@ divSchemes
div(phi,Theta) Gauss limitedLinear 1; div(phi,Theta) Gauss limitedLinear 1;
div(phid1,p) Gauss upwind; div(phid1,p) Gauss upwind;
div(phid2,p) Gauss upwind; div(phid2,p) Gauss upwind;
div(phi1,p) Gauss linear; div(phi1,K1) Gauss limitedLinearV 1;
div(phi2,p) Gauss linear; div(phi2,K2) Gauss limitedLinearV 1;
} }
laplacianSchemes laplacianSchemes

View File

@ -44,8 +44,8 @@ divSchemes
div((alpha2*Rc2)) Gauss linear; div((alpha2*Rc2)) Gauss linear;
div(phid1,p) Gauss upwind; div(phid1,p) Gauss upwind;
div(phid2,p) Gauss upwind; div(phid2,p) Gauss upwind;
div(phi1,p) Gauss linear; div(phi1,K1) Gauss limitedLinearV 1;
div(phi2,p) Gauss linear; div(phi2,K2) Gauss limitedLinearV 1;
} }
laplacianSchemes laplacianSchemes