mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: lagrangian - moved poissionsRatio and youngsModulus to CollidingCloud
This commit is contained in:
@ -92,6 +92,7 @@ Foam::CollidingCloud<CloudType>::CollidingCloud
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
CloudType(cloudName, rho, U, mu, g, false),
|
CloudType(cloudName, rho, U, mu, g, false),
|
||||||
|
constProps_(this->particleProperties()),
|
||||||
collisionModel_(NULL)
|
collisionModel_(NULL)
|
||||||
{
|
{
|
||||||
if (this->solution().steadyState())
|
if (this->solution().steadyState())
|
||||||
@ -246,4 +247,5 @@ void Foam::CollidingCloud<CloudType>::info()
|
|||||||
<< rotationalKineticEnergy << nl;
|
<< rotationalKineticEnergy << nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -97,6 +97,10 @@ protected:
|
|||||||
|
|
||||||
// Protected data
|
// Protected data
|
||||||
|
|
||||||
|
//- Thermo parcel constant properties
|
||||||
|
typename parcelType::constantProperties constProps_;
|
||||||
|
|
||||||
|
|
||||||
// References to the cloud sub-models
|
// References to the cloud sub-models
|
||||||
|
|
||||||
//- Collision model
|
//- Collision model
|
||||||
@ -180,6 +184,11 @@ public:
|
|||||||
//- Return a reference to the cloud copy
|
//- Return a reference to the cloud copy
|
||||||
inline const CollidingCloud& cloudCopy() const;
|
inline const CollidingCloud& cloudCopy() const;
|
||||||
|
|
||||||
|
//- Return the constant properties
|
||||||
|
inline const typename parcelType::constantProperties&
|
||||||
|
constProps() const;
|
||||||
|
|
||||||
|
|
||||||
//- If the collision model controls the wall interaction,
|
//- If the collision model controls the wall interaction,
|
||||||
// then the wall impact distance should be zero.
|
// then the wall impact distance should be zero.
|
||||||
// Otherwise, it should be allowed to be the value from
|
// Otherwise, it should be allowed to be the value from
|
||||||
|
|||||||
@ -33,6 +33,14 @@ Foam::CollidingCloud<CloudType>::cloudCopy() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
inline const typename CloudType::particleType::constantProperties&
|
||||||
|
Foam::CollidingCloud<CloudType>::constProps() const
|
||||||
|
{
|
||||||
|
return constProps_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
inline const Foam::CollisionModel<Foam::CollidingCloud<CloudType> >&
|
inline const Foam::CollisionModel<Foam::CollidingCloud<CloudType> >&
|
||||||
Foam::CollidingCloud<CloudType>::collision() const
|
Foam::CollidingCloud<CloudType>::collision() const
|
||||||
|
|||||||
@ -74,6 +74,58 @@ class CollidingParcel
|
|||||||
:
|
:
|
||||||
public ParcelType
|
public ParcelType
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Class to hold thermo particle constant properties
|
||||||
|
class constantProperties
|
||||||
|
:
|
||||||
|
public ParcelType::constantProperties
|
||||||
|
{
|
||||||
|
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
//- Young's modulus [N/m2]
|
||||||
|
demandDrivenEntry<scalar> youngsModulus_;
|
||||||
|
|
||||||
|
//- Poisson's ratio
|
||||||
|
demandDrivenEntry<scalar> poissonsRatio_;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Null constructor
|
||||||
|
constantProperties();
|
||||||
|
|
||||||
|
//- Copy constructor
|
||||||
|
constantProperties(const constantProperties& cp);
|
||||||
|
|
||||||
|
//- Construct from dictionary
|
||||||
|
constantProperties(const dictionary& parentDict);
|
||||||
|
|
||||||
|
//- Construct from components
|
||||||
|
constantProperties
|
||||||
|
(
|
||||||
|
const label parcelTypeId,
|
||||||
|
const scalar rhoMin,
|
||||||
|
const scalar rho0,
|
||||||
|
const scalar minParticleMass,
|
||||||
|
const scalar youngsModulus,
|
||||||
|
const scalar poissonsRatio
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
|
||||||
|
//- Return const access to Young's Modulus
|
||||||
|
inline scalar youngsModulus() const;
|
||||||
|
|
||||||
|
//- Return const access to Poisson's ratio
|
||||||
|
inline scalar poissonsRatio() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Protected data
|
// Protected data
|
||||||
|
|||||||
@ -25,6 +25,63 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
inline Foam::CollidingParcel<ParcelType>::constantProperties::
|
||||||
|
constantProperties()
|
||||||
|
:
|
||||||
|
ParcelType::constantProperties(),
|
||||||
|
youngsModulus_(this->dict_, 0.0),
|
||||||
|
poissonsRatio_(this->dict_, 0.0)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
inline Foam::CollidingParcel<ParcelType>::constantProperties::constantProperties
|
||||||
|
(
|
||||||
|
const constantProperties& cp
|
||||||
|
)
|
||||||
|
:
|
||||||
|
ParcelType::constantProperties(cp),
|
||||||
|
youngsModulus_(cp.youngsModulus_),
|
||||||
|
poissonsRatio_(cp.poissonsRatio_)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
inline Foam::CollidingParcel<ParcelType>::constantProperties::constantProperties
|
||||||
|
(
|
||||||
|
const dictionary& parentDict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
ParcelType::constantProperties(parentDict),
|
||||||
|
youngsModulus_(this->dict_, "youngsModulus"),
|
||||||
|
poissonsRatio_(this->dict_, "poissonsRatio")
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
inline Foam::CollidingParcel<ParcelType>::constantProperties::constantProperties
|
||||||
|
(
|
||||||
|
const label parcelTypeId,
|
||||||
|
const scalar rhoMin,
|
||||||
|
const scalar rho0,
|
||||||
|
const scalar minParticleMass,
|
||||||
|
const scalar youngsModulus,
|
||||||
|
const scalar poissonsRatio
|
||||||
|
)
|
||||||
|
:
|
||||||
|
ParcelType::constantProperties
|
||||||
|
(
|
||||||
|
parcelTypeId,
|
||||||
|
rhoMin,
|
||||||
|
rho0,
|
||||||
|
minParticleMass
|
||||||
|
),
|
||||||
|
youngsModulus_(this->dict_, youngsModulus),
|
||||||
|
poissonsRatio_(this->dict_, poissonsRatio)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::CollidingParcel<ParcelType>::CollidingParcel
|
inline Foam::CollidingParcel<ParcelType>::CollidingParcel
|
||||||
(
|
(
|
||||||
@ -83,7 +140,25 @@ inline Foam::CollidingParcel<ParcelType>::CollidingParcel
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * CollidingParcel Member Functions * * * * * * * //
|
// * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
inline Foam::scalar
|
||||||
|
Foam::CollidingParcel<ParcelType>::constantProperties::youngsModulus() const
|
||||||
|
{
|
||||||
|
return youngsModulus_.value();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
inline Foam::scalar
|
||||||
|
Foam::CollidingParcel<ParcelType>::constantProperties::poissonsRatio() const
|
||||||
|
{
|
||||||
|
return poissonsRatio_.value();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * CollidingParcel Member Functions * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline const Foam::vector& Foam::CollidingParcel<ParcelType>::f() const
|
inline const Foam::vector& Foam::CollidingParcel<ParcelType>::f() const
|
||||||
|
|||||||
@ -108,12 +108,6 @@ public:
|
|||||||
//- Minimum particle mass [kg]
|
//- Minimum particle mass [kg]
|
||||||
demandDrivenEntry<scalar> minParticleMass_;
|
demandDrivenEntry<scalar> minParticleMass_;
|
||||||
|
|
||||||
//- Young's modulus [N/m2]
|
|
||||||
demandDrivenEntry<scalar> youngsModulus_;
|
|
||||||
|
|
||||||
//- Poisson's ratio
|
|
||||||
demandDrivenEntry<scalar> poissonsRatio_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -134,9 +128,7 @@ public:
|
|||||||
const label parcelTypeId,
|
const label parcelTypeId,
|
||||||
const scalar rhoMin,
|
const scalar rhoMin,
|
||||||
const scalar rho0,
|
const scalar rho0,
|
||||||
const scalar minParticleMass,
|
const scalar minParticleMass
|
||||||
const scalar youngsModulus,
|
|
||||||
const scalar poissonsRatio
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -156,12 +148,6 @@ public:
|
|||||||
|
|
||||||
//- Return const access to the minimum particle mass
|
//- Return const access to the minimum particle mass
|
||||||
inline scalar minParticleMass() const;
|
inline scalar minParticleMass() const;
|
||||||
|
|
||||||
//- Return const access to Young's Modulus
|
|
||||||
inline scalar youngsModulus() const;
|
|
||||||
|
|
||||||
//- Return const access to Poisson's ratio
|
|
||||||
inline scalar poissonsRatio() const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -37,9 +37,7 @@ Foam::KinematicParcel<ParcelType>::constantProperties::constantProperties()
|
|||||||
parcelTypeId_(dict_, -1),
|
parcelTypeId_(dict_, -1),
|
||||||
rhoMin_(dict_, 0.0),
|
rhoMin_(dict_, 0.0),
|
||||||
rho0_(dict_, 0.0),
|
rho0_(dict_, 0.0),
|
||||||
minParticleMass_(dict_, 0.0),
|
minParticleMass_(dict_, 0.0)
|
||||||
youngsModulus_(dict_, 0.0),
|
|
||||||
poissonsRatio_(dict_, 0.0)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -53,9 +51,7 @@ inline Foam::KinematicParcel<ParcelType>::constantProperties::constantProperties
|
|||||||
parcelTypeId_(cp.parcelTypeId_),
|
parcelTypeId_(cp.parcelTypeId_),
|
||||||
rhoMin_(cp.rhoMin_),
|
rhoMin_(cp.rhoMin_),
|
||||||
rho0_(cp.rho0_),
|
rho0_(cp.rho0_),
|
||||||
minParticleMass_(cp.minParticleMass_),
|
minParticleMass_(cp.minParticleMass_)
|
||||||
youngsModulus_(cp.youngsModulus_),
|
|
||||||
poissonsRatio_(cp.poissonsRatio_)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -69,9 +65,7 @@ inline Foam::KinematicParcel<ParcelType>::constantProperties::constantProperties
|
|||||||
parcelTypeId_(dict_, "parcelTypeId", 1),
|
parcelTypeId_(dict_, "parcelTypeId", 1),
|
||||||
rhoMin_(dict_, "rhoMin", 1e-15),
|
rhoMin_(dict_, "rhoMin", 1e-15),
|
||||||
rho0_(dict_, "rho0"),
|
rho0_(dict_, "rho0"),
|
||||||
minParticleMass_(dict_, "minParticleMass", 1e-15),
|
minParticleMass_(dict_, "minParticleMass", 1e-15)
|
||||||
youngsModulus_(dict_, "youngsModulus"),
|
|
||||||
poissonsRatio_(dict_, "poissonsRatio")
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -81,18 +75,14 @@ inline Foam::KinematicParcel<ParcelType>::constantProperties::constantProperties
|
|||||||
const label parcelTypeId,
|
const label parcelTypeId,
|
||||||
const scalar rhoMin,
|
const scalar rhoMin,
|
||||||
const scalar rho0,
|
const scalar rho0,
|
||||||
const scalar minParticleMass,
|
const scalar minParticleMass
|
||||||
const scalar youngsModulus,
|
|
||||||
const scalar poissonsRatio
|
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
dict_(dictionary::null),
|
dict_(dictionary::null),
|
||||||
parcelTypeId_(dict_, parcelTypeId),
|
parcelTypeId_(dict_, parcelTypeId),
|
||||||
rhoMin_(dict_, rhoMin),
|
rhoMin_(dict_, rhoMin),
|
||||||
rho0_(dict_, rho0),
|
rho0_(dict_, rho0),
|
||||||
minParticleMass_(dict_, minParticleMass),
|
minParticleMass_(dict_, minParticleMass)
|
||||||
youngsModulus_(dict_, youngsModulus),
|
|
||||||
poissonsRatio_(dict_, poissonsRatio)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -198,22 +188,6 @@ Foam::KinematicParcel<ParcelType>::constantProperties::minParticleMass() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
inline Foam::scalar
|
|
||||||
Foam::KinematicParcel<ParcelType>::constantProperties::youngsModulus() const
|
|
||||||
{
|
|
||||||
return youngsModulus_.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
inline Foam::scalar
|
|
||||||
Foam::KinematicParcel<ParcelType>::constantProperties::poissonsRatio() const
|
|
||||||
{
|
|
||||||
return poissonsRatio_.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * KinematicParcel Member Functions * * * * * * * //
|
// * * * * * * * KinematicParcel Member Functions * * * * * * * //
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
|
|||||||
Reference in New Issue
Block a user