temperaturePhaseChangeTwoPhaseMixture.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2016-2020 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
29 
30 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
34  defineTypeNameAndDebug(temperaturePhaseChangeTwoPhaseMixture, 0);
36  (
37  temperaturePhaseChangeTwoPhaseMixture,
38  components
39  );
40 }
41 
42 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
43 
46 (
47  const thermoIncompressibleTwoPhaseMixture& mixture,
48  const fvMesh& mesh
49 )
50 :
51  IOdictionary
52  (
53  IOobject
54  (
55  "phaseChangeProperties",
56  mesh.time().constant(),
57  mesh,
58  IOobject::MUST_READ_IF_MODIFIED,
59  IOobject::NO_WRITE
60  )
61  ),
62  mixture_(mixture),
63  mesh_(mesh)
64 {}
65 
66 
67 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
68 
71 {
72  volScalarField alphalCoeff
73  (
74  1.0/mixture_.rho1() - mixture_.alpha1()
75  *(1.0/mixture_.rho1() - 1.0/mixture_.rho2())
76  );
77 
78  Pair<tmp<volScalarField>> mDotAlphal = this->mDotAlphal();
79 
80  return Pair<tmp<volScalarField>>
81  (
82  alphalCoeff*mDotAlphal[0],
83  alphalCoeff*mDotAlphal[1]
84  );
85 }
86 
87 
90 {
91  dimensionedScalar pCoeff(1.0/mixture_.rho1() - 1.0/mixture_.rho2());
92  Pair<tmp<volScalarField>> mDot = this->mDot();
93 
94  return Pair<tmp<volScalarField>>(pCoeff*mDot[0], pCoeff*mDot[1]);
95 }
96 
97 
99 {
100  if (regIOobject::read())
101  {
102  return true;
103  }
104 
105  return false;
106 }
107 
108 
109 // ************************************************************************* //
Foam::incompressibleTwoPhaseMixture::rho1
const dimensionedScalar & rho1() const
Return const-access to phase1 density.
Definition: incompressibleTwoPhaseMixture.H:117
Foam::temperaturePhaseChangeTwoPhaseMixture::mixture_
const thermoIncompressibleTwoPhaseMixture & mixture_
Reference to the thermoIncompressibleTwoPhaseMixture.
Definition: temperaturePhaseChangeTwoPhaseMixture.H:65
Foam::temperaturePhaseChangeTwoPhaseMixture::vDotAlphal
virtual Pair< tmp< volScalarField > > vDotAlphal() const
Return the volumetric condensation and vaporisation rates as a.
Foam::defineRunTimeSelectionTable
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
Foam::temperaturePhaseChangeTwoPhaseMixture::vDot
virtual Pair< tmp< volScalarField > > vDot() const
Return the volumetric condensation and vaporisation rates as.
Foam::regIOobject::read
virtual bool read()
Read object.
Definition: regIOobjectRead.C:191
Foam::incompressibleTwoPhaseMixture::rho2
const dimensionedScalar & rho2() const
Return const-access to phase2 density.
Definition: incompressibleTwoPhaseMixture.H:123
Foam::temperaturePhaseChangeTwoPhaseMixture::mDotAlphal
virtual Pair< tmp< volScalarField > > mDotAlphal() const =0
Return the mass condensation and vaporisation rates as a.
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:42
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
Foam::temperaturePhaseChangeTwoPhaseMixture::temperaturePhaseChangeTwoPhaseMixture
temperaturePhaseChangeTwoPhaseMixture(const temperaturePhaseChangeTwoPhaseMixture &)=delete
No copy construct.
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::twoPhaseMixture::alpha1
const volScalarField & alpha1() const
Return the phase-fraction of phase 1.
Definition: twoPhaseMixture.H:93
temperaturePhaseChangeTwoPhaseMixture.H
Foam::Pair
An ordered pair of two objects of type <T> with first() and second() elements.
Definition: Pair.H:54
constant
constant condensation/saturation model.
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
mixture
Info<< "Creating temperaturePhaseChangeTwoPhaseMixture\n"<< endl;autoPtr< temperaturePhaseChangeTwoPhaseMixture > mixture
Definition: createFields.H:39
Foam::temperaturePhaseChangeTwoPhaseMixture::read
virtual bool read()
Read the transportProperties dictionary and update.