reactingEulerFoam/phaseSystems/phasePair/orderedPhasePair: Correct lookup of the aspectRatio
Resolves bug-report http://openfoam.org/mantisbt/view.php?id=1899
This commit is contained in:
parent
09af2cb0b6
commit
76a910ab9f
5 changed files with 36 additions and 24 deletions
|
|
@ -77,7 +77,7 @@ Foam::aspectRatioModels::constantAspectRatio::E() const
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"zero",
|
aspectRatioModel::typeName + ":E",
|
||||||
mesh.time().timeName(),
|
mesh.time().timeName(),
|
||||||
mesh
|
mesh
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ License
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "orderedPhasePair.H"
|
#include "orderedPhasePair.H"
|
||||||
#include "aspectRatioModel.H"
|
#include "phaseSystem.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|
@ -73,15 +73,7 @@ Foam::word Foam::orderedPhasePair::name() const
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField> Foam::orderedPhasePair::E() const
|
Foam::tmp<Foam::volScalarField> Foam::orderedPhasePair::E() const
|
||||||
{
|
{
|
||||||
return
|
return phase1().fluid().E(*this);
|
||||||
phase1().mesh().lookupObject<aspectRatioModel>
|
|
||||||
(
|
|
||||||
IOobject::groupName
|
|
||||||
(
|
|
||||||
aspectRatioModel::typeName,
|
|
||||||
orderedPhasePair::name()
|
|
||||||
)
|
|
||||||
).E();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,8 +41,6 @@ SourceFiles
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
class aspectRatioModel;
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class orderedPhasePair Declaration
|
Class orderedPhasePair Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
@ -51,17 +49,6 @@ class orderedPhasePair
|
||||||
:
|
:
|
||||||
public phasePair
|
public phasePair
|
||||||
{
|
{
|
||||||
// Private data
|
|
||||||
|
|
||||||
//- Aspect ratio model
|
|
||||||
autoPtr<aspectRatioModel> aspectRatio_;
|
|
||||||
|
|
||||||
|
|
||||||
// Private member functions
|
|
||||||
|
|
||||||
//- Set the aspect ratio model, if there is one
|
|
||||||
void setAspectRatioModel(const dictTable aspectRatioTable);
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -221,6 +221,36 @@ Foam::tmp<Foam::volVectorField> Foam::phaseSystem::U() const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volScalarField>
|
||||||
|
Foam::phaseSystem::E(const phasePairKey& key) const
|
||||||
|
{
|
||||||
|
if (aspectRatioModels_.found(key))
|
||||||
|
{
|
||||||
|
return aspectRatioModels_[key]->E();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return tmp<volScalarField>
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
aspectRatioModel::typeName + ":E",
|
||||||
|
this->mesh_.time().timeName(),
|
||||||
|
this->mesh_,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
|
),
|
||||||
|
this->mesh_,
|
||||||
|
dimensionedScalar("zero", dimless, 1)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::volScalarField>
|
Foam::tmp<Foam::volScalarField>
|
||||||
Foam::phaseSystem::sigma(const phasePairKey& key) const
|
Foam::phaseSystem::sigma(const phasePairKey& key) const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -310,6 +310,9 @@ public:
|
||||||
//- Access the rate of change of the pressure
|
//- Access the rate of change of the pressure
|
||||||
inline volScalarField& dpdt();
|
inline volScalarField& dpdt();
|
||||||
|
|
||||||
|
//- Return the aspect-ratio
|
||||||
|
tmp<volScalarField> E(const phasePairKey& key) const;
|
||||||
|
|
||||||
//- Return the surface tension coefficient
|
//- Return the surface tension coefficient
|
||||||
tmp<volScalarField> sigma(const phasePairKey& key) const;
|
tmp<volScalarField> sigma(const phasePairKey& key) const;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue