liquidPropertiesSurfaceTension.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) 2017-2023 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 
27 #include "liquidThermo.H"
28 #include "volFields.H"
30 
31 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35 namespace surfaceTensionModels
36 {
39  (
43  );
44 }
45 }
46 
47 
48 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
49 
51 (
52  const dictionary& dict,
53  const fvMesh& mesh
54 )
55 :
56  surfaceTensionModel(mesh),
57  phaseName_(dict.lookup("phase"))
58 {}
59 
60 
61 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
62 
64 {}
65 
66 
67 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
68 
71 {
72  return
73  mesh_.lookupObject<liquidThermo>
74  (
75  IOobject::groupName(physicalProperties::typeName, phaseName_)
76  ).sigma();
77 }
78 
79 
81 (
82  const dictionary& dict
83 )
84 {
85  return true;
86 }
87 
88 
90 (
91  Ostream& os
92 ) const
93 {
95  {
96  return os.good();
97  }
98  else
99  {
100  return false;
101  }
102 }
103 
104 
105 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
static word groupName(Name name, const word &group)
bool good() const
Return true if next operation might succeed.
Definition: IOstream.H:330
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:99
Base-class for liquid thermodynamic properties.
Definition: liquidThermo.H:55
Abstract base-class for surface tension models which return the surface tension coefficient field.
virtual bool writeData(Ostream &os) const =0
Write in dictionary format.
Temperature-dependent surface tension model in which the surface tension function provided by the pha...
liquidProperties(const dictionary &dict, const fvMesh &mesh)
Construct from dictionary and mesh.
virtual bool writeData(Ostream &os) const
Write in dictionary format.
virtual bool readDict(const dictionary &dict)
Update surface tension coefficient from given dictionary.
virtual tmp< volScalarField > sigma() const
Surface tension coefficient.
A class for managing temporary objects.
Definition: tmp.H:55
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m^2/K^4].
addToRunTimeSelectionTable(surfaceTensionModel, liquidProperties, dictionary)
defineTypeNameAndDebug(liquidProperties, 0)
Namespace for OpenFOAM.
dictionary dict