noBlending.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) 2014 OpenFOAM Foundation
9 Copyright (C) 2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27\*---------------------------------------------------------------------------*/
28
29#include "noBlending.H"
31
32// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33
34namespace Foam
35{
36namespace blendingMethods
37{
39
41 (
42 blendingMethod,
44 dictionary
45 );
46}
47}
48
49// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
50
52(
53 const dictionary& dict,
54 const wordList& phaseNames
55)
56:
57 blendingMethod(dict),
58 continuousPhase_(dict.get<word>("continuousPhase"))
59{}
60
61
62// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
63
65{}
66
67
68// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
69
71(
72 const phaseModel& phase1,
73 const phaseModel& phase2
74) const
75{
76 const fvMesh& mesh(phase1.mesh());
77
78 return
79 tmp<volScalarField>
80 (
82 (
83 IOobject
84 (
85 "f",
86 mesh.time().timeName(),
87 mesh
88 ),
89 mesh,
91 (
92 "f",
93 dimless,
94 phase2.name() != continuousPhase_
95 )
96 )
97 );
98}
99
100
102(
103 const phaseModel& phase1,
104 const phaseModel& phase2
105) const
106{
107 const fvMesh& mesh(phase1.mesh());
108
109 return
110 tmp<volScalarField>
111 (
113 (
114 IOobject
115 (
116 "f",
117 mesh.time().timeName(),
118 mesh
119 ),
120 mesh,
122 (
123 "f",
124 dimless,
125 phase1.name() == continuousPhase_
126 )
127 )
128 );
129}
130
131
132// ************************************************************************* //
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
phaseModel & phase1
phaseModel & phase2
virtual tmp< volScalarField > f1(const phaseModel &phase1, const phaseModel &phase2) const
Factor for primary phase.
Definition: noBlending.C:71
tmp< volScalarField > f2() const
Definition: LienCubicKE.C:60
A class for managing temporary objects.
Definition: tmp.H:65
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Definition: className.H:121
dynamicFvMesh & mesh
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
Namespace for OpenFOAM.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionSet dimless
Dimensionless.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:82
dictionary dict