Moving Tref from Cloud to models, to be read from coeffDict

This commit is contained in:
graham
2009-06-17 14:48:14 +01:00
parent 774dcafb45
commit 80ef3117bf
6 changed files with 14 additions and 9 deletions

View File

@ -34,9 +34,6 @@ License
template<class ParcelType>
Foam::scalar Foam::DsmcCloud<ParcelType>::kb = 1.380650277e-23;
template<class ParcelType>
Foam::scalar Foam::DsmcCloud<ParcelType>::Tref = 273;
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //

View File

@ -172,9 +172,6 @@ public:
//- Boltzmann constant
static scalar kb;
//- Reference temperature for all models
static scalar Tref;
// Constructors

View File

@ -97,6 +97,7 @@ Foam::LarsenBorgnakkeVariableHardSphere<CloudType>::LarsenBorgnakkeVariableHardS
)
:
BinaryCollisionModel<CloudType>(dict, cloud, typeName),
Tref_(readScalar(this->coeffDict().lookup("Tref"))),
relaxationCollisionNumber_
(
readScalar(this->coeffDict().lookup("relaxationCollisionNumber"))
@ -156,7 +157,7 @@ Foam::scalar Foam::LarsenBorgnakkeVariableHardSphere<CloudType>::sigmaTcR
// calculating cross section = pi*dPQ^2, where dPQ is from Bird, eq. 4.79
scalar sigmaTPQ =
mathematicalConstant::pi*dPQ*dPQ
*pow(2.0*CloudType::kb*CloudType::Tref/(mR*cR*cR), omegaPQ - 0.5)
*pow(2.0*CloudType::kb*Tref_/(mR*cR*cR), omegaPQ - 0.5)
/exp(Foam::lgamma(2.5 - omegaPQ));
return sigmaTPQ*cR;

View File

@ -50,6 +50,9 @@ class LarsenBorgnakkeVariableHardSphere
{
// Private data
//- Reference temperature
const scalar Tref_;
//- Relaxation collision number
const scalar relaxationCollisionNumber_;

View File

@ -35,7 +35,8 @@ Foam::VariableHardSphere<CloudType>::VariableHardSphere
CloudType& cloud
)
:
BinaryCollisionModel<CloudType>(dict, cloud, typeName)
BinaryCollisionModel<CloudType>(dict, cloud, typeName),
Tref_(readScalar(this->coeffDict().lookup("Tref")))
{}
@ -90,7 +91,7 @@ Foam::scalar Foam::VariableHardSphere<CloudType>::sigmaTcR
// calculating cross section = pi*dPQ^2, where dPQ is from Bird, eq. 4.79
scalar sigmaTPQ =
mathematicalConstant::pi*dPQ*dPQ
*pow(2.0*CloudType::kb*CloudType::Tref/(mR*cR*cR), omegaPQ - 0.5)
*pow(2.0*CloudType::kb*Tref_/(mR*cR*cR), omegaPQ - 0.5)
/exp(Foam::lgamma(2.5 - omegaPQ));
return sigmaTPQ*cR;

View File

@ -47,6 +47,12 @@ class VariableHardSphere
:
public BinaryCollisionModel<CloudType>
{
// Private data
//- Reference temperature
const scalar Tref_;
public:
//- Runtime type information