Commit 5613aa2f authored by Hang Zhou's avatar Hang Zhou
Browse files

1. Correct the mistake in the sensitivity of...

1. Correct the mistake in the sensitivity of `src/particles/coal/CharCombustion/CCK/CharSpeciesRHS.h`. The missing nagative sign is added.
2. Modifying the sensitivity of CCK model. Our results have shown that using the real sensitivity or setting the sensitivity to be zero does not affect the results. So, we can set the sensitivity to be zero for most of our cases
because the simulation will be faster. We can turn on/off this in the input file by “Particles: CharModel: SensitivityOfCCK: ON/OFF”. The default value of “SensitivityOFCCK” is OFF.
3. The normalized number fraction of particles per gas mass (n_p,norm), instead of the real number fraction of particles per gas mass (n_p) is solved now. n_p,norm=n_p/n_p,stand. The standard value (n_p,stand) can be given in the input file by “Particles: StandardNumFrac:“. Its default value is 1e9. The reason for this is that very big sensitivity is obtained when using CCK model, because n_p is very big (In equation dn_p/dt=-n_p*S_mg/rho_g/u. The sensitivity of the numerator is dn_pdv*S_mg+n_p*dS_mgdv. The second term is big because n_p is very big. Thus, big sensitivity is obtained from this).
parent 86c20a25
Pipeline #1127 failed with stage
in 1 minute and 18 seconds
This diff is collapsed.
...@@ -50,55 +50,58 @@ namespace Particles { ...@@ -50,55 +50,58 @@ namespace Particles {
*/ */
class ParticleEnsembleTags { class ParticleEnsembleTags {
public: public:
const Expr::Tag partTempInitTag, ///< particle initial temperature from input file const Expr::Tag partTempInitTag, ///< particle initial temperature from input file
partTempInflowTag, ///< inflowing particle temperature partTempInflowTag, ///< inflowing particle temperature
partRhoInitTag, ///< particle initial density from input file partRhoInitTag, ///< particle initial density from input file
partRhoInflowTag, ///< inflow particle density partRhoInflowTag, ///< inflow particle density
partCpInitTag, ///< particle initial heat capacity from input file, mainly for solid and liquid particles partCpInitTag, ///< particle initial heat capacity from input file, mainly for solid and liquid particles
partConvecToGasTag, ///< convection between gas and part in gas enthalpy equation partConvecToGasTag, ///< convection between gas and part in gas enthalpy equation
partRadiaToGasTag, ///< radiation between gas and part in gas enthalpy equation partRadiaToGasTag, ///< radiation between gas and part in gas enthalpy equation
partConvecToGasPFRTag, ///< convection between gas and part in gas enthalpy equation for plug flow reactor partConvecToGasPFRTag, ///< convection between gas and part in gas enthalpy equation for plug flow reactor
partRadiaToGasPFRTag, ///< radiation between gas and part in gas enthalpy equation for plug flow reactor partRadiaToGasPFRTag, ///< radiation between gas and part in gas enthalpy equation for plug flow reactor
tempRadiaWallTag, ///< wall temperature having radiation heat transfer with particles tempRadiaWallTag, ///< wall temperature having radiation heat transfer with particles
partToGasMassTag, ///< mass from particle to gas partToGasMassTag, ///< mass from particle to gas
gasEnthSrcTag, ///< gas enthalpy source term because of the change of gas mass gasEnthSrcTag, ///< gas enthalpy source term because of the change of gas mass
gasEnthSrcPFRTag, ///< gas enthalpy source term because of the change of gas mass for plug flow reactor gasEnthSrcPFRTag, ///< gas enthalpy source term because of the change of gas mass for plug flow reactor
gasDensitySrcPFRTag, ///< gas density source term because of the change of gas mass for plug flow reactor gasDensitySrcPFRTag, ///< gas density source term because of the change of gas mass for plug flow reactor
gasDpDxSrcPFRTag; /// change of `Dp/Dx` term because of the change of gas mass for plug flow reactor gasDpDxSrcPFRTag, /// change of `Dp/Dx` term because of the change of gas mass for plug flow reactor
Expr::TagList massEachPartTags, ///< mass of each particle partNumFracStandTag; ///< standard number of particles per mass of gas in the reactor
partNumPerVolumeTags, ///< number of particles per volume Expr::TagList massEachPartTags, ///< mass of each particle
partNumFracTags, ///< number of particles per mass of gas in the reactor partNumPerVolumeTags, ///< number of particles per volume
partNumFracInitialTags, ///< initial number of particles per mass of gas in the reactor partNumFracTags, ///< number of particles per mass of gas in the reactor
partTempTags, ///< particle temperature partNumFracNormTags, ///< normalized number of particles per mass of gas in the reactor
partCpTags, ///< particle heat capacity partNumFracInitialTags, ///< initial number of particles per mass of gas in the reactor
partMassFracTags, ///< particle mass fraction: (kg particle)/(kg gas) partTempTags, ///< particle temperature
partRhoTags, ///< particle density partCpTags, ///< particle heat capacity
partSizeTags, ///< particle diameter partMassFracTags, ///< particle mass fraction: (kg particle)/(kg gas)
partSizeInitialTags, ///< initial particle diameter partRhoTags, ///< particle density
partConvecTags, ///< convection term in particle temperature equation partSizeTags, ///< particle diameter
partGasRadiaTags, ///< radiation term between particle and gas-phase in particle temperature equation partSizeInitialTags, ///< initial particle diameter
partWallRadiaTags, ///< radiation term between particle and wall in particle temperature equation partConvecTags, ///< convection term in particle temperature equation
partTempInflowTags, ///< inflow particle temperature partGasRadiaTags, ///< radiation term between particle and gas-phase in particle temperature equation
partTempMixRhsTags, ///< mixing RHS of particle enthalpy equation partWallRadiaTags, ///< radiation term between particle and wall in particle temperature equation
partTempKinRhsTags, ///< kinetics RHS of particle enthalpy equation partTempInflowTags, ///< inflow particle temperature
partTempHeatRhsTags, ///< heat transfer RHS of particle enthalpy equation partTempMixRhsTags, ///< mixing RHS of particle enthalpy equation
partTempKinRhsPFRTags, ///< kinetics RHS of particle enthalpy equation for plug flow reactor partTempKinRhsTags, ///< kinetics RHS of particle enthalpy equation
partTempHeatRhsPFRTags, ///< heat transfer RHS of particle enthalpy equation for plug flow reactor partTempHeatRhsTags, ///< heat transfer RHS of particle enthalpy equation
partTempFullRhsTags, ///< full RHS of particle enthalpy equation partTempKinRhsPFRTags, ///< kinetics RHS of particle enthalpy equation for plug flow reactor
partMassFracInitialTags, ///< initial particle mass fraction partTempHeatRhsPFRTags, ///< heat transfer RHS of particle enthalpy equation for plug flow reactor
partMassFracInflowTags, ///< inflowing particle mass fraction partTempFullRhsTags, ///< full RHS of particle enthalpy equation
partMassFracMixRhsTags, ///< mixing RHS of particle mass fraction equation partMassFracInitialTags, ///< initial particle mass fraction
partMassFracKinRhsTags, ///< kinetics RHS of particle mass fraction equation partMassFracInflowTags, ///< inflowing particle mass fraction
partMassFracFullRhsTags, ///< full RHS of particle mass fraction equation partMassFracMixRhsTags, ///< mixing RHS of particle mass fraction equation
partNumFracInflowTags, ///< inflowing number of particles per mass of gas partMassFracKinRhsTags, ///< kinetics RHS of particle mass fraction equation
partNumFracMixRhsTags, ///< mixing RHS of particle number equation per mass of gas partMassFracFullRhsTags, ///< full RHS of particle mass fraction equation
partNumFracKinRhsTags, ///< kinetics RHS of particle number equation per mass of gas partNumFracInflowTags, ///< inflowing number of particles per mass of gas
partNumFracFullRhsTags, ///< full RHS of number of particles equation per mass of gas partNumFracNormInflowTags, ///< inflowing normalized number of particles per mass of gas
shNumberTags, ///< sherwood number -- used to get mass transfer coefficient partNumFracNormMixRhsTags, ///< mixing RHS of normalized particle number equation per mass of gas
reynoldsNumberTags, ///< particle Re number partNumFracNormKinRhsTags, ///< kinetics RHS of normalized particle number equation per mass of gas
nusseltNumberTags, ///< Nu number -- used to get convective coefficient between gas and particle partNumFracNormFullRhsTags, ///< full RHS of normalized number of particles equation per mass of gas
gasSpeciesSrcTags, ///< gas speices source term because of the change of gas mass shNumberTags, ///< sherwood number -- used to get mass transfer coefficient
gasSpeciesSrcPFRTags; ///< gas speices source term because of the change of gas mass in plug flow reactor reynoldsNumberTags, ///< particle Re number
nusseltNumberTags, ///< Nu number -- used to get convective coefficient between gas and particle
gasSpeciesSrcTags, ///< gas speices source term because of the change of gas mass
gasSpeciesSrcPFRTags; ///< gas speices source term because of the change of gas mass in plug flow reactor
ParticleEnsembleTags( const Expr::Context& state, ParticleEnsembleTags( const Expr::Context& state,
const std::vector<std::string>& particleNumArray); const std::vector<std::string>& particleNumArray);
}; };
......
This diff is collapsed.
...@@ -260,7 +260,9 @@ namespace CCK{ ...@@ -260,7 +260,9 @@ namespace CCK{
charDepletionTags.push_back( tagsEChar.heteroH2OTags[i] ); charDepletionTags.push_back( tagsEChar.heteroH2OTags[i] );
charDepletionTags.push_back( tagsEChar.co2CoRatioTags[i] ); charDepletionTags.push_back( tagsEChar.co2CoRatioTags[i] );
execFactory.register_expression( new CCKRateT(charDepletionTags, massFracCCKTags, gasPropertyTags, prtPropertyTags, effecDiffCoeffMixTags, effecDiffCoeffTags, tagsEPart.partNumFracTags[i], cckData_)); const std::string sensitivityCCK = rootParser_["Particles"]["CharModel"]["SensitivityOfCCK"].as<std::string>("OFF");
execFactory.register_expression( new CCKRateT(charDepletionTags, massFracCCKTags, gasPropertyTags, prtPropertyTags, effecDiffCoeffMixTags, effecDiffCoeffTags, tagsEPart.partNumFracTags[i], cckData_, sensitivityCCK));
const int logFreSize = cckData_.get_eD_vec().size(); const int logFreSize = cckData_.get_eD_vec().size();
Expr::TagList logFreRateTags, logFreTags; Expr::TagList logFreRateTags, logFreTags;
......
...@@ -161,12 +161,12 @@ public: ...@@ -161,12 +161,12 @@ public:
const FieldT& phi = co2_co_ratio_->field_ref(); const FieldT& dphidv = co2_co_ratio_->sens_field_ref(var); const FieldT& phi = co2_co_ratio_->field_ref(); const FieldT& dphidv = co2_co_ratio_->sens_field_ref(var);
dratedv[0] <<= ((dphidv*rC_O2+phi*drC_O2dv)/(1.0+phi) - phi*rC_O2/square(1+phi)*dphidv - drC_CO2dv) * 44.01/12.01; dratedv[0] <<= - ((dphidv*rC_O2+phi*drC_O2dv)/(1.0+phi) - phi*rC_O2/square(1+phi)*dphidv - drC_CO2dv) * 44.01/12.01;
dratedv[1] <<= (-1.0/square(1.0+phi)*dphidv*rC_O2+ 1.0/(1.0+phi)*drC_O2dv + 2*drC_CO2dv + drC_H2Odv) * 28.01/12.01; dratedv[1] <<= - (-1.0/square(1.0+phi)*dphidv*rC_O2+ 1.0/(1.0+phi)*drC_O2dv + 2*drC_CO2dv + drC_H2Odv) * 28.01/12.01;
dratedv[2] <<= (- (dphidv*rC_O2+(0.5+phi)*drC_O2dv)/(1.0+phi) + (0.5+phi)/square(1.0+phi)*dphidv*rC_O2 ) * 32.0/12.01; dratedv[2] <<= ((dphidv*rC_O2+(0.5+phi)*drC_O2dv)/(1.0+phi) - (0.5+phi)/square(1.0+phi)*dphidv*rC_O2 ) * 32.0/12.01;
dratedv[3] <<= (drC_H2Odv - 2*drC_H2dv) * 2.0/12.01; dratedv[3] <<= (- drC_H2Odv + 2*drC_H2dv) * 2.0/12.01;
dratedv[4] <<= -drC_H2Odv * 18.01/12.01; dratedv[4] <<= drC_H2Odv * 18.01/12.01;
dratedv[5] <<= drC_H2dv * 16.01/12.01; dratedv[5] <<= - drC_H2dv * 16.01/12.01;
} }
}; };
}// namespace CCK }// namespace CCK
......
...@@ -105,7 +105,7 @@ public: ...@@ -105,7 +105,7 @@ public:
const double alpha = cckData_.get_mode_of_burning_param(); const double alpha = cckData_.get_mode_of_burning_param();
dfdv <<= cond(x<1.0, drhoC0dv * pow(1-x, alpha) - rhoC0 * alpha * pow(1-x, alpha-1.0)) dfdv <<= cond(x<1.0, drhoC0dv * pow(1-x, alpha) - rhoC0 * alpha * pow(1-x, alpha-1.0) * dxdv)
( drhoC0dv * pow(1-x, alpha)); ( drhoC0dv * pow(1-x, alpha));
} }
......
Supports Markdown
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