basicMultiComponentMixture got featured species diffusivity fields
This commit is contained in:
parent
a468f276b2
commit
e3278f0f1b
3 changed files with 93 additions and 0 deletions
|
|
@ -35,6 +35,7 @@ Foam::basicMultiComponentMixture::basicMultiComponentMixture
|
|||
)
|
||||
:
|
||||
species_(specieNames),
|
||||
D_(species_.size()),
|
||||
Y_(species_.size())
|
||||
{
|
||||
forAll(species_, i)
|
||||
|
|
@ -99,6 +100,24 @@ Foam::basicMultiComponentMixture::basicMultiComponentMixture
|
|||
)
|
||||
);
|
||||
}
|
||||
|
||||
D_.set
|
||||
(
|
||||
i,
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"D." + species_[i],
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("D", dimArea/dimTime, 0.0)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// Do not enforce constraint of sum of mass fractions to equal 1 here
|
||||
|
|
|
|||
|
|
@ -62,6 +62,9 @@ protected:
|
|||
//- Species mass fractions
|
||||
PtrList<volScalarField> Y_;
|
||||
|
||||
//- Mixture-averaged species diffusivities
|
||||
PtrList<volScalarField> D_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
|
@ -87,6 +90,12 @@ public:
|
|||
|
||||
// Member functions
|
||||
|
||||
//- Calculate mixture-aveaged diffusivities
|
||||
virtual void calculateDiffusivities(const volScalarField& p, const volScalarField& T) const
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//- Return the table of species
|
||||
const speciesTable& species() const
|
||||
{
|
||||
|
|
@ -111,6 +120,24 @@ public:
|
|||
//- Return the const mass-fraction field for a specie given by name
|
||||
inline const volScalarField& Y(const word& specieName) const;
|
||||
|
||||
//- Return the species diffusivity fields
|
||||
inline PtrList<volScalarField>& D();
|
||||
|
||||
//- Return the const species diffusivity fields
|
||||
inline const PtrList<volScalarField>& D() const;
|
||||
|
||||
//- Return the diffusivity field for a specie given by index
|
||||
inline volScalarField& D(const label i);
|
||||
|
||||
//- Return the const diffusivity field for a specie given by index
|
||||
inline const volScalarField& D(const label i) const;
|
||||
|
||||
//- Return the diffusivity field for a specie given by name
|
||||
inline volScalarField& D(const word& specieName);
|
||||
|
||||
//- Return the const diffusivity field for a specie given by name
|
||||
inline const volScalarField& D(const word& specieName) const;
|
||||
|
||||
//- Does the mixture include this specie?
|
||||
inline bool contains(const word& specieName) const;
|
||||
|
||||
|
|
|
|||
|
|
@ -70,6 +70,53 @@ inline const Foam::volScalarField& Foam::basicMultiComponentMixture::Y
|
|||
}
|
||||
|
||||
|
||||
inline Foam::PtrList<Foam::volScalarField>&
|
||||
Foam::basicMultiComponentMixture::D()
|
||||
{
|
||||
return D_;
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::PtrList<Foam::volScalarField>&
|
||||
Foam::basicMultiComponentMixture::D() const
|
||||
{
|
||||
return D_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::volScalarField& Foam::basicMultiComponentMixture::D(const label i)
|
||||
{
|
||||
return D_[i];
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::volScalarField& Foam::basicMultiComponentMixture::D
|
||||
(
|
||||
const label i
|
||||
) const
|
||||
{
|
||||
return D_[i];
|
||||
}
|
||||
|
||||
|
||||
inline Foam::volScalarField& Foam::basicMultiComponentMixture::D
|
||||
(
|
||||
const word& specieName
|
||||
)
|
||||
{
|
||||
return D_[species_[specieName]];
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::volScalarField& Foam::basicMultiComponentMixture::D
|
||||
(
|
||||
const word& specieName
|
||||
) const
|
||||
{
|
||||
return D_[species_[specieName]];
|
||||
}
|
||||
|
||||
|
||||
inline bool Foam::basicMultiComponentMixture::contains
|
||||
(
|
||||
const word& specieName
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue