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 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "noBlending.H"
30 
31 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35 namespace blendingMethods
36 {
38 
40  (
41  blendingMethod,
42  noBlending,
43  dictionary
44  );
45 }
46 }
47 
48 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
49 
51 (
52  const dictionary& dict,
53  const wordList& phaseNames
54 )
55 :
57  continuousPhase_(dict.lookup("continuousPhase"))
58 {}
59 
60 
61 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
62 
64 {}
65 
66 
67 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
68 
70 (
71  const phaseModel& phase1,
72  const phaseModel& phase2
73 ) const
74 {
75  const fvMesh& mesh(phase1.mesh());
76 
77  return volScalarField::New
78  (
79  "f",
80  mesh,
81  dimensionedScalar("one", dimless, phase2.name() == continuousPhase_)
82  );
83 }
84 
85 
87 (
88  const phaseModel& phase1,
89  const phaseModel& phase2
90 ) const
91 {
92  const fvMesh& mesh(phase1.mesh());
93 
94  return volScalarField::New
95  (
96  "f",
97  mesh,
98  dimensionedScalar("one", dimless, phase1.name() == continuousPhase_)
99  );
100 }
101 
102 
103 // ************************************************************************* //
Foam::blendingMethods::noBlending::noBlending
noBlending(const dictionary &dict, const wordList &phaseNames)
Construct from a dictionary and two phases.
Definition: noBlending.C:51
Foam::phaseModel
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:57
Foam::dimless
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Dimensionless.
Definition: dimensionSets.H:50
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:59
Foam::blendingMethods::noBlending::f1
virtual tmp< volScalarField > f1(const phaseModel &phase1, const phaseModel &phase2) const
Factor for primary phase.
Definition: noBlending.C:70
Foam::blendingMethods::noBlending::~noBlending
~noBlending()
Destructor.
Definition: noBlending.C:63
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
noBlending.H
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:43
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:121
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:84
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::blendingMethod
Definition: blendingMethod.H:51
Foam::List< word >
Foam::blendingMethods::defineTypeNameAndDebug
defineTypeNameAndDebug(hyperbolic, 0)
noBlending
Foam::blendingMethods::noBlending::f2
virtual tmp< volScalarField > f2(const phaseModel &phase1, const phaseModel &phase2) const
Factor for secondary phase.
Definition: noBlending.C:87
Foam::blendingMethods::addToRunTimeSelectionTable
addToRunTimeSelectionTable(blendingMethod, hyperbolic, dictionary)
phase1
phaseModel & phase1
Definition: setRegionFluidFields.H:5