Files
OpenFOAM-12/applications/modules/multiphaseEuler/interfacialModels/phaseTransferModels/phaseTransferModel/phaseTransferModel.C
Will Bainbridge 2dd82773fc multiphaseEuler: phaseTransferModels::reactionDriven: Permit transfers in both directions
The syntax of this model has changed to permit transfers of species in
either direction. A list of transferring species is now given for each
phase, rather than identifying a single reacting phase. For example:

    phaseTransfer
    (
        vapour_particles
        {
            type reactionDriven;

            // TiO2 and TiO2_s are created by reactions in the vapour
            // and are then transferred to the particles
            species.vapour (TiO2 TiO2_s);

            // H2O is created by reactions in the particles and is then
            // transferred to the vapour
            species.particles (H2O);
        }
    );
2024-03-05 11:28:06 +00:00

166 lines
4.1 KiB
C++

/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2018-2024 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 "phaseTransferModel.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(phaseTransferModel, 0);
defineBlendedInterfacialModelTypeNameAndDebug(phaseTransferModel, 0);
defineRunTimeSelectionTable(phaseTransferModel, dictionary);
}
const Foam::dimensionSet Foam::phaseTransferModel::dimDmdt =
Foam::dimDensity/Foam::dimTime;
const Foam::dimensionSet Foam::phaseTransferModel::dimD2mdtdp =
Foam::dimDensity/Foam::dimTime/Foam::dimPressure;
const Foam::hashedWordList Foam::phaseTransferModel::noSpecies_ =
Foam::hashedWordList();
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::phaseTransferModel::phaseTransferModel
(
const dictionary& dict,
const phaseInterface& interface
)
:
regIOobject
(
IOobject
(
IOobject::groupName(typeName, interface.name()),
interface.mesh().time().name(),
interface.mesh()
)
)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::phaseTransferModel::~phaseTransferModel()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool Foam::phaseTransferModel::mixture() const
{
return false;
}
Foam::tmp<Foam::volScalarField> Foam::phaseTransferModel::dmdtf() const
{
return tmp<volScalarField>(nullptr);
}
Foam::tmp<Foam::volScalarField> Foam::phaseTransferModel::d2mdtdpf() const
{
return tmp<volScalarField>(nullptr);
}
const Foam::hashedWordList& Foam::phaseTransferModel::species() const
{
return noSpecies_;
}
Foam::HashPtrTable<Foam::volScalarField>
Foam::phaseTransferModel::dmidtf() const
{
return HashPtrTable<volScalarField>();
}
bool Foam::phaseTransferModel::writeData(Ostream& os) const
{
return os.good();
}
bool Foam::blendedPhaseTransferModel::mixture() const
{
return evaluate(&phaseTransferModel::mixture);
}
Foam::tmp<Foam::volScalarField>
Foam::blendedPhaseTransferModel::dmdtf() const
{
return
evaluate
(
&phaseTransferModel::dmdtf,
"dmdtf",
phaseTransferModel::dimDmdt,
false
);
}
Foam::tmp<Foam::volScalarField>
Foam::blendedPhaseTransferModel::d2mdtdpf() const
{
return
evaluate
(
&phaseTransferModel::d2mdtdpf,
"d2mdtdpf",
phaseTransferModel::dimD2mdtdp,
false
);
}
Foam::hashedWordList Foam::blendedPhaseTransferModel::species() const
{
return evaluate(&phaseTransferModel::species);
}
Foam::HashPtrTable<Foam::volScalarField>
Foam::blendedPhaseTransferModel::dmidtf() const
{
return
evaluate
(
&phaseTransferModel::dmidtf,
"dmidtf",
phaseTransferModel::dimDmdt,
false
);
}
// ************************************************************************* //