void Foam::combustionModels::PaSR<Type>::correct() { if (this->active()) { laminar<Type>::correct(); if (turbulentReaction_) { tmp<volScalarField> tepsilon(this->turbulence().epsilon()); const volScalarField& epsilon = tepsilon(); tmp<volScalarField> tmuEff(this->turbulence().muEff()); const volScalarField& muEff = tmuEff(); tmp<volScalarField> ttc(this->tc()); const volScalarField& tc = ttc(); tmp<volScalarField> trho(this->rho()); const volScalarField& rho = trho(); forAll(epsilon, i) { scalar tk = Cmix_*sqrt(max(muEff[i]/rho[i]/(epsilon[i] + SMALL), 0)); if (tk > SMALL) { kappa_[i] = tc[i]/(tc[i] + tk); } else { kappa_[i] = 1.0; } } }
void Foam::combustionModels::PaSR<Type>::correct() { if (this->active()) { const scalar t = this->mesh().time().value(); const scalar dt = this->mesh().time().deltaTValue(); if (!useReactionRate_) { this->chemistryPtr_->solve(t - dt, dt); } else { this->chemistryPtr_->calculate(); } if (turbulentReaction_) { tmp<volScalarField> trho(this->rho()); const volScalarField& rho = trho(); tmp<volScalarField> tepsilon(this->turbulence().epsilon()); const volScalarField& epsilon = tepsilon(); tmp<volScalarField> tmuEff(this->turbulence().muEff()); const volScalarField& muEff = tmuEff(); tmp<volScalarField> ttc(tc()); const volScalarField& tc = ttc(); forAll(epsilon, i) { if (epsilon[i] > 0) { scalar tk = Cmix_*Foam::sqrt(muEff[i]/rho[i]/(epsilon[i] + SMALL)); // Chalmers PaSR model if (!useReactionRate_) { kappa_[i] = (dt + tc[i])/(dt + tc[i] + tk); } else { kappa_[i] = tc[i]/(tc[i] + tk); } } else { // Return to laminar combustion kappa_[i] = 1.0; } } } else { kappa_ = 1.0; } }