mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Refactored Kinematic cloud/parcels - torque, force and angularMomentum moved to Colliding level
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -234,4 +234,16 @@ void Foam::CollidingCloud<CloudType>::motion(TrackData& td)
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::CollidingCloud<CloudType>::info()
|
||||
{
|
||||
CloudType::info();
|
||||
|
||||
scalar rotationalKineticEnergy = rotationalKineticEnergyOfSystem();
|
||||
reduce(rotationalKineticEnergy, sumOp<scalar>());
|
||||
|
||||
Info<< " Rotational kinetic energy = "
|
||||
<< rotationalKineticEnergy << nl;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -197,8 +197,13 @@ public:
|
||||
inline CollisionModel<CollidingCloud<CloudType> >&
|
||||
collision();
|
||||
|
||||
// Check
|
||||
|
||||
// Evolution
|
||||
//- Total rotational kinetic energy in the system
|
||||
inline scalar rotationalKineticEnergyOfSystem() const;
|
||||
|
||||
|
||||
// Cloud evolution functions
|
||||
|
||||
//- Store the current cloud state
|
||||
void storeState();
|
||||
@ -212,6 +217,12 @@ public:
|
||||
//- Particle motion
|
||||
template<class TrackData>
|
||||
void motion(TrackData& td);
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
//- Print cloud information
|
||||
void info();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -49,4 +49,22 @@ Foam::CollidingCloud<CloudType>::collision()
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
inline Foam::scalar
|
||||
Foam::CollidingCloud<CloudType>::rotationalKineticEnergyOfSystem() const
|
||||
{
|
||||
scalar rotationalKineticEnergy = 0.0;
|
||||
|
||||
forAllConstIter(typename CollidingCloud<CloudType>, *this, iter)
|
||||
{
|
||||
const parcelType& p = iter();
|
||||
|
||||
rotationalKineticEnergy +=
|
||||
p.nParticle()*0.5*p.momentOfInertia()*(p.omega() & p.omega());
|
||||
}
|
||||
|
||||
return rotationalKineticEnergy;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -864,9 +864,6 @@ void Foam::KinematicCloud<CloudType>::info()
|
||||
scalar linearKineticEnergy = linearKineticEnergyOfSystem();
|
||||
reduce(linearKineticEnergy, sumOp<scalar>());
|
||||
|
||||
scalar rotationalKineticEnergy = rotationalKineticEnergyOfSystem();
|
||||
reduce(rotationalKineticEnergy, sumOp<scalar>());
|
||||
|
||||
Info<< "Cloud: " << this->name() << nl
|
||||
<< " Current number of parcels = "
|
||||
<< returnReduce(this->size(), sumOp<label>()) << nl
|
||||
@ -877,9 +874,7 @@ void Foam::KinematicCloud<CloudType>::info()
|
||||
<< " |Linear momentum| = "
|
||||
<< mag(linearMomentum) << nl
|
||||
<< " Linear kinetic energy = "
|
||||
<< linearKineticEnergy << nl
|
||||
<< " Rotational kinetic energy = "
|
||||
<< rotationalKineticEnergy << nl;
|
||||
<< linearKineticEnergy << nl;
|
||||
|
||||
injectors_.info(Info);
|
||||
this->surfaceFilm().info(Info);
|
||||
|
||||
@ -487,9 +487,6 @@ public:
|
||||
//- Total linear kinetic energy in the system
|
||||
inline scalar linearKineticEnergyOfSystem() const;
|
||||
|
||||
//- Total rotational kinetic energy in the system
|
||||
inline scalar rotationalKineticEnergyOfSystem() const;
|
||||
|
||||
//- Penetration for fraction [0-1] of the current total mass
|
||||
inline scalar penetration(const scalar fraction) const;
|
||||
|
||||
|
||||
@ -307,24 +307,6 @@ Foam::KinematicCloud<CloudType>::linearKineticEnergyOfSystem() const
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
inline Foam::scalar
|
||||
Foam::KinematicCloud<CloudType>::rotationalKineticEnergyOfSystem() const
|
||||
{
|
||||
scalar rotationalKineticEnergy = 0.0;
|
||||
|
||||
forAllConstIter(typename KinematicCloud<CloudType>, *this, iter)
|
||||
{
|
||||
const parcelType& p = iter();
|
||||
|
||||
rotationalKineticEnergy +=
|
||||
p.nParticle()*0.5*p.momentOfInertia()*(p.omega() & p.omega());
|
||||
}
|
||||
|
||||
return rotationalKineticEnergy;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
inline Foam::scalar Foam::KinematicCloud<CloudType>::Dij
|
||||
(
|
||||
|
||||
@ -86,7 +86,7 @@ public:
|
||||
virtual scalar linearKineticEnergyOfSystem() const = 0;
|
||||
|
||||
//- Total rotational kinetic energy in the system
|
||||
virtual scalar rotationalKineticEnergyOfSystem() const = 0;
|
||||
// virtual scalar rotationalKineticEnergyOfSystem() const = 0;
|
||||
|
||||
//- Penetration for percentage of the current total mass
|
||||
// virtual scalar penetration(const scalar& fraction) const = 0;
|
||||
|
||||
@ -34,6 +34,9 @@ Foam::CollidingParcel<ParcelType>::CollidingParcel
|
||||
)
|
||||
:
|
||||
ParcelType(p),
|
||||
f_(p.f_),
|
||||
angularMomentum_(p.angularMomentum_),
|
||||
torque_(p.torque_),
|
||||
collisionRecords_(p.collisionRecords_)
|
||||
{}
|
||||
|
||||
@ -46,6 +49,9 @@ Foam::CollidingParcel<ParcelType>::CollidingParcel
|
||||
)
|
||||
:
|
||||
ParcelType(p, mesh),
|
||||
f_(p.f_),
|
||||
angularMomentum_(p.angularMomentum_),
|
||||
torque_(p.torque_),
|
||||
collisionRecords_(p.collisionRecords_)
|
||||
{}
|
||||
|
||||
@ -166,6 +172,29 @@ bool Foam::CollidingParcel<ParcelType>::move
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::CollidingParcel<ParcelType>::transformProperties(const tensor& T)
|
||||
{
|
||||
ParcelType::transformProperties(T);
|
||||
|
||||
f_ = transform(T, f_);
|
||||
|
||||
angularMomentum_ = transform(T, angularMomentum_);
|
||||
|
||||
torque_ = transform(T, torque_);
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::CollidingParcel<ParcelType>::transformProperties
|
||||
(
|
||||
const vector& separation
|
||||
)
|
||||
{
|
||||
ParcelType::transformProperties(separation);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * //
|
||||
|
||||
#include "CollidingParcelIO.C"
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -66,7 +66,7 @@ Ostream& operator<<
|
||||
);
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class CollidingParcel Declaration
|
||||
Class CollidingParcel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class ParcelType>
|
||||
@ -78,6 +78,16 @@ protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Force on particle due to collisions [N]
|
||||
vector f_;
|
||||
|
||||
//- Angular momentum of Parcel in global reference frame [kg m2/s]
|
||||
vector angularMomentum_;
|
||||
|
||||
//- Torque on particle due to collisions in global
|
||||
// reference frame [Nm]
|
||||
vector torque_;
|
||||
|
||||
//- Particle collision records
|
||||
collisionRecordList collisionRecords_;
|
||||
|
||||
@ -93,7 +103,10 @@ public:
|
||||
AddToPropertyList
|
||||
(
|
||||
ParcelType,
|
||||
" collisionRecordsPairAccessed"
|
||||
" (fx fy fz)"
|
||||
+ " (angularMomentumx angularMomentumy angularMomentumz)"
|
||||
+ " (torquex torquey torquez)"
|
||||
+ " collisionRecordsPairAccessed"
|
||||
+ " collisionRecordsPairOrigProcOfOther"
|
||||
+ " collisionRecordsPairOrigIdOfOther"
|
||||
+ " (collisionRecordsPairData)"
|
||||
@ -188,12 +201,33 @@ public:
|
||||
|
||||
// Access
|
||||
|
||||
//- Return const access to force
|
||||
inline const vector& f() const;
|
||||
|
||||
//- Return const access to angular momentum
|
||||
inline const vector& angularMomentum() const;
|
||||
|
||||
//- Return const access to torque
|
||||
inline const vector& torque() const;
|
||||
|
||||
//- Return const access to the collision records
|
||||
inline const collisionRecordList& collisionRecords() const;
|
||||
|
||||
//- Return access to force
|
||||
inline vector& f();
|
||||
|
||||
//- Return access to angular momentum
|
||||
inline vector& angularMomentum();
|
||||
|
||||
//- Return access to torque
|
||||
inline vector& torque();
|
||||
|
||||
//- Return access to collision records
|
||||
inline collisionRecordList& collisionRecords();
|
||||
|
||||
//- Particle angular velocity
|
||||
inline vector omega() const;
|
||||
|
||||
|
||||
// Tracking
|
||||
|
||||
@ -201,6 +235,14 @@ public:
|
||||
template<class TrackData>
|
||||
bool move(TrackData& td, const scalar trackTime);
|
||||
|
||||
//- Transform the physical properties of the particle
|
||||
// according to the given transformation tensor
|
||||
virtual void transformProperties(const tensor& T);
|
||||
|
||||
//- Transform the physical properties of the particle
|
||||
// according to the given separation vector
|
||||
virtual void transformProperties(const vector& separation);
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -36,6 +36,9 @@ inline Foam::CollidingParcel<ParcelType>::CollidingParcel
|
||||
)
|
||||
:
|
||||
ParcelType(owner, position, cellI, tetFaceI, tetPtI),
|
||||
f_(vector::zero),
|
||||
angularMomentum_(vector::zero),
|
||||
torque_(vector::zero),
|
||||
collisionRecords_()
|
||||
{}
|
||||
|
||||
@ -70,18 +73,39 @@ inline Foam::CollidingParcel<ParcelType>::CollidingParcel
|
||||
nParticle0,
|
||||
d0,
|
||||
dTarget0,
|
||||
U0,
|
||||
f0,
|
||||
angularMomentum0,
|
||||
torque0,
|
||||
constProps
|
||||
),
|
||||
f_(f0),
|
||||
angularMomentum_(angularMomentum0),
|
||||
torque_(torque0),
|
||||
collisionRecords_()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * CollidingParcel Member Functions * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::vector& Foam::CollidingParcel<ParcelType>::f() const
|
||||
{
|
||||
return f_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::vector&
|
||||
Foam::CollidingParcel<ParcelType>::angularMomentum() const
|
||||
{
|
||||
return angularMomentum_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::vector& Foam::CollidingParcel<ParcelType>::torque() const
|
||||
{
|
||||
return torque_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::collisionRecordList&
|
||||
@ -91,6 +115,27 @@ Foam::CollidingParcel<ParcelType>::collisionRecords() const
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::vector& Foam::CollidingParcel<ParcelType>::f()
|
||||
{
|
||||
return f_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::vector& Foam::CollidingParcel<ParcelType>::angularMomentum()
|
||||
{
|
||||
return angularMomentum_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::vector& Foam::CollidingParcel<ParcelType>::torque()
|
||||
{
|
||||
return torque_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::collisionRecordList&
|
||||
Foam::CollidingParcel<ParcelType>::collisionRecords()
|
||||
@ -99,4 +144,11 @@ Foam::CollidingParcel<ParcelType>::collisionRecords()
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::vector Foam::CollidingParcel<ParcelType>::omega() const
|
||||
{
|
||||
return angularMomentum_/this->momentOfInertia();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -45,10 +45,30 @@ Foam::CollidingParcel<ParcelType>::CollidingParcel
|
||||
)
|
||||
:
|
||||
ParcelType(mesh, is, readFields),
|
||||
f_(vector::zero),
|
||||
angularMomentum_(vector::zero),
|
||||
torque_(vector::zero),
|
||||
collisionRecords_()
|
||||
{
|
||||
if (readFields)
|
||||
{
|
||||
if (is.format() == IOstream::ASCII)
|
||||
{
|
||||
is >> f_;
|
||||
is >> angularMomentum_;
|
||||
is >> torque_;
|
||||
}
|
||||
else
|
||||
{
|
||||
is.read
|
||||
(
|
||||
reinterpret_cast<char*>(&f_),
|
||||
+ sizeof(f_)
|
||||
+ sizeof(angularMomentum_)
|
||||
+ sizeof(torque_)
|
||||
);
|
||||
}
|
||||
|
||||
is >> collisionRecords_;
|
||||
}
|
||||
|
||||
@ -72,6 +92,18 @@ void Foam::CollidingParcel<ParcelType>::readFields(CloudType& c)
|
||||
|
||||
ParcelType::readFields(c);
|
||||
|
||||
IOField<vector> f(c.fieldIOobject("f", IOobject::MUST_READ));
|
||||
c.checkFieldIOobject(c, f);
|
||||
|
||||
IOField<vector> angularMomentum
|
||||
(
|
||||
c.fieldIOobject("angularMomentum", IOobject::MUST_READ)
|
||||
);
|
||||
c.checkFieldIOobject(c, angularMomentum);
|
||||
|
||||
IOField<vector> torque(c.fieldIOobject("torque", IOobject::MUST_READ));
|
||||
c.checkFieldIOobject(c, torque);
|
||||
|
||||
labelFieldCompactIOField collisionRecordsPairAccessed
|
||||
(
|
||||
c.fieldIOobject("collisionRecordsPairAccessed", IOobject::MUST_READ)
|
||||
@ -128,6 +160,10 @@ void Foam::CollidingParcel<ParcelType>::readFields(CloudType& c)
|
||||
{
|
||||
CollidingParcel<ParcelType>& p = iter();
|
||||
|
||||
p.f_ = f[i];
|
||||
p.angularMomentum_ = angularMomentum[i];
|
||||
p.torque_ = torque[i];
|
||||
|
||||
p.collisionRecords_ = collisionRecordList
|
||||
(
|
||||
collisionRecordsPairAccessed[i],
|
||||
@ -152,6 +188,14 @@ void Foam::CollidingParcel<ParcelType>::writeFields(const CloudType& c)
|
||||
|
||||
label np = c.size();
|
||||
|
||||
IOField<vector> f(c.fieldIOobject("f", IOobject::NO_READ), np);
|
||||
IOField<vector> angularMomentum
|
||||
(
|
||||
c.fieldIOobject("angularMomentum", IOobject::NO_READ),
|
||||
np
|
||||
);
|
||||
IOField<vector> torque(c.fieldIOobject("torque", IOobject::NO_READ), np);
|
||||
|
||||
labelFieldCompactIOField collisionRecordsPairAccessed
|
||||
(
|
||||
c.fieldIOobject("collisionRecordsPairAccessed", IOobject::NO_READ),
|
||||
@ -198,6 +242,10 @@ void Foam::CollidingParcel<ParcelType>::writeFields(const CloudType& c)
|
||||
{
|
||||
const CollidingParcel<ParcelType>& p = iter();
|
||||
|
||||
f[i] = p.f();
|
||||
angularMomentum[i] = p.angularMomentum();
|
||||
torque[i] = p.torque();
|
||||
|
||||
collisionRecordsPairAccessed[i] = p.collisionRecords().pairAccessed();
|
||||
collisionRecordsPairOrigProcOfOther[i] =
|
||||
p.collisionRecords().pairOrigProcOfOther();
|
||||
@ -211,6 +259,10 @@ void Foam::CollidingParcel<ParcelType>::writeFields(const CloudType& c)
|
||||
i++;
|
||||
}
|
||||
|
||||
f.write();
|
||||
angularMomentum.write();
|
||||
torque.write();
|
||||
|
||||
collisionRecordsPairAccessed.write();
|
||||
collisionRecordsPairOrigProcOfOther.write();
|
||||
collisionRecordsPairOrigIdOfOther.write();
|
||||
@ -233,12 +285,22 @@ Foam::Ostream& Foam::operator<<
|
||||
if (os.format() == IOstream::ASCII)
|
||||
{
|
||||
os << static_cast<const ParcelType&>(p)
|
||||
<< token::SPACE << p.f()
|
||||
<< token::SPACE << p.angularMomentum()
|
||||
<< token::SPACE << p.torque()
|
||||
<< token::SPACE << p.collisionRecords();
|
||||
}
|
||||
else
|
||||
{
|
||||
os << static_cast<const ParcelType&>(p)
|
||||
<< p.collisionRecords();
|
||||
os << static_cast<const ParcelType&>(p);
|
||||
os.write
|
||||
(
|
||||
reinterpret_cast<const char*>(&p.f_),
|
||||
+ sizeof(p.f())
|
||||
+ sizeof(p.angularMomentum())
|
||||
+ sizeof(p.torque())
|
||||
);
|
||||
os << p.collisionRecords();
|
||||
}
|
||||
|
||||
// Check state of Ostream
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -213,9 +213,6 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
|
||||
d_(p.d_),
|
||||
dTarget_(p.dTarget_),
|
||||
U_(p.U_),
|
||||
f_(p.f_),
|
||||
angularMomentum_(p.angularMomentum_),
|
||||
torque_(p.torque_),
|
||||
rho_(p.rho_),
|
||||
age_(p.age_),
|
||||
tTurb_(p.tTurb_),
|
||||
@ -240,9 +237,6 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
|
||||
d_(p.d_),
|
||||
dTarget_(p.dTarget_),
|
||||
U_(p.U_),
|
||||
f_(p.f_),
|
||||
angularMomentum_(p.angularMomentum_),
|
||||
torque_(p.torque_),
|
||||
rho_(p.rho_),
|
||||
age_(p.age_),
|
||||
tTurb_(p.tTurb_),
|
||||
@ -437,12 +431,6 @@ void Foam::KinematicParcel<ParcelType>::transformProperties(const tensor& T)
|
||||
ParcelType::transformProperties(T);
|
||||
|
||||
U_ = transform(T, U_);
|
||||
|
||||
f_ = transform(T, f_);
|
||||
|
||||
angularMomentum_ = transform(T, angularMomentum_);
|
||||
|
||||
torque_ = transform(T, torque_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -261,17 +261,6 @@ protected:
|
||||
//- Velocity of Parcel [m/s]
|
||||
vector U_;
|
||||
|
||||
//- Force on particle due to collisions [N]
|
||||
vector f_;
|
||||
|
||||
//- Angular momentum of Parcel in global reference frame
|
||||
// [kg m2/s]
|
||||
vector angularMomentum_;
|
||||
|
||||
//- Torque on particle due to collisions in global
|
||||
// reference frame [Nm]
|
||||
vector torque_;
|
||||
|
||||
//- Density [kg/m3]
|
||||
scalar rho_;
|
||||
|
||||
@ -332,9 +321,6 @@ public:
|
||||
+ " d"
|
||||
+ " dTarget "
|
||||
+ " (Ux Uy Uz)"
|
||||
+ " (fx fy fz)"
|
||||
+ " (angularMomentumx angularMomentumy angularMomentumz)"
|
||||
+ " (torquex torquey torquez)"
|
||||
+ " rho"
|
||||
+ " age"
|
||||
+ " tTurb"
|
||||
@ -367,9 +353,6 @@ public:
|
||||
const scalar nParticle0,
|
||||
const scalar d0,
|
||||
const scalar dTarget0,
|
||||
const vector& U0,
|
||||
const vector& f0,
|
||||
const vector& angularMomentum0,
|
||||
const vector& torque0,
|
||||
const constantProperties& constProps
|
||||
);
|
||||
@ -445,15 +428,6 @@ public:
|
||||
//- Return const access to velocity
|
||||
inline const vector& U() const;
|
||||
|
||||
//- Return const access to force
|
||||
inline const vector& f() const;
|
||||
|
||||
//- Return const access to angular momentum
|
||||
inline const vector& angularMomentum() const;
|
||||
|
||||
//- Return const access to torque
|
||||
inline const vector& torque() const;
|
||||
|
||||
//- Return const access to density
|
||||
inline scalar rho() const;
|
||||
|
||||
@ -496,15 +470,6 @@ public:
|
||||
//- Return access to velocity
|
||||
inline vector& U();
|
||||
|
||||
//- Return access to force
|
||||
inline vector& f();
|
||||
|
||||
//- Return access to angular momentum
|
||||
inline vector& angularMomentum();
|
||||
|
||||
//- Return access to torque
|
||||
inline vector& torque();
|
||||
|
||||
//- Return access to density
|
||||
inline scalar& rho();
|
||||
|
||||
@ -532,9 +497,6 @@ public:
|
||||
//- Particle moment of inertia around diameter axis
|
||||
inline scalar momentOfInertia() const;
|
||||
|
||||
//- Particle angular velocity
|
||||
inline vector omega() const;
|
||||
|
||||
//- Particle volume
|
||||
inline scalar volume() const;
|
||||
|
||||
|
||||
@ -135,9 +135,6 @@ inline Foam::KinematicParcel<ParcelType>::KinematicParcel
|
||||
d_(0.0),
|
||||
dTarget_(0.0),
|
||||
U_(vector::zero),
|
||||
f_(vector::zero),
|
||||
angularMomentum_(vector::zero),
|
||||
torque_(vector::zero),
|
||||
rho_(0.0),
|
||||
age_(0.0),
|
||||
tTurb_(0.0),
|
||||
@ -161,9 +158,6 @@ inline Foam::KinematicParcel<ParcelType>::KinematicParcel
|
||||
const scalar d0,
|
||||
const scalar dTarget0,
|
||||
const vector& U0,
|
||||
const vector& f0,
|
||||
const vector& angularMomentum0,
|
||||
const vector& torque0,
|
||||
const constantProperties& constProps
|
||||
)
|
||||
:
|
||||
@ -174,9 +168,6 @@ inline Foam::KinematicParcel<ParcelType>::KinematicParcel
|
||||
d_(d0),
|
||||
dTarget_(dTarget0),
|
||||
U_(U0),
|
||||
f_(f0),
|
||||
angularMomentum_(angularMomentum0),
|
||||
torque_(torque0),
|
||||
rho_(constProps.rho0()),
|
||||
age_(0.0),
|
||||
tTurb_(0.0),
|
||||
@ -289,30 +280,6 @@ inline const Foam::vector& Foam::KinematicParcel<ParcelType>::U() const
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::vector&
|
||||
Foam::KinematicParcel<ParcelType>::f() const
|
||||
{
|
||||
return f_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::vector&
|
||||
Foam::KinematicParcel<ParcelType>::angularMomentum() const
|
||||
{
|
||||
return angularMomentum_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::vector&
|
||||
Foam::KinematicParcel<ParcelType>::torque() const
|
||||
{
|
||||
return torque_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar Foam::KinematicParcel<ParcelType>::rho() const
|
||||
{
|
||||
@ -404,27 +371,6 @@ inline Foam::vector& Foam::KinematicParcel<ParcelType>::U()
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::vector& Foam::KinematicParcel<ParcelType>::f()
|
||||
{
|
||||
return f_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::vector& Foam::KinematicParcel<ParcelType>::angularMomentum()
|
||||
{
|
||||
return angularMomentum_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::vector& Foam::KinematicParcel<ParcelType>::torque()
|
||||
{
|
||||
return torque_;
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar& Foam::KinematicParcel<ParcelType>::rho()
|
||||
{
|
||||
@ -492,13 +438,6 @@ inline Foam::scalar Foam::KinematicParcel<ParcelType>::momentOfInertia() const
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::vector Foam::KinematicParcel<ParcelType>::omega() const
|
||||
{
|
||||
return angularMomentum_/momentOfInertia();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline Foam::scalar Foam::KinematicParcel<ParcelType>::volume() const
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -51,9 +51,6 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
|
||||
d_(0.0),
|
||||
dTarget_(0.0),
|
||||
U_(vector::zero),
|
||||
f_(vector::zero),
|
||||
angularMomentum_(vector::zero),
|
||||
torque_(vector::zero),
|
||||
rho_(0.0),
|
||||
age_(0.0),
|
||||
tTurb_(0.0),
|
||||
@ -72,9 +69,6 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
|
||||
d_ = readScalar(is);
|
||||
dTarget_ = readScalar(is);
|
||||
is >> U_;
|
||||
is >> f_;
|
||||
is >> angularMomentum_;
|
||||
is >> torque_;
|
||||
rho_ = readScalar(is);
|
||||
age_ = readScalar(is);
|
||||
tTurb_ = readScalar(is);
|
||||
@ -91,9 +85,6 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
|
||||
+ sizeof(d_)
|
||||
+ sizeof(dTarget_)
|
||||
+ sizeof(U_)
|
||||
+ sizeof(f_)
|
||||
+ sizeof(angularMomentum_)
|
||||
+ sizeof(torque_)
|
||||
+ sizeof(rho_)
|
||||
+ sizeof(age_)
|
||||
+ sizeof(tTurb_)
|
||||
@ -141,18 +132,6 @@ void Foam::KinematicParcel<ParcelType>::readFields(CloudType& c)
|
||||
IOField<vector> U(c.fieldIOobject("U", IOobject::MUST_READ));
|
||||
c.checkFieldIOobject(c, U);
|
||||
|
||||
IOField<vector> f(c.fieldIOobject("f", IOobject::MUST_READ));
|
||||
c.checkFieldIOobject(c, f);
|
||||
|
||||
IOField<vector> angularMomentum
|
||||
(
|
||||
c.fieldIOobject("angularMomentum", IOobject::MUST_READ)
|
||||
);
|
||||
c.checkFieldIOobject(c, angularMomentum);
|
||||
|
||||
IOField<vector> torque(c.fieldIOobject("torque", IOobject::MUST_READ));
|
||||
c.checkFieldIOobject(c, torque);
|
||||
|
||||
IOField<scalar> rho(c.fieldIOobject("rho", IOobject::MUST_READ));
|
||||
c.checkFieldIOobject(c, rho);
|
||||
|
||||
@ -177,8 +156,6 @@ void Foam::KinematicParcel<ParcelType>::readFields(CloudType& c)
|
||||
p.d_ = d[i];
|
||||
p.dTarget_ = dTarget[i];
|
||||
p.U_ = U[i];
|
||||
p.f_ = f[i];
|
||||
p.angularMomentum_ = angularMomentum[i];
|
||||
p.rho_ = rho[i];
|
||||
p.age_ = age[i];
|
||||
p.tTurb_ = tTurb[i];
|
||||
@ -207,13 +184,6 @@ void Foam::KinematicParcel<ParcelType>::writeFields(const CloudType& c)
|
||||
IOField<scalar> d(c.fieldIOobject("d", IOobject::NO_READ), np);
|
||||
IOField<scalar> dTarget(c.fieldIOobject("dTarget", IOobject::NO_READ), np);
|
||||
IOField<vector> U(c.fieldIOobject("U", IOobject::NO_READ), np);
|
||||
IOField<vector> f(c.fieldIOobject("f", IOobject::NO_READ), np);
|
||||
IOField<vector> angularMomentum
|
||||
(
|
||||
c.fieldIOobject("angularMomentum", IOobject::NO_READ),
|
||||
np
|
||||
);
|
||||
IOField<vector> torque(c.fieldIOobject("torque", IOobject::NO_READ), np);
|
||||
IOField<scalar> rho(c.fieldIOobject("rho", IOobject::NO_READ), np);
|
||||
IOField<scalar> age(c.fieldIOobject("age", IOobject::NO_READ), np);
|
||||
IOField<scalar> tTurb(c.fieldIOobject("tTurb", IOobject::NO_READ), np);
|
||||
@ -231,9 +201,6 @@ void Foam::KinematicParcel<ParcelType>::writeFields(const CloudType& c)
|
||||
d[i] = p.d();
|
||||
dTarget[i] = p.dTarget();
|
||||
U[i] = p.U();
|
||||
f[i] = p.f();
|
||||
angularMomentum[i] = p.angularMomentum();
|
||||
torque[i] = p.torque();
|
||||
rho[i] = p.rho();
|
||||
age[i] = p.age();
|
||||
tTurb[i] = p.tTurb();
|
||||
@ -248,9 +215,6 @@ void Foam::KinematicParcel<ParcelType>::writeFields(const CloudType& c)
|
||||
d.write();
|
||||
dTarget.write();
|
||||
U.write();
|
||||
f.write();
|
||||
angularMomentum.write();
|
||||
torque.write();
|
||||
rho.write();
|
||||
age.write();
|
||||
tTurb.write();
|
||||
@ -276,9 +240,6 @@ Foam::Ostream& Foam::operator<<
|
||||
<< token::SPACE << p.d()
|
||||
<< token::SPACE << p.dTarget()
|
||||
<< token::SPACE << p.U()
|
||||
<< token::SPACE << p.f()
|
||||
<< token::SPACE << p.angularMomentum()
|
||||
<< token::SPACE << p.torque()
|
||||
<< token::SPACE << p.rho()
|
||||
<< token::SPACE << p.age()
|
||||
<< token::SPACE << p.tTurb()
|
||||
@ -296,9 +257,6 @@ Foam::Ostream& Foam::operator<<
|
||||
+ sizeof(p.d())
|
||||
+ sizeof(p.dTarget())
|
||||
+ sizeof(p.U())
|
||||
+ sizeof(p.f())
|
||||
+ sizeof(p.angularMomentum())
|
||||
+ sizeof(p.torque())
|
||||
+ sizeof(p.rho())
|
||||
+ sizeof(p.age())
|
||||
+ sizeof(p.tTurb())
|
||||
|
||||
Reference in New Issue
Block a user