本文整理汇总了C++中parcelType类的典型用法代码示例。如果您正苦于以下问题:C++ parcelType类的具体用法?C++ parcelType怎么用?C++ parcelType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了parcelType类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1:
void Foam::VoidFraction<CloudType>::postMove
(
const parcelType& p,
const label cellI,
const scalar dt
)
{
volScalarField& theta = thetaPtr_();
theta[cellI] += dt*p.nParticle()*p.volume();
}
开发者ID:OpenFOAM,项目名称:OpenFOAM-2.0.x,代码行数:11,代码来源:VoidFraction.C
示例2:
void Foam::KinematicCloud<CloudType>::checkParcelProperties
(
parcelType& parcel,
const scalar lagrangianDt,
const bool fullyDescribed
)
{
const scalar carrierDt = mesh_.time().deltaTValue();
parcel.stepFraction() = (carrierDt - lagrangianDt)/carrierDt;
parcel.typeId() = constProps_.parcelTypeId();
}
开发者ID:AmaneShino,项目名称:OpenFOAM-2.0.x,代码行数:11,代码来源:KinematicCloud.C
示例3:
void Foam::CellAverageParticleVelocity<CloudType>::postMove
(
const parcelType& p,
const label cellI,
const scalar dt,
const point& position0,
bool&
)
{
volVectorField& U = UpPtr_();
volScalarField& pVol = pVolPtr_();
scalar pv = p.mass()/p.rho();
U[cellI] += dt*p.nParticle()*p.U()*pv;
pVol[cellI] += pv;
}
开发者ID:Washino,项目名称:OpenFOAM-User-Dir,代码行数:19,代码来源:CellAverageParticleVelocity.C
示例4: iter
void Foam::ParticleTracks<CloudType>::postFace(const parcelType& p)
{
if
(
this->owner().solution().output()
|| this->owner().solution().transient()
)
{
if (!cloudPtr_.valid())
{
cloudPtr_.reset
(
this->owner().cloneBare(this->owner().name() + "Tracks").ptr()
);
}
hitTableType::iterator iter =
faceHitCounter_.find(labelPair(p.origProc(), p.origId()));
label localI = -1;
if (iter != faceHitCounter_.end())
{
iter()++;
localI = iter();
}
else
{
localI = 1;
faceHitCounter_.insert(labelPair(p.origProc(), p.origId()), localI);
}
label nSamples = floor(localI/trackInterval_);
if ((localI % trackInterval_ == 0) && (nSamples < maxSamples_))
{
cloudPtr_->append
(
static_cast<parcelType*>(p.clone(this->owner().mesh()).ptr())
);
}
}
}
开发者ID:daphilips,项目名称:philipsFOAM,代码行数:41,代码来源:ParticleTracks.C
示例5: X
void Foam::SprayCloud<CloudType>::setParcelThermoProperties
(
parcelType& parcel,
const scalar lagrangianDt
)
{
CloudType::setParcelThermoProperties(parcel, lagrangianDt);
const liquidMixtureProperties& liqMix = this->composition().liquids();
const scalarField& Y(parcel.Y());
scalarField X(liqMix.X(Y));
// override rho and Cp from constantProperties
parcel.Cp() = liqMix.Cp(parcel.pc(), parcel.T(), X);
parcel.rho() = liqMix.rho(parcel.pc(), parcel.T(), X);
}
开发者ID:0184561,项目名称:OpenFOAM-2.1.x,代码行数:17,代码来源:SprayCloud.C
示例6: breakup
void Foam::SprayCloud<CloudType>::checkParcelProperties
(
parcelType& parcel,
const scalar lagrangianDt,
const bool fullyDescribed
)
{
CloudType::checkParcelProperties(parcel, lagrangianDt, fullyDescribed);
// store the injection position and initial drop size
parcel.position0() = parcel.position();
parcel.d0() = parcel.d();
parcel.y() = breakup().y0();
parcel.yDot() = breakup().yDot0();
parcel.liquidCore() = atomization().initLiquidCore();
}
开发者ID:BijanZarif,项目名称:OpenFOAM-2.4.0-MNF,代码行数:18,代码来源:SprayCloud.C
示例7:
void Foam::SurfaceFilmModel<CloudType>::setParcelProperties
(
parcelType& p,
const label filmFaceI
) const
{
// Set parcel properties
scalar vol = mathematical::pi/6.0*pow3(diameterParcelPatch_[filmFaceI]);
p.d() = diameterParcelPatch_[filmFaceI];
p.U() = UFilmPatch_[filmFaceI];
p.rho() = rhoFilmPatch_[filmFaceI];
p.nParticle() = massParcelPatch_[filmFaceI]/p.rho()/vol;
if (ejectedParcelType_ >= 0)
{
p.typeId() = ejectedParcelType_;
}
}
开发者ID:mikegraham,项目名称:OpenFOAM-2.1.x,代码行数:19,代码来源:SurfaceFilmModel.C
示例8: mag
void Foam::KinematicCloud<CloudType>::patchData
(
const parcelType& p,
const polyPatch& pp,
const scalar trackFraction,
const tetIndices& tetIs,
vector& nw,
vector& Up
) const
{
label patchi = pp.index();
label patchFacei = pp.whichFace(p.face());
vector n = tetIs.faceTri(mesh_).normal();
n /= mag(n);
vector U = U_.boundaryField()[patchi][patchFacei];
// Unless the face is rotating, the required normal is n;
nw = n;
if (!mesh_.moving())
{
// Only wall patches may have a non-zero wall velocity from
// the velocity field when the mesh is not moving.
if (isA<wallPolyPatch>(pp))
{
Up = U;
}
else
{
Up = Zero;
}
}
else
{
vector U00 = U_.oldTime().boundaryField()[patchi][patchFacei];
vector n00 = tetIs.oldFaceTri(mesh_).normal();
// Difference in normal over timestep
vector dn = Zero;
if (mag(n00) > SMALL)
{
// If the old normal is zero (for example in layer
// addition) then use the current normal, meaning that the
// motion can only be translational, and dn remains zero,
// otherwise, calculate dn:
n00 /= mag(n00);
dn = n - n00;
}
// Total fraction through the timestep of the motion,
// including stepFraction before the current tracking step
// and the current trackFraction
// i.e.
// let s = stepFraction, t = trackFraction
// Motion of x in time:
// |-----------------|---------|---------|
// x00 x0 xi x
//
// where xi is the correct value of x at the required
// tracking instant.
//
// x0 = x00 + s*(x - x00) = s*x + (1 - s)*x00
//
// i.e. the motion covered by previous tracking portions
// within this timestep, and
//
// xi = x0 + t*(x - x0)
// = t*x + (1 - t)*x0
// = t*x + (1 - t)*(s*x + (1 - s)*x00)
// = (s + t - s*t)*x + (1 - (s + t - s*t))*x00
//
// let m = (s + t - s*t)
//
// xi = m*x + (1 - m)*x00 = x00 + m*(x - x00);
//
// In the same form as before.
scalar m =
p.stepFraction()
+ trackFraction
- (p.stepFraction()*trackFraction);
// When the mesh is moving, the velocity field on wall patches
// will contain the velocity associated with the motion of the
// mesh, in which case it is interpolated in time using m.
// For other patches the face velocity will need to be
// reconstructed from the face centre motion.
const vector& Cf = mesh_.faceCentres()[p.face()];
vector Cf00 = mesh_.faces()[p.face()].centre(mesh_.oldPoints());
if (isA<wallPolyPatch>(pp))
//.........这里部分代码省略.........
开发者ID:qyzeng,项目名称:OpenFOAM-dev,代码行数:101,代码来源:KinematicCloud.C
注:本文中的parcelType类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论