multiphaseEuler::SolidThermalPhaseModel: New thermal phase model for solid phases
which provides the energy equation specific for stationary solid phases.
This commit is contained in:
@ -85,15 +85,12 @@ void Foam::solvers::multiphaseEuler::energyPredictor()
|
|||||||
|
|
||||||
const volScalarField& alpha = phase;
|
const volScalarField& alpha = phase;
|
||||||
const volScalarField& rho = phase.rho();
|
const volScalarField& rho = phase.rho();
|
||||||
const tmp<volVectorField> tU(phase.U());
|
|
||||||
const volVectorField& U(tU());
|
|
||||||
|
|
||||||
fvScalarMatrix EEqn
|
fvScalarMatrix EEqn
|
||||||
(
|
(
|
||||||
phase.heEqn()
|
phase.heEqn()
|
||||||
==
|
==
|
||||||
*heatTransfer[phase.name()]
|
*heatTransfer[phase.name()]
|
||||||
+ alpha*rho*(U&buoyancy.g)
|
|
||||||
+ fvModels().source(alpha, rho, phase.thermo().he())
|
+ fvModels().source(alpha, rho, phase.thermo().he())
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -71,7 +71,8 @@ Foam::AnisothermalPhaseModel<BasePhaseModel>::AnisothermalPhaseModel
|
|||||||
const label index
|
const label index
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
BasePhaseModel(fluid, phaseName, referencePhase, index)
|
BasePhaseModel(fluid, phaseName, referencePhase, index),
|
||||||
|
g_(fluid.mesh().lookupObject<uniformDimensionedVectorField>("g"))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -132,7 +133,8 @@ Foam::AnisothermalPhaseModel<BasePhaseModel>::heEqn()
|
|||||||
|
|
||||||
+ this->divq(he)
|
+ this->divq(he)
|
||||||
==
|
==
|
||||||
alpha*this->Qdot()
|
alpha*rho*(U&g_)
|
||||||
|
+ alpha*this->Qdot()
|
||||||
);
|
);
|
||||||
|
|
||||||
// Add the appropriate pressure-work term
|
// Add the appropriate pressure-work term
|
||||||
|
|||||||
@ -37,6 +37,7 @@ SourceFiles
|
|||||||
#define AnisothermalPhaseModel_H
|
#define AnisothermalPhaseModel_H
|
||||||
|
|
||||||
#include "phaseModel.H"
|
#include "phaseModel.H"
|
||||||
|
#include "uniformDimensionedFields.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -52,6 +53,12 @@ class AnisothermalPhaseModel
|
|||||||
:
|
:
|
||||||
public BasePhaseModel
|
public BasePhaseModel
|
||||||
{
|
{
|
||||||
|
// Private Member Data
|
||||||
|
|
||||||
|
//- Gravitational acceleration
|
||||||
|
const uniformDimensionedVectorField& g_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
//- Optionally filter the pressure work term as the phase-fraction -> 0
|
//- Optionally filter the pressure work term as the phase-fraction -> 0
|
||||||
|
|||||||
@ -0,0 +1,91 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Copyright (C) 2023 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 "SolidThermalPhaseModel.H"
|
||||||
|
#include "fvmDdt.H"
|
||||||
|
#include "fvmSup.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class BasePhaseModel>
|
||||||
|
Foam::SolidThermalPhaseModel<BasePhaseModel>::SolidThermalPhaseModel
|
||||||
|
(
|
||||||
|
const phaseSystem& fluid,
|
||||||
|
const word& phaseName,
|
||||||
|
const bool referencePhase,
|
||||||
|
const label index
|
||||||
|
)
|
||||||
|
:
|
||||||
|
BasePhaseModel(fluid, phaseName, referencePhase, index)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class BasePhaseModel>
|
||||||
|
Foam::SolidThermalPhaseModel<BasePhaseModel>::~SolidThermalPhaseModel()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class BasePhaseModel>
|
||||||
|
void Foam::SolidThermalPhaseModel<BasePhaseModel>::correctThermo()
|
||||||
|
{
|
||||||
|
BasePhaseModel::correctThermo();
|
||||||
|
|
||||||
|
this->thermo_->correct();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasePhaseModel>
|
||||||
|
bool Foam::SolidThermalPhaseModel<BasePhaseModel>::isothermal() const
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasePhaseModel>
|
||||||
|
Foam::tmp<Foam::fvScalarMatrix>
|
||||||
|
Foam::SolidThermalPhaseModel<BasePhaseModel>::heEqn()
|
||||||
|
{
|
||||||
|
const volScalarField& alpha = *this;
|
||||||
|
const volScalarField& rho = this->rho();
|
||||||
|
|
||||||
|
volScalarField& he = this->thermo_->he();
|
||||||
|
|
||||||
|
tmp<fvScalarMatrix> tEEqn
|
||||||
|
(
|
||||||
|
fvm::ddt(alpha, rho, he)
|
||||||
|
+ this->divq(he)
|
||||||
|
==
|
||||||
|
alpha*this->Qdot()
|
||||||
|
);
|
||||||
|
|
||||||
|
return tEEqn;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,101 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Copyright (C) 2023 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::SolidThermalPhaseModel
|
||||||
|
|
||||||
|
Description
|
||||||
|
Class which represents a solid stationary phase for which the temperature
|
||||||
|
(strictly energy) varies. Returns the energy equation and corrects the
|
||||||
|
thermodynamic model.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
SolidThermalPhaseModel.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef SolidThermalPhaseModel_H
|
||||||
|
#define SolidThermalPhaseModel_H
|
||||||
|
|
||||||
|
#include "phaseModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class SolidThermalPhaseModel Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
template<class BasePhaseModel>
|
||||||
|
class SolidThermalPhaseModel
|
||||||
|
:
|
||||||
|
public BasePhaseModel
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
SolidThermalPhaseModel
|
||||||
|
(
|
||||||
|
const phaseSystem& fluid,
|
||||||
|
const word& phaseName,
|
||||||
|
const bool referencePhase,
|
||||||
|
const label index
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~SolidThermalPhaseModel();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Correct the thermodynamics
|
||||||
|
virtual void correctThermo();
|
||||||
|
|
||||||
|
//- Return whether the phase is isothermal
|
||||||
|
virtual bool isothermal() const;
|
||||||
|
|
||||||
|
//- Return the enthalpy equation
|
||||||
|
virtual tmp<fvScalarMatrix> heEqn();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
#include "SolidThermalPhaseModel.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -34,6 +34,7 @@ License
|
|||||||
#include "ThermoPhaseModel.H"
|
#include "ThermoPhaseModel.H"
|
||||||
#include "IsothermalPhaseModel.H"
|
#include "IsothermalPhaseModel.H"
|
||||||
#include "AnisothermalPhaseModel.H"
|
#include "AnisothermalPhaseModel.H"
|
||||||
|
#include "SolidThermalPhaseModel.H"
|
||||||
#include "PurePhaseModel.H"
|
#include "PurePhaseModel.H"
|
||||||
#include "MulticomponentPhaseModel.H"
|
#include "MulticomponentPhaseModel.H"
|
||||||
#include "InertPhaseModel.H"
|
#include "InertPhaseModel.H"
|
||||||
@ -74,7 +75,7 @@ namespace Foam
|
|||||||
);
|
);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
AnisothermalPhaseModel
|
SolidThermalPhaseModel
|
||||||
<
|
<
|
||||||
PurePhaseModel
|
PurePhaseModel
|
||||||
<
|
<
|
||||||
|
|||||||
Reference in New Issue
Block a user