dispersedDisplacedSidedPhaseInterface.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-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 \*---------------------------------------------------------------------------*/
25 
31 
32 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33 
34 namespace Foam
35 {
37  (
39  separatorsToTypeName
40  ({
44  }).c_str(),
45  0
46  );
48  (
51  word
52  );
53 }
54 
55 
56 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
57 
59 (
60  const phaseInterface& interface,
61  bool strict
62 ) const
63 {
64  return
65  (!strict || isType<dispersedDisplacedSidedPhaseInterface>(interface))
66  && dispersedPhaseInterface::same(interface, false)
67  && displacedPhaseInterface::same(interface, false)
68  && sidedPhaseInterface::same(interface, false);
69 }
70 
71 
72 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
73 
76 (
77  const phaseModel& dispersed,
78  const phaseModel& continuous,
79  const phaseModel& displacing,
80  const phaseModel& phase
81 )
82 :
83  phaseInterface(dispersed, continuous),
84  dispersedPhaseInterface(dispersed, continuous),
85  displacedPhaseInterface(dispersed, continuous, displacing),
86  sidedPhaseInterface(phase, phaseInterface::otherPhase(phase))
87 {}
88 
89 
92 (
93  const phaseSystem& fluid,
94  const word& name
95 )
96 :
97  phaseInterface(fluid, name),
100  sidedPhaseInterface(fluid, name)
101 {}
102 
103 
104 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
105 
108 {}
109 
110 
111 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
112 
114 {
115  return
117  + '_'
119  + '_'
120  + displacing().name()
121  + '_'
123  + '_'
124  + phase().name();
125 }
126 
127 
128 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
Class to represent a certain side of an interface between phases, where one phase is considered dispe...
virtual bool same(const phaseInterface &interface, bool strict) const
Return true if the phase interfaces are the same.
dispersedDisplacedSidedPhaseInterface(const phaseModel &dispersed, const phaseModel &continuous, const phaseModel &displacing, const phaseModel &phase)
Construct from phases.
Class to represent a interface between phases where one phase is considered dispersed within the othe...
static word separator()
Return the separator that delimits this interface's name.
virtual bool same(const phaseInterface &interface, bool strict) const
Return true if the phase interfaces are the same.
Class to represent an interface between phases which has been displaced to some extent by a third pha...
static word separator()
Return the separator that delimits this interface's name.
virtual bool same(const phaseInterface &interface, bool strict) const
Return true if the phase interfaces are the same.
Class to represent an interface between phases. Derivations can further specify the configuration of ...
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.
virtual bool same(const phaseInterface &interface, bool strict) const
Return true if the phase interfaces are the same.
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
defineTypeNameAndDebugWithName(dispersedDisplacedPhaseInterface, separatorsToTypeName({ dispersedPhaseInterface::separator(), displacedPhaseInterface::separator() }).c_str(), 0)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.