本文整理汇总了C++中parcel::N方法的典型用法代码示例。如果您正苦于以下问题:C++ parcel::N方法的具体用法?C++ parcel::N怎么用?C++ parcel::N使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类parcel
的用法示例。
在下文中一共展示了parcel::N方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void reitzKHRT::breakupParcel
(
parcel& p,
const scalar deltaT,
const vector& vel,
const liquidMixture& fuels
) const
{
label celli = p.cell();
scalar T = p.T();
scalar r = 0.5*p.d();
scalar pc = spray_.p()[celli];
scalar sigma = fuels.sigma(pc, T, p.X());
scalar rhoLiquid = fuels.rho(pc, T, p.X());
scalar muLiquid = fuels.mu(pc, T, p.X());
scalar rhoGas = spray_.rho()[celli];
scalar Np = p.N(rhoLiquid);
scalar semiMass = Np*pow(p.d(), 3.0);
scalar weGas = p.We(vel, rhoGas, sigma);
scalar weLiquid = p.We(vel, rhoLiquid, sigma);
// correct the Reynolds number. Reitz is using radius instead of diameter
scalar reLiquid = 0.5*p.Re(rhoLiquid, vel, muLiquid);
scalar ohnesorge = sqrt(weLiquid)/(reLiquid + VSMALL);
scalar taylor = ohnesorge*sqrt(weGas);
vector acceleration = p.Urel(vel)/p.tMom();
vector trajectory = p.U()/mag(p.U());
scalar gt = (g_ + acceleration) & trajectory;
// frequency of the fastest growing KH-wave
scalar omegaKH =
(0.34 + 0.38*pow(weGas, 1.5))
/((1 + ohnesorge)*(1 + 1.4*pow(taylor, 0.6)))
*sqrt(sigma/(rhoLiquid*pow(r, 3)));
// corresponding KH wave-length.
scalar lambdaKH =
9.02
*r
*(1.0 + 0.45*sqrt(ohnesorge))
*(1.0 + 0.4*pow(taylor, 0.7))
/pow(1.0 + 0.865*pow(weGas, 1.67), 0.6);
// characteristic Kelvin-Helmholtz breakup time
scalar tauKH = 3.726*b1_*r/(omegaKH*lambdaKH);
// stable KH diameter
scalar dc = 2.0*b0_*lambdaKH;
// the frequency of the fastest growing RT wavelength.
scalar helpVariable = mag(gt*(rhoLiquid - rhoGas));
scalar omegaRT = sqrt
(
2.0*pow(helpVariable, 1.5)
/(3.0*sqrt(3.0*sigma)*(rhoGas + rhoLiquid))
);
// RT wave number
scalar KRT = sqrt(helpVariable/(3.0*sigma + VSMALL));
// wavelength of the fastest growing RT frequency
scalar lambdaRT = 2.0*mathematicalConstant::pi*cRT_/(KRT + VSMALL);
// if lambdaRT < diameter, then RT waves are growing on the surface
// and we start to keep track of how long they have been growing
if ((p.ct() > 0) || (lambdaRT < p.d()))
{
p.ct() += deltaT;
}
// characteristic RT breakup time
scalar tauRT = cTau_/(omegaRT + VSMALL);
// check if we have RT breakup
if ((p.ct() > tauRT) && (lambdaRT < p.d()))
{
// the RT breakup creates diameter/lambdaRT new droplets
p.ct() = -GREAT;
scalar multiplier = p.d()/lambdaRT;
scalar nDrops = multiplier*Np;
p.d() = cbrt(semiMass/nDrops);
}
// otherwise check for KH breakup
else if (dc < p.d())
{
// no breakup below Weber = 12
if (weGas > weberLimit_)
{
label injector = label(p.injector());
scalar fraction = deltaT/tauKH;
// reduce the diameter according to the rate-equation
p.d() = (fraction*dc + p.d())/(1.0 + fraction);
scalar ms = rhoLiquid*Np*pow3(dc)*mathematicalConstant::pi/6.0;
p.ms() += ms;
//.........这里部分代码省略.........