Skip to content
Snippets Groups Projects
Commit 76a910ab authored by Henry Weller's avatar Henry Weller
Browse files

reactingEulerFoam/phaseSystems/phasePair/orderedPhasePair: Correct lookup of the aspectRatio

Resolves bug-report http://openfoam.org/mantisbt/view.php?id=1899
parent 09af2cb0
Branches
Tags
1 merge request!25Merge foundation
......@@ -77,7 +77,7 @@ Foam::aspectRatioModels::constantAspectRatio::E() const
(
IOobject
(
"zero",
aspectRatioModel::typeName + ":E",
mesh.time().timeName(),
mesh
),
......
......@@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "orderedPhasePair.H"
#include "aspectRatioModel.H"
#include "phaseSystem.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
......@@ -73,15 +73,7 @@ Foam::word Foam::orderedPhasePair::name() const
Foam::tmp<Foam::volScalarField> Foam::orderedPhasePair::E() const
{
return
phase1().mesh().lookupObject<aspectRatioModel>
(
IOobject::groupName
(
aspectRatioModel::typeName,
orderedPhasePair::name()
)
).E();
return phase1().fluid().E(*this);
}
......
......@@ -41,8 +41,6 @@ SourceFiles
namespace Foam
{
class aspectRatioModel;
/*---------------------------------------------------------------------------*\
Class orderedPhasePair Declaration
\*---------------------------------------------------------------------------*/
......@@ -51,17 +49,6 @@ class orderedPhasePair
:
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:
......
......@@ -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::phaseSystem::sigma(const phasePairKey& key) const
{
......
......@@ -310,6 +310,9 @@ public:
//- Access the rate of change of the pressure
inline volScalarField& dpdt();
//- Return the aspect-ratio
tmp<volScalarField> E(const phasePairKey& key) const;
//- Return the surface tension coefficient
tmp<volScalarField> sigma(const phasePairKey& key) const;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment