mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
chemistryModel: removed superfluous time argument to solve
This commit is contained in:
@ -1,7 +1,3 @@
|
|||||||
dtChem = chemistry.solve
|
dtChem = chemistry.solve(runTime.deltaT().value());
|
||||||
(
|
|
||||||
runTime.value() - runTime.deltaT().value(),
|
|
||||||
runTime.deltaT().value()
|
|
||||||
);
|
|
||||||
scalar Sh = chemistry.Sh()()[0]/rho[0];
|
scalar Sh = chemistry.Sh()()[0]/rho[0];
|
||||||
integratedHeat += Sh*runTime.deltaT().value();
|
integratedHeat += Sh*runTime.deltaT().value();
|
||||||
|
|||||||
@ -81,16 +81,15 @@ void Foam::combustionModels::PaSR<Type>::correct()
|
|||||||
{
|
{
|
||||||
if (this->active())
|
if (this->active())
|
||||||
{
|
{
|
||||||
const scalar t = this->mesh().time().value();
|
|
||||||
const scalar dt = this->mesh().time().deltaTValue();
|
const scalar dt = this->mesh().time().deltaTValue();
|
||||||
|
|
||||||
if (!useReactionRate_)
|
if (useReactionRate_)
|
||||||
{
|
{
|
||||||
this->chemistryPtr_->solve(t - dt, dt);
|
this->chemistryPtr_->calculate();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->chemistryPtr_->calculate();
|
this->chemistryPtr_->solve(dt);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (turbulentReaction_)
|
if (turbulentReaction_)
|
||||||
@ -107,24 +106,15 @@ void Foam::combustionModels::PaSR<Type>::correct()
|
|||||||
|
|
||||||
forAll(epsilon, i)
|
forAll(epsilon, i)
|
||||||
{
|
{
|
||||||
if (epsilon[i] > 0)
|
scalar tk =
|
||||||
{
|
Cmix_*Foam::sqrt(muEff[i]/rho[i]/(epsilon[i] + SMALL));
|
||||||
scalar tk =
|
|
||||||
Cmix_*Foam::sqrt(muEff[i]/rho[i]/(epsilon[i] + SMALL));
|
|
||||||
|
|
||||||
// Chalmers PaSR model
|
if (tk > SMALL)
|
||||||
if (!useReactionRate_)
|
{
|
||||||
{
|
kappa_[i] = tc[i]/(tc[i] + tk);
|
||||||
kappa_[i] = (dt + tc[i])/(dt + tc[i] + tk);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
kappa_[i] = tc[i]/(tc[i] + tk);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Return to laminar combustion
|
|
||||||
kappa_[i] = 1.0;
|
kappa_[i] = 1.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -691,11 +691,7 @@ void reactingOneDim::evolveRegion()
|
|||||||
|
|
||||||
if (useChemistrySolvers_)
|
if (useChemistrySolvers_)
|
||||||
{
|
{
|
||||||
solidChemistry_->solve
|
solidChemistry_->solve(time().deltaTValue());
|
||||||
(
|
|
||||||
time().value() - time().deltaTValue(),
|
|
||||||
time().deltaTValue()
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -152,9 +152,9 @@ public:
|
|||||||
//- Calculates the reaction rates
|
//- Calculates the reaction rates
|
||||||
virtual void calculate() = 0;
|
virtual void calculate() = 0;
|
||||||
|
|
||||||
//- Solve the reaction system for the given start time and
|
//- Solve the reaction system for the given time step
|
||||||
// timestep and return the characteristic time
|
// and return the characteristic time
|
||||||
virtual scalar solve(const scalar t0, const scalar deltaT) = 0;
|
virtual scalar solve(const scalar deltaT) = 0;
|
||||||
|
|
||||||
//- Return the chemical time scale
|
//- Return the chemical time scale
|
||||||
virtual tmp<volScalarField> tc() const = 0;
|
virtual tmp<volScalarField> tc() const = 0;
|
||||||
|
|||||||
@ -744,7 +744,6 @@ void Foam::chemistryModel<CompType, ThermoType>::calculate()
|
|||||||
template<class CompType, class ThermoType>
|
template<class CompType, class ThermoType>
|
||||||
Foam::scalar Foam::chemistryModel<CompType, ThermoType>::solve
|
Foam::scalar Foam::chemistryModel<CompType, ThermoType>::solve
|
||||||
(
|
(
|
||||||
const scalar t0,
|
|
||||||
const scalar deltaT
|
const scalar deltaT
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -795,7 +794,7 @@ Foam::scalar Foam::chemistryModel<CompType, ThermoType>::solve
|
|||||||
c0 = c;
|
c0 = c;
|
||||||
|
|
||||||
// initialise timing parameters
|
// initialise timing parameters
|
||||||
scalar t = t0;
|
scalar t = 0;
|
||||||
scalar tauC = this->deltaTChem_[celli];
|
scalar tauC = this->deltaTChem_[celli];
|
||||||
scalar dt = min(deltaT, tauC);
|
scalar dt = min(deltaT, tauC);
|
||||||
scalar timeLeft = deltaT;
|
scalar timeLeft = deltaT;
|
||||||
|
|||||||
@ -217,9 +217,9 @@ public:
|
|||||||
const label i
|
const label i
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Solve the reaction system for the given start time and time
|
//- Solve the reaction system for the given time step
|
||||||
// step and return the characteristic time
|
// and return the characteristic time
|
||||||
virtual scalar solve(const scalar t0, const scalar deltaT);
|
virtual scalar solve(const scalar deltaT);
|
||||||
|
|
||||||
//- Return the chemical time scale
|
//- Return the chemical time scale
|
||||||
virtual tmp<volScalarField> tc() const;
|
virtual tmp<volScalarField> tc() const;
|
||||||
|
|||||||
@ -580,7 +580,6 @@ template<class CompType, class SolidThermo, class GasThermo>
|
|||||||
Foam::scalar
|
Foam::scalar
|
||||||
Foam::pyrolysisChemistryModel<CompType, SolidThermo, GasThermo>::solve
|
Foam::pyrolysisChemistryModel<CompType, SolidThermo, GasThermo>::solve
|
||||||
(
|
(
|
||||||
const scalar t0,
|
|
||||||
const scalar deltaT
|
const scalar deltaT
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -638,7 +637,7 @@ Foam::pyrolysisChemistryModel<CompType, SolidThermo, GasThermo>::solve
|
|||||||
|
|
||||||
c0 = c;
|
c0 = c;
|
||||||
|
|
||||||
scalar t = t0;
|
scalar t = 0;
|
||||||
scalar tauC = this->deltaTChem_[celli];
|
scalar tauC = this->deltaTChem_[celli];
|
||||||
scalar dt = min(deltaT, tauC);
|
scalar dt = min(deltaT, tauC);
|
||||||
scalar timeLeft = deltaT;
|
scalar timeLeft = deltaT;
|
||||||
|
|||||||
@ -224,9 +224,9 @@ public:
|
|||||||
const label i
|
const label i
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Solve the reaction system for the given start time and time
|
//- Solve the reaction system for the given time step
|
||||||
// step and return the characteristic time
|
// and return the characteristic time
|
||||||
virtual scalar solve(const scalar t0, const scalar deltaT) ;
|
virtual scalar solve(const scalar deltaT);
|
||||||
|
|
||||||
|
|
||||||
// ODE functions (overriding abstract functions in ODE.H)
|
// ODE functions (overriding abstract functions in ODE.H)
|
||||||
|
|||||||
@ -214,9 +214,9 @@ public:
|
|||||||
//- Return total solid source term
|
//- Return total solid source term
|
||||||
inline tmp<DimensionedField<scalar, volMesh> > RRs() const;
|
inline tmp<DimensionedField<scalar, volMesh> > RRs() const;
|
||||||
|
|
||||||
//- Solve the reaction system for the given start time and time
|
//- Solve the reaction system for the given time step
|
||||||
// step and return the characteristic time
|
// and return the characteristic time
|
||||||
virtual scalar solve(const scalar t0, const scalar deltaT) = 0;
|
virtual scalar solve(const scalar deltaT) = 0;
|
||||||
|
|
||||||
//- Return the chemical time scale
|
//- Return the chemical time scale
|
||||||
virtual tmp<volScalarField> tc() const;
|
virtual tmp<volScalarField> tc() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user