本文整理汇总了C++中phaseModel::rho方法的典型用法代码示例。如果您正苦于以下问题:C++ phaseModel::rho方法的具体用法?C++ phaseModel::rho怎么用?C++ phaseModel::rho使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类phaseModel
的用法示例。
在下文中一共展示了phaseModel::rho方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
Foam::tmp<Foam::volScalarField>
Foam::kineticTheoryModels::granularPressureModels::Chao::
granularPressureCoeffPrime
(
const phaseModel& phase1,
const phaseModel& phase2,
const volScalarField& Theta1,
const volScalarField& Theta2,
const volScalarField& g0,
const volScalarField& g0prime,
const dimensionedScalar& e
) const
{
volScalarField m0
(
constant::mathematical::pi/6.0
*(phase1.rho()*pow3(phase1.d()) + phase2.rho()*pow3(phase2.d()))
);
tmp<volScalarField> pCoeff
(
2.0*phase2*constant::mathematical::pi/(3.0*m0)*phase1.rho()
*phase2.rho()*(1.0 + e)*pow3((phase1.d() + phase2.d())/2.0)
*(Theta1 + Theta2 + 0.2*magSqr(phase1.U() - phase2.U()))
);
if (&phase1 == &phase2)
{
return pCoeff*(2.0*g0 + phase1*g0prime);
}
else
{
return pCoeff*(g0 + phase1*g0prime);
}
}
示例2: dimensionedScalar
Foam::tmp<Foam::volScalarField>
Foam::kineticTheoryModels::granularPressureModels::SyamlalRogersOBrien::
granularPressureCoeff
(
const phaseModel& phase1,
const phaseModel& phase2,
const volScalarField& Theta1,
const volScalarField& Theta2,
const volScalarField& g0,
const dimensionedScalar& e
) const
{
if (&phase1 != &phase2)
{
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"granularPressureCoeff",
phase1.time().timeName(),
phase1.mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
phase1.mesh(),
dimensionedScalar("0", dimDensity*sqr(dimVelocity), 0.0)
)
);
}
return 2.0*phase1.rho()*Theta1*(1.0 + e)*sqr(phase1)*g0;
}