Loading...
Searching...
No Matches
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-2018 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"
32// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
34namespace Foam
35{
36namespace blendingMethods
37{
39
41 (
45 );
46}
47}
48
49// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
50
52(
53 const dictionary& dict,
54 const wordList& phaseNames
55)
56:
58 continuousPhase_(dict.get<word>("continuousPhase"))
59{}
60
61
62// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
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
79 (
80 "f",
83 scalar(phase2.name() == continuousPhase_), // value 0/1
85 );
86}
87
88
90(
91 const phaseModel& phase1,
92 const phaseModel& phase2
93) const
94{
95 const fvMesh& mesh = phase1.mesh();
96
98 (
99 "f",
101 mesh,
102 scalar(phase1.name() == continuousPhase_), // value 0/1
103 dimless
104 );
105}
106
107
108// ************************************************************************* //
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
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
@ NO_REGISTER
Do not request registration (bool: false).
blendingMethod(const dictionary &dict)
Construct from a dictionary.
virtual tmp< volScalarField > f2(const phaseModel &phase1, const phaseModel &phase2) const
Factor for secondary phase.
Definition noBlending.C:83
virtual tmp< volScalarField > f1(const phaseModel &phase1, const phaseModel &phase2) const
Factor for primary phase.
Definition noBlending.C:64
noBlending(const dictionary &dict, const wordList &phaseNames)
Construct from a dictionary and two phases.
Definition noBlending.C:45
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition phaseModel.H:56
A class for managing temporary objects.
Definition tmp.H:75
A class for handling words, derived from Foam::string.
Definition word.H:66
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Definition className.H:142
dynamicFvMesh & mesh
Namespace for OpenFOAM.
List< word > wordList
List of word.
Definition fileName.H:60
const dimensionSet dimless
Dimensionless.
dictionary dict