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 -------------------------------------------------------------------------------
11 License
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 
34 namespace Foam
35 {
36 namespace blendingMethods
37 {
39 
41  (
42  blendingMethod,
43  noBlending,
44  dictionary
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 * * * * * * * * * * * * * * * //
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 volScalarField::New
79  (
80  "f",
81  mesh,
82  dimensionedScalar("one", dimless, phase2.name() == continuousPhase_)
83  );
84 }
85 
86 
88 (
89  const phaseModel& phase1,
90  const phaseModel& phase2
91 ) const
92 {
93  const fvMesh& mesh(phase1.mesh());
94 
95  return volScalarField::New
96  (
97  "f",
98  mesh,
99  dimensionedScalar("one", dimless, phase1.name() == continuousPhase_)
100  );
101 }
102 
103 
104 // ************************************************************************* //
Foam::blendingMethods::noBlending::noBlending
noBlending(const dictionary &dict, const wordList &phaseNames)
Construct from a dictionary and two phases.
Definition: noBlending.C:52
Foam::phaseModel
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:54
Foam::blendingMethods::addToRunTimeSelectionTable
addToRunTimeSelectionTable(blendingMethod, hyperbolic, dictionary)
Foam::blendingMethods::defineTypeNameAndDebug
defineTypeNameAndDebug(hyperbolic, 0)
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::blendingMethods::noBlending::f1
virtual tmp< volScalarField > f1(const phaseModel &phase1, const phaseModel &phase2) const
Factor for primary phase.
Definition: noBlending.C:71
noBlending.H
Foam::blendingMethods::noBlending::~noBlending
~noBlending()
Destructor.
Definition: noBlending.C:64
Foam::GeometricField< scalar, fvPatchField, volMesh >::New
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, const Mesh &mesh, const dimensionSet &ds, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
Return tmp field from name, mesh, dimensions and patch type.
Definition: GeometricFieldNew.C:34
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:42
dict
dictionary dict
Definition: searchingEngine.H:14
phase2
phaseModel & phase2
Definition: setRegionFluidFields.H:6
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::blendingMethod
Definition: blendingMethod.H:52
Foam::List< word >
noBlending
Foam::blendingMethods::noBlending::f2
virtual tmp< volScalarField > f2(const phaseModel &phase1, const phaseModel &phase2) const
Factor for secondary phase.
Definition: noBlending.C:88
phase1
phaseModel & phase1
Definition: setRegionFluidFields.H:5
Foam::dimless
const dimensionSet dimless
Dimensionless.
Definition: dimensionSets.C:189