mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
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:
@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user