From c473c6a6a18071a3654320983763ed6106d6a709 Mon Sep 17 00:00:00 2001 From: sergio <s.ferraris@opencfd.co.uk> Date: Tue, 7 Jun 2011 10:20:46 +0100 Subject: [PATCH] ENH: update thermo for gas in ODESoliudchemistry and other minor stuff --- .../singleStepReactingMixture.C | 4 +--- .../ODESolidChemistryModel.C | 16 +++++++--------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.C index 65749dca897..5ac41aa0e6c 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.C @@ -108,8 +108,6 @@ void Foam::singleStepReactingMixture<ThermoType>::calculateMaxProducts() Yprod0_[specieI] = this->speciesData()[specieI].W()/Wm*Xi[i]; } - Info << "Max products: " << Yprod0_ << endl; - // Normalize the stoichiometric coeff to mass forAll(specieStoichCoeffs_, i) { @@ -208,7 +206,7 @@ Foam::singleStepReactingMixture<ThermoType>::singleStepReactingMixture mesh.time().timeName(), mesh, IOobject::NO_READ, - IOobject::AUTO_WRITE + IOobject::NO_WRITE ); fres_.set diff --git a/src/thermophysicalModels/solidChemistryModel/ODESolidChemistryModel/ODESolidChemistryModel.C b/src/thermophysicalModels/solidChemistryModel/ODESolidChemistryModel/ODESolidChemistryModel.C index 7d716a8a884..bd7ac96a464 100644 --- a/src/thermophysicalModels/solidChemistryModel/ODESolidChemistryModel/ODESolidChemistryModel.C +++ b/src/thermophysicalModels/solidChemistryModel/ODESolidChemistryModel/ODESolidChemistryModel.C @@ -139,7 +139,6 @@ ODESolidChemistryModel // Calculate inital values of Ysi0 = rho*delta*Yi Ys0_[fieldI].internalField() = - //this->solidThermo().rho()*Ys_[fieldI]*mesh.V(); this->solidThermo().rho()*max(Ys_[fieldI],scalar(0.001))*mesh.V(); } @@ -148,15 +147,18 @@ ODESolidChemistryModel RRg_.set(fieldI, new scalarField(mesh.nCells(), 0.0)); } - dictionary thermoDict = - mesh.lookupObject<dictionary>("chemistryProperties"); - forAll(gasThermo_, gasI) { + dictionary thermoDict = + mesh.lookupObject<dictionary> + ( + "chemistryProperties" + ).subDict(pyrolisisGases_[gasI]); + gasThermo_.set ( gasI, - new GasThermo(thermoDict.lookup(pyrolisisGases_[gasI])) + new GasThermo(thermoDict) ); } @@ -275,7 +277,6 @@ Foam::ODESolidChemistryModel<CompType, SolidThermo, GasThermo>::omega label si = R.slhs()[s]; kf *= -// pow(c1[si]/max(Ys0_[si][cellI], 0.001), exponent) pow(c1[si]/Ys0_[si][cellI], exponent) *(Ys0_[si][cellI]); } @@ -312,7 +313,6 @@ void Foam::ODESolidChemistryModel<CompType, SolidThermo, GasThermo>::derivatives scalar dYidt = dcdt[i]/cTot; scalar Yi = c[i]/cTot; newCp += Yi*solidThermo_[i].Cp(T); - //newhi += dYidt*solidThermo_[i].hf(); newhi -= dYidt*solidThermo_[i].hf(); } @@ -465,7 +465,6 @@ Foam::ODESolidChemistryModel<CompType, SolidThermo, GasThermo>::Sh() const forAll(Sh, cellI) { scalar hf = solidThermo_[i].hf(); - //Sh[cellI] += hf*RRs_[i][cellI]; Sh[cellI] -= hf*RRs_[i][cellI]; } } @@ -695,7 +694,6 @@ Foam::ODESolidChemistryModel<CompType, SolidThermo, GasThermo>::solve scalar dYi = dcdt[i]/cTot; scalar Yi = c[i]/cTot; newCp += Yi*solidThermo_[i].Cp(Ti); - //newhi += dYi*solidThermo_[i].hf(); newhi -= dYi*solidThermo_[i].hf(); invRho += Yi/solidThermo_[i].rho(Ti); } -- GitLab