mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -397,6 +397,9 @@ public:
|
|||||||
// inline const typename parcelType::forceType& forces() const;
|
// inline const typename parcelType::forceType& forces() const;
|
||||||
inline const forceType& forces() const;
|
inline const forceType& forces() const;
|
||||||
|
|
||||||
|
//- Return the optional particle forces
|
||||||
|
inline forceType& forces();
|
||||||
|
|
||||||
//- Optional cloud function objects
|
//- Optional cloud function objects
|
||||||
inline functionType& functions();
|
inline functionType& functions();
|
||||||
|
|
||||||
@ -487,6 +490,9 @@ public:
|
|||||||
//- Total linear kinetic energy in the system
|
//- Total linear kinetic energy in the system
|
||||||
inline scalar linearKineticEnergyOfSystem() const;
|
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
|
//- Penetration for fraction [0-1] of the current total mass
|
||||||
inline scalar penetration(const scalar fraction) const;
|
inline scalar penetration(const scalar fraction) const;
|
||||||
|
|
||||||
|
|||||||
@ -156,6 +156,14 @@ Foam::KinematicCloud<CloudType>::forces() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
inline typename Foam::KinematicCloud<CloudType>::forceType&
|
||||||
|
Foam::KinematicCloud<CloudType>::forces()
|
||||||
|
{
|
||||||
|
return forces_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
inline typename Foam::KinematicCloud<CloudType>::functionType&
|
inline typename Foam::KinematicCloud<CloudType>::functionType&
|
||||||
Foam::KinematicCloud<CloudType>::functions()
|
Foam::KinematicCloud<CloudType>::functions()
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -38,7 +38,9 @@ Foam::ParticleForceList<CloudType>::ParticleForceList
|
|||||||
PtrList<ParticleForce<CloudType> >(),
|
PtrList<ParticleForce<CloudType> >(),
|
||||||
owner_(owner),
|
owner_(owner),
|
||||||
mesh_(mesh),
|
mesh_(mesh),
|
||||||
dict_(dictionary::null)
|
dict_(dictionary::null),
|
||||||
|
calcCoupled_(true),
|
||||||
|
calcNonCoupled_(true)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -54,7 +56,9 @@ Foam::ParticleForceList<CloudType>::ParticleForceList
|
|||||||
PtrList<ParticleForce<CloudType> >(),
|
PtrList<ParticleForce<CloudType> >(),
|
||||||
owner_(owner),
|
owner_(owner),
|
||||||
mesh_(mesh),
|
mesh_(mesh),
|
||||||
dict_(dict)
|
dict_(dict),
|
||||||
|
calcCoupled_(true),
|
||||||
|
calcNonCoupled_(true)
|
||||||
{
|
{
|
||||||
if (readFields)
|
if (readFields)
|
||||||
{
|
{
|
||||||
@ -151,10 +155,14 @@ Foam::forceSuSp Foam::ParticleForceList<CloudType>::calcCoupled
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
forceSuSp value(vector::zero, 0.0);
|
forceSuSp value(vector::zero, 0.0);
|
||||||
|
|
||||||
|
if (calcCoupled_)
|
||||||
|
{
|
||||||
forAll(*this, i)
|
forAll(*this, i)
|
||||||
{
|
{
|
||||||
value += this->operator[](i).calcCoupled(p, dt, mass, Re, muc);
|
value += this->operator[](i).calcCoupled(p, dt, mass, Re, muc);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
@ -171,10 +179,14 @@ Foam::forceSuSp Foam::ParticleForceList<CloudType>::calcNonCoupled
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
forceSuSp value(vector::zero, 0.0);
|
forceSuSp value(vector::zero, 0.0);
|
||||||
|
|
||||||
|
if (calcNonCoupled_)
|
||||||
|
{
|
||||||
forAll(*this, i)
|
forAll(*this, i)
|
||||||
{
|
{
|
||||||
value += this->operator[](i).calcNonCoupled(p, dt, mass, Re, muc);
|
value += this->operator[](i).calcNonCoupled(p, dt, mass, Re, muc);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -64,6 +64,12 @@ class ParticleForceList
|
|||||||
//- Forces dictionary
|
//- Forces dictionary
|
||||||
const dictionary dict_;
|
const dictionary dict_;
|
||||||
|
|
||||||
|
//- Calculate coupled forces flag
|
||||||
|
bool calcCoupled_;
|
||||||
|
|
||||||
|
//- Calculate non-coupled forces flag
|
||||||
|
bool calcNonCoupled_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -105,6 +111,12 @@ public:
|
|||||||
//- Return the forces dictionary
|
//- Return the forces dictionary
|
||||||
inline const dictionary& dict() const;
|
inline const dictionary& dict() const;
|
||||||
|
|
||||||
|
//- Set the calcCoupled flag
|
||||||
|
inline void setCalcCoupled(bool flag);
|
||||||
|
|
||||||
|
//- Set the calcNonCoupled flag
|
||||||
|
inline void setCalcNonCoupled(bool flag);
|
||||||
|
|
||||||
|
|
||||||
// Evaluation
|
// Evaluation
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -53,4 +53,18 @@ inline const Foam::dictionary& Foam::ParticleForceList<CloudType>::dict() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
inline void Foam::ParticleForceList<CloudType>::setCalcCoupled(bool flag)
|
||||||
|
{
|
||||||
|
calcCoupled_ = flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
inline void Foam::ParticleForceList<CloudType>::setCalcNonCoupled(bool flag)
|
||||||
|
{
|
||||||
|
calcNonCoupled_ = flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
Reference in New Issue
Block a user