noPhaseChange.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2021 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "noPhaseChange.H"
27 #include "fvScalarMatrix.H"
29 
30 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
34 namespace twoPhaseChangeModels
35 {
36  defineTypeNameAndDebug(noPhaseChange, 0);
37  addToRunTimeSelectionTable(twoPhaseChangeModel, noPhaseChange, dictionary);
38 }
39 }
40 
41 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
42 
44 (
45  const compressibleTwoPhaseMixture& mixture
46 )
47 :
48  twoPhaseChangeModel(typeName, mixture)
49 {}
50 
51 
52 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
53 
56 {
57  return Pair<tmp<volScalarField>>
58  (
61  );
62 }
63 
64 
67 {
68  return Pair<tmp<volScalarField>>
69  (
72  );
73 }
74 
75 
78 (
80 ) const
81 {
82  return Pair<tmp<volScalarField::Internal>>
83  (
84  tmp<volScalarField::Internal>(nullptr),
85  tmp<volScalarField::Internal>(nullptr)
86  );
87 }
88 
89 
92 (
93  const volScalarField& rho,
94  const volScalarField& gh,
96 ) const
97 {
98  return tmp<fvScalarMatrix>(new fvScalarMatrix(p_rgh, dimVolume/dimTime));
99 }
100 
101 
104 (
105  const volScalarField& rho,
106  const surfaceScalarField& rhoPhi,
108 ) const
109 {
110  return tmp<fvVectorMatrix>
111  (
113  );
114 }
115 
116 
118 {
120 }
121 
122 
124 {
125  return twoPhaseChangeModel::read();
126 }
127 
128 
129 // ************************************************************************* //
volScalarField & p_rgh
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:42
defineTypeNameAndDebug(cavitationModel, 0)
virtual Pair< tmp< volScalarField::Internal > > Salpha(volScalarField &) const
Return unallocated explicit and implicit sources.
Definition: noPhaseChange.C:78
U
Definition: pEqn.H:72
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:59
Macros for easy insertion into run-time selection tables.
virtual Pair< tmp< volScalarField > > mDotAlphal() const
Return the mass condensation and vaporisation rates as a.
Definition: noPhaseChange.C:55
virtual Pair< tmp< volScalarField > > mDotP() const
Return the mass condensation and vaporisation rates as coefficients.
Definition: noPhaseChange.C:66
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:58
const dimensionSet dimTime
An ordered pair of two objects of type <T> with first() and second() elements.
Definition: contiguous.H:49
virtual void correct()=0
Correct the phaseChange model.
virtual bool read()=0
Read the phaseProperties dictionary and update.
noPhaseChange(const immiscibleIncompressibleTwoPhaseMixture &mixture)
Construct for mixture.
Definition: noPhaseChange.C:44
const dimensionSet dimVelocity
addToRunTimeSelectionTable(cavitationModel, Kunz, dictionary)
virtual tmp< fvScalarMatrix > Sp_rgh(const volScalarField &rho, const volScalarField &gh, volScalarField &p_rgh) const
Return the zero source matrix.
Definition: noPhaseChange.C:92
const dimensionSet dimMass
static const GeometricField< scalar, fvPatchField, volMesh > & null()
Return a null geometric field.
A scalar instance of fvMatrix.
virtual void correct()
Correct the noPhaseChange phaseChange model.
rhoPhi
Definition: rhoEqn.H:10
fvMatrix< vector > fvVectorMatrix
Definition: fvMatricesFwd.H:45
const dimensionSet dimVolume
const volScalarField & gh
A class for managing temporary objects.
Definition: PtrList.H:53
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
virtual tmp< fvVectorMatrix > SU(const volScalarField &rho, const surfaceScalarField &rhoPhi, volVectorField &U) const
Return the zero source matrix for the momentum equation.
virtual bool read()
Read the phaseProperties dictionary and update.
Namespace for OpenFOAM.