Commit 241d0946 authored by andy's avatar andy
Browse files

ENH: Updated PaSR model for laminar case and better code-re-use

parent 3051d333
if (chemistry.chemistry())
{
Info<< "Solving chemistry" << endl;
......@@ -10,17 +11,29 @@
// turbulent time scale
if (turbulentReaction)
{
volScalarField tk
(
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon())
);
volScalarField tc
(
chemistry.tc()
);
tmp<volScalarField> tepsilon(turbulence->epsilon());
const volScalarField& epsilon = tepsilon();
tmp<volScalarField> tmuEff(turbulence->muEff());
const volScalarField& muEff = tmuEff();
tmp<volScalarField> ttc(chemistry.tc());
const volScalarField& tc = ttc();
// Chalmers PaSR model
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);
forAll(epsilon, i)
{
if (epsilon[i] > 0)
{
// Chalmers PaSR model
scalar tk = Cmix.value()*Foam::sqrt(muEff[i]/rho[i]/epsilon[i]);
kappa[i] =
(runTime.deltaTValue() + tc[i])
/(runTime.deltaTValue() + tc[i] + tk);
}
else
{
// Return to laminar combustion
kappa[i] = 1.0;
}
}
}
else
{
......
......@@ -5,7 +5,9 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(FOAM_SOLVERS)/combustion/reactingFoam
EXE_LIBS = \
-lcompressibleTurbulenceModel \
......
{
Info<< "Solving chemistry" << endl;
chemistry.solve
(
runTime.value() - runTime.deltaTValue(),
runTime.deltaTValue()
);
// turbulent time scale
if (turbulentReaction)
{
volScalarField tk
(
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon())
);
volScalarField tc(chemistry.tc());
// Chalmers PaSR model
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);
}
else
{
kappa = 1.0;
}
chemistrySh = kappa*chemistry.Sh()();
}
......@@ -19,7 +19,9 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude
-I$(LIB_SRC)/ODE/lnInclude \
-I$(FOAM_SOLVERS)/combustion/reactingFoam
EXE_LIBS = \
-lfiniteVolume \
......
if (chemistry.chemistry())
{
Info<< "Solving chemistry" << endl;
chemistry.solve
(
runTime.value() - runTime.deltaTValue(),
runTime.deltaTValue()
);
// turbulent time scale
if (turbulentReaction)
{
DimensionedField<scalar, volMesh> tk
(
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon())
);
DimensionedField<scalar, volMesh> tc
(
chemistry.tc()().dimensionedInternalField()
);
// Chalmers PaSR model
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);
}
else
{
kappa = 1.0;
}
chemistrySh = kappa*chemistry.Sh()();
}
......@@ -19,7 +19,9 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(FOAM_SOLVERS)/combustion/reactingFoam
EXE_LIBS = \
-lfiniteVolume \
......
{
Info<< "Solving chemistry" << endl;
chemistry.solve
(
runTime.value() - runTime.deltaTValue(),
runTime.deltaTValue()
);
// turbulent time scale
if (turbulentReaction)
{
DimensionedField<scalar, volMesh> tk
(
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon())
);
DimensionedField<scalar, volMesh> tc
(
chemistry.tc()().dimensionedInternalField()
);
// Chalmers PaSR model
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);
}
else
{
kappa = 1.0;
}
chemistrySh = kappa*chemistry.Sh()();
}
......@@ -18,7 +18,9 @@ EXE_INC = \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude
-I$(LIB_SRC)/ODE/lnInclude \
-I$(FOAM_SOLVERS)/combustion/reactingFoam
EXE_LIBS = \
-lfiniteVolume \
......
if (chemistry.chemistry())
{
Info << "Solving chemistry" << endl;
chemistry.solve
(
runTime.value() - runTime.deltaTValue(),
runTime.deltaTValue()
);
// turbulent time scale
if (turbulentReaction)
{
DimensionedField<scalar, volMesh> tk
(
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon())
);
DimensionedField<scalar, volMesh> tc
(
chemistry.tc()().dimensionedInternalField()
);
// Chalmers PaSR model
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);
}
else
{
kappa = 1.0;
}
chemistrySh = kappa*chemistry.Sh()();
}
......@@ -18,7 +18,9 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(FOAM_SOLVERS)/combustion/reactingFoam
EXE_LIBS = \
-lfiniteVolume \
......
{
Info<< "Solving chemistry" << endl;
chemistry.solve
(
runTime.value() - runTime.deltaTValue(),
runTime.deltaTValue()
);
// turbulent time scale
if (turbulentReaction)
{
DimensionedField<scalar, volMesh> tk
(
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon())
);
DimensionedField<scalar, volMesh> tc
(
chemistry.tc()().dimensionedInternalField()
);
// Chalmers PaSR model
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);
}
else
{
kappa = 1.0;
}
chemistrySh = kappa*chemistry.Sh()();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment