multiphaseEulerFoam: Add "none" diameterModel for phases that are always continuous
This model will generate an error if the diameter is requested. This will happen if another sub model is included that depends on the diameter of the continuous phase. It therefore provides a check that the sub-modelling combination is valid. Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
This commit is contained in:
@ -19,6 +19,7 @@ diameterModels/sphericalDiameter/sphericalDiameter.C
|
||||
diameterModels/constantDiameter/constantDiameter.C
|
||||
diameterModels/isothermalDiameter/isothermalDiameter.C
|
||||
diameterModels/linearTsubDiameter/linearTsubDiameter.C
|
||||
diameterModels/noDiameter/noDiameter.C
|
||||
diameterModels/velocityGroup/velocityGroup.C
|
||||
|
||||
diameterModels/IATE/IATE.C
|
||||
|
||||
@ -0,0 +1,85 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "noDiameter.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace diameterModels
|
||||
{
|
||||
defineTypeNameAndDebug(noDiameter, 0);
|
||||
addToRunTimeSelectionTable(diameterModel, noDiameter, dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::diameterModels::noDiameter::noDiameter
|
||||
(
|
||||
const dictionary& diameterProperties,
|
||||
const phaseModel& phase
|
||||
)
|
||||
:
|
||||
diameterModel(diameterProperties, phase)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::diameterModels::noDiameter::~noDiameter()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::diameterModels::noDiameter::d() const
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Requested diameter of phase " << phase().name()
|
||||
<< " from diameter model \"" << typeName << "\"."
|
||||
<< exit(FatalError);
|
||||
|
||||
return tmp<volScalarField>(nullptr);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::diameterModels::noDiameter::a() const
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Requested surface area per unit volume of phase " << phase().name()
|
||||
<< " from diameter model \"" << typeName << "\"."
|
||||
<< exit(FatalError);
|
||||
|
||||
return tmp<volScalarField>(nullptr);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,94 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::diameterModels::noDiameter
|
||||
|
||||
Description
|
||||
Diameter model for purely continuous phases.
|
||||
|
||||
SourceFiles
|
||||
noDiameter.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef noDiameter_H
|
||||
#define noDiameter_H
|
||||
|
||||
#include "diameterModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace diameterModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class noDiameter Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class noDiameter
|
||||
:
|
||||
public diameterModel
|
||||
{
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("none");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from dictionary and phase
|
||||
noDiameter
|
||||
(
|
||||
const dictionary& diameterProperties,
|
||||
const phaseModel& phase
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~noDiameter();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Get the diameter field
|
||||
virtual tmp<volScalarField> d() const;
|
||||
|
||||
//- Return the surface area per unit volume
|
||||
virtual tmp<volScalarField> a() const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace diameterModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user