本文整理汇总了C++中parcel::dev方法的典型用法代码示例。如果您正苦于以下问题:C++ parcel::dev方法的具体用法?C++ parcel::dev怎么用?C++ parcel::dev使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类parcel
的用法示例。
在下文中一共展示了parcel::dev方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sqrt
void ETAB::breakupParcel
(
parcel& p,
const scalar deltaT,
const vector& Ug,
const liquidMixture& fuels
) const
{
scalar T = p.T();
scalar pc = spray_.p()[p.cell()];
scalar r = 0.5*p.d();
scalar r2 = r*r;
scalar r3 = r*r2;
scalar rho = fuels.rho(pc, T, p.X());
scalar sigma = fuels.sigma(pc, T, p.X());
scalar mu = fuels.mu(pc, T, p.X());
// inverse of characteristic viscous damping time
scalar rtd = 0.5*Cmu_*mu/(rho*r2);
// oscillation frequency (squared)
scalar omega2 = Comega_*sigma/(rho*r3) - rtd*rtd;
if (omega2 > 0)
{
scalar omega = sqrt(omega2);
scalar romega = 1.0/omega;
scalar rhog = spray_.rho()[p.cell()];
scalar We = p.We(Ug, rhog, sigma);
scalar Wetmp = We/WeCrit_;
scalar y1 = p.dev() - Wetmp;
scalar y2 = p.ddev()*romega;
scalar a = sqrt(y1*y1 + y2*y2);
// scotty we may have break-up
if (a+Wetmp > 1.0)
{
scalar phic = y1/a;
// constrain phic within -1 to 1
phic = max(min(phic, 1), -1);
scalar phit = acos(phic);
scalar phi = phit;
scalar quad = -y2/a;
if (quad < 0)
{
phi = 2*mathematicalConstant::pi - phit;
}
scalar tb = 0;
if (mag(p.dev()) < 1.0)
{
scalar theta = acos((1.0 - Wetmp)/a);
if (theta < phi)
{
if (2*mathematicalConstant::pi-theta >= phi)
{
theta = -theta;
}
theta += 2*mathematicalConstant::pi;
}
tb = (theta-phi)*romega;
// breakup occurs
if (deltaT > tb)
{
p.dev() = 1.0;
p.ddev() = -a*omega*sin(omega*tb + phi);
}
}
// update droplet size
if (deltaT > tb)
{
scalar sqrtWe = AWe_*pow(We, 4.0) + 1.0;
scalar Kbr = k1_*omega*sqrtWe;
if (We > WeTransition_)
{
sqrtWe = sqrt(We);
Kbr =k2_*omega*sqrtWe;
}
scalar rWetmp = 1.0/Wetmp;
scalar cosdtbu = max(-1.0, min(1.0, 1.0-rWetmp));
scalar dtbu = romega*acos(cosdtbu);
scalar decay = exp(-Kbr*dtbu);
scalar rNew = decay*r;
if (rNew < r)
{
p.d() = 2*rNew;
//.........这里部分代码省略.........