PDRparams.H
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) 2016 Shell Research Ltd.
9  Copyright (C) 2018-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 Class
28  Foam::PDRparams
29 
30 Description
31  Parameters for PDRsetFields
32 
33 SourceFiles
34  PDRparams.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef PDRparams_H
39 #define PDRparams_H
40 
41 #include "labelList.H"
42 #include "scalarList.H"
43 #include "wordList.H"
44 #include "fileNameList.H"
45 #include "dictionary.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class PDRparams Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 class PDRparams
57 {
58 public:
59 
60  // Data Members
61 
64  word timeName;
65 
66  //- The name for the "ground" patch
68 
69  //- The name for the "outer" patch
71 
72  string UPatchBc;
73 
74  bool legacyMeshSpec{false};
75  bool legacyObsSpec{false};
76 
77  bool two_d{false};
78  bool yCyclic{false};
79  bool ySymmetry{false};
80  bool deluge{false};
81  bool new_fields{true};
82  bool noIntersectN{true};
83  bool blockedFacesWallFn{false};
84  bool ignoreGratings{false};
85  bool outer_orthog{false};
86 
87  int debugLevel{0};
88 
89  //- Min number of blocked cell faces
90  //- for a cell to be marked as blocked
91  int nFacesToBlockC{6};
92 
93  //- Min number of blocked cell face pairs (on opposite faces of a cell)
94  //- for a cell to be marked as blocked
95  int nPairsToBlockC{3};
96 
97  //- Flag to control which overlap calculations are performed
98  int overlaps{0x7};
99 
100  scalar gridPointTol{0.02};
101 
102  scalar cb_r{0.035};
103  scalar cb_s{0.08};
104 
105  scalar cd_r{1.2};
106  scalar cd_s{2.0};
107 
108  scalar cong_max_betav{1.0};
109 
110  scalar min_overlap_vol{0};
111  scalar min_overlap_area{0};
112 
113  //- Ignore obstacles with second dimension (or diameter) less than this
114  scalar min_width{0.001};
115 
116  //- Lobs in empty cell is this * cube root of cell volume
117  scalar empty_lobs_fac{1.0};
118 
119  //- Value for outer region
120  scalar outerCombFac{1.0};
121 
122  scalar obs_expand{0};
123 
124  //- Default slat thickness grating
125  scalar def_grating_slat_w{0.005};
126 
127  //- Cells with porosity less than this are blocked
128  scalar blockedCellPoros{0.05};
129 
130  //- Faces with area blockage greater than this are blocked
131  scalar blockedFacePar{0.95};
132 
133  //- Upper limit on CR (CT also gets limited)
134  scalar maxCR{1e30};
135 
136  //- If a single obstacle blocks a cell by more than this,
137  //- then no CT in that direction
138  scalar blockageNoCT{0.95};
139 
140  //- Overall scale factor
141  scalar scale{1.0};
142 
143 
144  // Constructors
145 
146  //- Default construct
147  PDRparams() = default;
148 
149 
150  // Member Functions
151 
152  //- Set or read defaults from dictionary.
153  // Can also be used with an empty dictionary
154  void readDefaults(const dictionary& dict);
155 
156  //- Read program parameters from dictionary
157  void read(const dictionary& dict);
158 };
159 
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 extern Foam::PDRparams pars;
164 
165 } // End namespace Foam
166 
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 #endif
171 
172 // ************************************************************************* //
Foam::PDRparams::nFacesToBlockC
int nFacesToBlockC
Definition: PDRparams.H:90
Foam::PDRparams::scale
scalar scale
Overall scale factor.
Definition: PDRparams.H:140
Foam::PDRparams::timeName
word timeName
Definition: PDRparams.H:63
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::fileName
A class for handling file names.
Definition: fileName.H:69
Foam::PDRparams::empty_lobs_fac
scalar empty_lobs_fac
Lobs in empty cell is this * cube root of cell volume.
Definition: PDRparams.H:116
Foam::PDRparams::readDefaults
void readDefaults(const dictionary &dict)
Set or read defaults from dictionary.
Foam::PDRparams::noIntersectN
bool noIntersectN
Definition: PDRparams.H:81
Foam::pars
Foam::PDRparams pars
Globals for program parameters (ugly hack)
Foam::PDRparams
Parameters for PDRsetFields.
Definition: PDRparams.H:55
Foam::PDRparams::two_d
bool two_d
Definition: PDRparams.H:76
Foam::PDRparams::blockedCellPoros
scalar blockedCellPoros
Cells with porosity less than this are blocked.
Definition: PDRparams.H:127
Foam::PDRparams::legacyObsSpec
bool legacyObsSpec
Definition: PDRparams.H:74
Foam::PDRparams::deluge
bool deluge
Definition: PDRparams.H:79
Foam::PDRparams::outerPatchName
word outerPatchName
The name for the "outer" patch.
Definition: PDRparams.H:69
Foam::PDRparams::cb_r
scalar cb_r
Definition: PDRparams.H:101
Foam::PDRparams::blockedFacePar
scalar blockedFacePar
Faces with area blockage greater than this are blocked.
Definition: PDRparams.H:130
Foam::PDRparams::cd_r
scalar cd_r
Definition: PDRparams.H:104
wordList.H
scalarList.H
Foam::PDRparams::groundPatchName
word groundPatchName
The name for the "ground" patch.
Definition: PDRparams.H:66
Foam::PDRparams::read
void read(const dictionary &dict)
Read program parameters from dictionary.
Foam::PDRparams::nPairsToBlockC
int nPairsToBlockC
Definition: PDRparams.H:94
Foam::PDRparams::cb_s
scalar cb_s
Definition: PDRparams.H:102
Foam::PDRparams::legacyMeshSpec
bool legacyMeshSpec
Definition: PDRparams.H:73
Foam::PDRparams::ySymmetry
bool ySymmetry
Definition: PDRparams.H:78
labelList.H
Foam::PDRparams::cd_s
scalar cd_s
Definition: PDRparams.H:105
Foam::PDRparams::obs_expand
scalar obs_expand
Definition: PDRparams.H:121
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::PDRparams::min_width
scalar min_width
Ignore obstacles with second dimension (or diameter) less than this.
Definition: PDRparams.H:113
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam::PDRparams::blockedFacesWallFn
bool blockedFacesWallFn
Definition: PDRparams.H:82
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::PDRparams::gridPointTol
scalar gridPointTol
Definition: PDRparams.H:99
Foam::PDRparams::maxCR
scalar maxCR
Upper limit on CR (CT also gets limited)
Definition: PDRparams.H:133
Foam::PDRparams::yCyclic
bool yCyclic
Definition: PDRparams.H:77
Foam::PDRparams::obsfile_dir
fileName obsfile_dir
Definition: PDRparams.H:61
Foam::PDRparams::outerCombFac
scalar outerCombFac
Value for outer region.
Definition: PDRparams.H:119
fileNameList.H
Foam::PDRparams::overlaps
int overlaps
Flag to control which overlap calculations are performed.
Definition: PDRparams.H:97
Foam::PDRparams::obsfile_names
wordList obsfile_names
Definition: PDRparams.H:62
Foam::PDRparams::UPatchBc
string UPatchBc
"fixedValue;value uniform (0 0 0)"
Definition: PDRparams.H:71
Foam::List< word >
Foam::PDRparams::min_overlap_vol
scalar min_overlap_vol
Definition: PDRparams.H:109
dictionary.H
Foam::PDRparams::debugLevel
int debugLevel
Definition: PDRparams.H:86
Foam::PDRparams::PDRparams
PDRparams()=default
Default construct.
Foam::PDRparams::new_fields
bool new_fields
Definition: PDRparams.H:80
Foam::PDRparams::ignoreGratings
bool ignoreGratings
Definition: PDRparams.H:83
Foam::PDRparams::blockageNoCT
scalar blockageNoCT
Definition: PDRparams.H:137
Foam::PDRparams::min_overlap_area
scalar min_overlap_area
Definition: PDRparams.H:110
Foam::PDRparams::cong_max_betav
scalar cong_max_betav
Definition: PDRparams.H:107
Foam::PDRparams::def_grating_slat_w
scalar def_grating_slat_w
Default slat thickness grating.
Definition: PDRparams.H:124
Foam::PDRparams::outer_orthog
bool outer_orthog
Definition: PDRparams.H:84