sidedPhaseInterface.H
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-2025 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 Class
25  Foam::sidedPhaseInterface
26 
27 Description
28  Class to represent a certain side of an interface between phases.
29 
30 SourceFiles
31  sidedPhaseInterface.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef sidedPhaseInterface_H
36 #define sidedPhaseInterface_H
37 
38 #include "phaseInterface.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class sidedPhaseInterface Declaration
47 \*---------------------------------------------------------------------------*/
48 
50 :
51  virtual public phaseInterface
52 {
53 private:
54 
55  // Private Data
56 
57  //- Phase
58  const phaseModel& phase_;
59 
60 
61 protected:
62 
63  // Protected Member Functions
64 
65  //- Return true if the phase interfaces are the same
66  virtual bool same(const phaseInterface& interface, bool strict) const;
67 
68 
69 public:
70 
71  //- Runtime type information
72  TypeName("sidedPhaseInterface");
73 
74 
75  // Constructors
76 
77  //- Construct from phases
79  (
80  const phaseModel& phase,
81  const phaseModel& otherPhase
82  );
83 
84  //- Construct from fluid and name
86  (
87  const phaseSystem& fluid,
88  const word& name
89  );
90 
91 
92  //- Destructor
93  virtual ~sidedPhaseInterface();
94 
95 
96  // Static Member Functions
97 
98  //- Return the separator that delimits this interface's name
99  static word separator()
100  {
101  return "inThe";
102  }
103 
104 
105  // Member Functions
106 
107  //- Name
108  virtual word name() const;
109 
110 
111  // Access
112 
113  //- Phase on the this side of the interface
114  const phaseModel& phase() const;
115 
116  //- Phase on the other side of the interface
117  const phaseModel& otherPhase() const;
118 
119  //- Interface on the other side of the interface
121 };
122 
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 } // End namespace Foam
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 #endif
131 
132 // ************************************************************************* //
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Class to represent an interface between phases. Derivations can further specify the configuration of ...
const phaseSystem & fluid() const
Return the phase system.
Class to represent a system of phases.
Definition: phaseSystem.H:74
Class to represent a certain side of an interface between phases.
static word separator()
Return the separator that delimits this interface's name.
TypeName("sidedPhaseInterface")
Runtime type information.
virtual ~sidedPhaseInterface()
Destructor.
virtual word name() const
Name.
const phaseModel & otherPhase() const
Phase on the other side of the interface.
autoPtr< phaseInterface > otherInterface() const
Interface on the other side of the interface.
virtual bool same(const phaseInterface &interface, bool strict) const
Return true if the phase interfaces are the same.
const phaseModel & phase() const
Phase on the this side of the interface.
sidedPhaseInterface(const phaseModel &phase, const phaseModel &otherPhase)
Construct from phases.
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.