MRFnoSlipFvPatchVectorField.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) 2022-2023 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 
27 #include "volFields.H"
29 
30 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
31 
32 Foam::MRFnoSlipFvPatchVectorField::MRFnoSlipFvPatchVectorField
33 (
34  const fvPatch& p,
35  const DimensionedField<vector, volMesh>& iF,
36  const dictionary& dict
37 )
38 :
39  fixedValueFvPatchVectorField(p, iF, dict, false),
40  MRFPatchField(dict)
41 {
42  if (dict.found("value"))
43  {
45  (
46  vectorField("value", dict, p.size())
47  );
48  }
49  else
50  {
52  }
53 }
54 
55 
56 Foam::MRFnoSlipFvPatchVectorField::MRFnoSlipFvPatchVectorField
57 (
58  const MRFnoSlipFvPatchVectorField& pvf,
59  const fvPatch& p,
60  const DimensionedField<vector, volMesh>& iF,
61  const fvPatchFieldMapper& mapper
62 )
63 :
64  fixedValueFvPatchVectorField(pvf, p, iF, mapper),
65  MRFPatchField(pvf)
66 {}
67 
68 
69 Foam::MRFnoSlipFvPatchVectorField::MRFnoSlipFvPatchVectorField
70 (
71  const MRFnoSlipFvPatchVectorField& pvf,
72  const DimensionedField<vector, volMesh>& iF
73 )
74 :
75  fixedValueFvPatchVectorField(pvf, iF),
76  MRFPatchField(pvf)
77 {}
78 
79 
80 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
81 
82 void Foam::MRFnoSlipFvPatchVectorField::updateCoeffs()
83 {
84  if (updated())
85  {
86  return;
87  }
88 
90  makeAbsolute(*this);
91 
92  fixedValueFvPatchVectorField::updateCoeffs();
93 }
94 
95 
96 void Foam::MRFnoSlipFvPatchVectorField::write(Ostream& os) const
97 {
100  writeEntry(os, "value", *this);
101 }
102 
103 
104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
105 
106 namespace Foam
107 {
109  (
112  );
113 }
114 
115 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
void size(const label)
Override size to be inconsistent with allocated storage.
Definition: ListI.H:164
void write(Ostream &) const
Definition: MRFPatchField.C:99
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
Definition: dictionary.C:659
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:87
virtual void write(Ostream &) const
Write.
Definition: fvPatchField.C:231
friend Ostream & operator(Ostream &, const fvPatchField< Type > &)
virtual void operator=(const UList< Type > &)
Definition: fvPatchField.C:251
void makeAbsolute(surfaceScalarField &phi, const volVectorField &U)
Make the given flux absolute.
Definition: fvcMeshPhi.C:128
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
Namespace for OpenFOAM.
static const zero Zero
Definition: zero.H:97
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
Definition: HashTableIO.C:96
Field< vector > vectorField
Specialisation of Field<T> for vector.
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
dictionary dict
volScalarField & p