ENH: interfaceCompositionModel: refactor Tactivate and includeDivU funcs

This commit is contained in:
Kutalmis Bercin
2021-09-10 09:02:27 +01:00
committed by Andrew Heather
parent 142fc55f44
commit 6580f1bbef
8 changed files with 34 additions and 67 deletions

View File

@ -131,7 +131,7 @@ const Foam::word& Foam::interfaceCompositionModel::variable() const
}
bool Foam::interfaceCompositionModel::includeDivU()
bool Foam::interfaceCompositionModel::includeDivU() const noexcept
{
return true;
}

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017-2020 OpenCFD Ltd.
Copyright (C) 2017-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -195,11 +195,11 @@ public:
) = 0;
//- Reference value
virtual const dimensionedScalar& Tactivate() const = 0;
virtual const dimensionedScalar& Tactivate() const noexcept = 0;
//- Add/subtract alpha*div(U) as a source term
//- for alpha, substituting div(U) = mDot(1/rho1 - 1/rho2)
virtual bool includeDivU();
virtual bool includeDivU() const noexcept;
//- Add volume change in pEq
bool includeVolChange();

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017-2020 OpenCFD Ltd.
Copyright (C) 2017-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -170,20 +170,4 @@ Foam::meltingEvaporationModels::Lee<Thermo, OtherThermo>::KSu
}
template<class Thermo, class OtherThermo>
const Foam::dimensionedScalar&
Foam::meltingEvaporationModels::Lee<Thermo, OtherThermo>::Tactivate() const
{
return Tactivate_;
}
template<class Thermo, class OtherThermo>
bool
Foam::meltingEvaporationModels::Lee<Thermo, OtherThermo>::includeDivU()
{
return true;
}
// ************************************************************************* //

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017-2020 OpenCFD Ltd.
Copyright (C) 2017-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -165,11 +165,17 @@ public:
);
//- Return T transition between phases
virtual const dimensionedScalar& Tactivate() const;
virtual const dimensionedScalar& Tactivate() const noexcept
{
return Tactivate_;
}
//- Add/subtract alpha*div(U) as a source term
//- for alpha, substituting div(U) = mDot(1/rho1 - 1/rho2)
virtual bool includeDivU();
virtual bool includeDivU() const noexcept
{
return true;
}
};

View File

@ -5,8 +5,8 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2020 OpenCFD Ltd.
Copyright (C) 2020 Henning Scheufler
Copyright (C) 2020-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -316,22 +316,4 @@ Foam::meltingEvaporationModels::interfaceHeatResistance<Thermo, OtherThermo>
}
template<class Thermo, class OtherThermo>
const Foam::dimensionedScalar&
Foam::meltingEvaporationModels::interfaceHeatResistance<Thermo, OtherThermo>
::Tactivate() const
{
return Tactivate_;
}
template<class Thermo, class OtherThermo>
bool
Foam::meltingEvaporationModels::
interfaceHeatResistance<Thermo, OtherThermo>::includeDivU()
{
return true;
}
// ************************************************************************* //

View File

@ -5,8 +5,8 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2020 OpenCFD Ltd.
Copyright (C) 2020 Henning Scheufler
Copyright (C) 2020-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -171,11 +171,17 @@ public:
);
//- Return Tactivate
virtual const dimensionedScalar& Tactivate() const;
virtual const dimensionedScalar& Tactivate() const noexcept
{
return Tactivate_;
}
//- Add/subtract alpha*div(U) as a source term
//- for alpha, substituting div(U) = mDot(1/rho1 - 1/rho2)
virtual bool includeDivU();
virtual bool includeDivU() const noexcept
{
return true;
}
};

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017-2020 OpenCFD Ltd.
Copyright (C) 2017-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -319,21 +319,4 @@ Foam::meltingEvaporationModels::kineticGasEvaporation<Thermo, OtherThermo>::KSu
}
template<class Thermo, class OtherThermo>
const Foam::dimensionedScalar&
Foam::meltingEvaporationModels::kineticGasEvaporation<Thermo, OtherThermo>
::Tactivate() const
{
return Tactivate_;
}
template<class Thermo, class OtherThermo>
bool
Foam::meltingEvaporationModels::
kineticGasEvaporation<Thermo, OtherThermo>::includeDivU()
{
return true;
}
// ************************************************************************* //

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017-2020 OpenCFD Ltd.
Copyright (C) 2017-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -210,11 +210,17 @@ public:
);
//- Return Tactivate
virtual const dimensionedScalar& Tactivate() const;
virtual const dimensionedScalar& Tactivate() const noexcept
{
return Tactivate_;
}
//- Add/subtract alpha*div(U) as a source term
//- for alpha, substituting div(U) = mDot(1/rho1 - 1/rho2)
virtual bool includeDivU();
virtual bool includeDivU() const noexcept
{
return true;
}
};