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 {
*/
class ParticleEnsembleTags {
public:
const Expr::Tag partTempInitTag, ///< particle initial temperature from input file
partTempInflowTag, ///< inflowing particle temperature
partRhoInitTag, ///< particle initial density from input file
partRhoInflowTag, ///< inflow particle density
partCpInitTag, ///< particle initial heat capacity from input file, mainly for solid and liquid particles
partConvecToGasTag, ///< convection 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
partRadiaToGasPFRTag, ///< radiation between gas and part in gas enthalpy equation for plug flow reactor
tempRadiaWallTag, ///< wall temperature having radiation heat transfer with particles
partToGasMassTag, ///< mass from particle to gas
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
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
Expr::TagList massEachPartTags, ///< mass of each particle
partNumPerVolumeTags, ///< number of particles per volume
partNumFracTags, ///< number of particles per mass of gas in the reactor
partNumFracInitialTags, ///< initial number of particles per mass of gas in the reactor
partTempTags, ///< particle temperature
partCpTags, ///< particle heat capacity
partMassFracTags, ///< particle mass fraction: (kg particle)/(kg gas)
partRhoTags, ///< particle density
partSizeTags, ///< particle diameter
partSizeInitialTags, ///< initial particle diameter
partConvecTags, ///< convection term in particle temperature equation
partGasRadiaTags, ///< radiation term between particle and gas-phase in particle temperature equation
partWallRadiaTags, ///< radiation term between particle and wall in particle temperature equation
partTempInflowTags, ///< inflow particle temperature
partTempMixRhsTags, ///< mixing RHS of particle enthalpy equation
partTempKinRhsTags, ///< kinetics RHS of particle enthalpy equation
partTempHeatRhsTags, ///< heat transfer RHS of particle enthalpy equation
partTempKinRhsPFRTags, ///< kinetics RHS of particle enthalpy equation for plug flow reactor
partTempHeatRhsPFRTags, ///< heat transfer RHS of particle enthalpy equation for plug flow reactor
partTempFullRhsTags, ///< full RHS of particle enthalpy equation
partMassFracInitialTags, ///< initial particle mass fraction
partMassFracInflowTags, ///< inflowing particle mass fraction
partMassFracMixRhsTags, ///< mixing RHS of particle mass fraction equation
partMassFracKinRhsTags, ///< kinetics RHS of particle mass fraction equation
partMassFracFullRhsTags, ///< full RHS of particle mass fraction equation
partNumFracInflowTags, ///< inflowing number of particles per mass of gas
partNumFracMixRhsTags, ///< mixing RHS of particle number equation per mass of gas
partNumFracKinRhsTags, ///< kinetics RHS of particle number equation per mass of gas
partNumFracFullRhsTags, ///< full RHS of number of particles equation per mass of gas
shNumberTags, ///< sherwood number -- used to get mass transfer coefficient
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
const Expr::Tag partTempInitTag, ///< particle initial temperature from input file
partTempInflowTag, ///< inflowing particle temperature
partRhoInitTag, ///< particle initial density from input file
partRhoInflowTag, ///< inflow particle density
partCpInitTag, ///< particle initial heat capacity from input file, mainly for solid and liquid particles
partConvecToGasTag, ///< convection 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
partRadiaToGasPFRTag, ///< radiation between gas and part in gas enthalpy equation for plug flow reactor
tempRadiaWallTag, ///< wall temperature having radiation heat transfer with particles
partToGasMassTag, ///< mass from particle to gas
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
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
partNumFracStandTag; ///< standard number of particles per mass of gas in the reactor
Expr::TagList massEachPartTags, ///< mass of each particle
partNumPerVolumeTags, ///< number of particles per volume
partNumFracTags, ///< number of particles per mass of gas in the reactor
partNumFracNormTags, ///< normalized number of particles per mass of gas in the reactor
partNumFracInitialTags, ///< initial number of particles per mass of gas in the reactor
partTempTags, ///< particle temperature
partCpTags, ///< particle heat capacity
partMassFracTags, ///< particle mass fraction: (kg particle)/(kg gas)
partRhoTags, ///< particle density
partSizeTags, ///< particle diameter
partSizeInitialTags, ///< initial particle diameter
partConvecTags, ///< convection term in particle temperature equation
partGasRadiaTags, ///< radiation term between particle and gas-phase in particle temperature equation
partWallRadiaTags, ///< radiation term between particle and wall in particle temperature equation
partTempInflowTags, ///< inflow particle temperature
partTempMixRhsTags, ///< mixing RHS of particle enthalpy equation
partTempKinRhsTags, ///< kinetics RHS of particle enthalpy equation
partTempHeatRhsTags, ///< heat transfer RHS of particle enthalpy equation
partTempKinRhsPFRTags, ///< kinetics RHS of particle enthalpy equation for plug flow reactor
partTempHeatRhsPFRTags, ///< heat transfer RHS of particle enthalpy equation for plug flow reactor
partTempFullRhsTags, ///< full RHS of particle enthalpy equation
partMassFracInitialTags, ///< initial particle mass fraction
partMassFracInflowTags, ///< inflowing particle mass fraction
partMassFracMixRhsTags, ///< mixing RHS of particle mass fraction equation
partMassFracKinRhsTags, ///< kinetics RHS of particle mass fraction equation
partMassFracFullRhsTags, ///< full RHS of particle mass fraction equation
partNumFracInflowTags, ///< inflowing number of particles per mass of gas
partNumFracNormInflowTags, ///< inflowing normalized number of particles per mass of gas
partNumFracNormMixRhsTags, ///< mixing RHS of normalized particle number equation per mass of gas
partNumFracNormKinRhsTags, ///< kinetics RHS of normalized particle number equation per mass of gas
partNumFracNormFullRhsTags, ///< full RHS of normalized number of particles equation per mass of gas
shNumberTags, ///< sherwood number -- used to get mass transfer coefficient
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,
const std::vector<std::string>& particleNumArray);
};
......
This diff is collapsed.
......@@ -260,7 +260,9 @@ namespace CCK{
charDepletionTags.push_back( tagsEChar.heteroH2OTags[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();
Expr::TagList logFreRateTags, logFreTags;
......
......@@ -161,12 +161,12 @@ public:
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[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[3] <<= (drC_H2Odv - 2*drC_H2dv) * 2.0/12.01;
dratedv[4] <<= -drC_H2Odv * 18.01/12.01;
dratedv[5] <<= drC_H2dv * 16.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[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[4] <<= drC_H2Odv * 18.01/12.01;
dratedv[5] <<= - drC_H2dv * 16.01/12.01;
}
};
}// namespace CCK
......
......@@ -105,7 +105,7 @@ public:
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));
}
......
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