canopySource.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 | Copyright (C) 2015-2016 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 
26 #include "canopySource.H"
27 #include "fvMesh.H"
28 #include "fvMatrices.H"
29 #include "fvCFD.H"
31 #include "groundDist.H"
32 #include <iostream>
33 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
34 
35 namespace Foam
36 {
37 namespace fv
38 {
39  defineTypeNameAndDebug(canopySource, 0);
41  (
42  option,
43  canopySource,
45  );
46 
47 }
48 }
49 
50 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
51 
53 (
54  const word& name,
55  const word& modelType,
56  const dictionary& dict,
57  const fvMesh& mesh
58 )
59 :
60  option(name, modelType, dict, mesh)
61 {
62 
63  if (active()) {
64 
65  fieldNames_.setSize(3);
66  fieldNames_[0] = word("U");
67  fieldNames_[1] = word("k");
68  fieldNames_[2] = word("epsilon");
69  applied_.setSize(fieldNames_.size(), false);
70 
71  read(dict);
72  }
73 }
74 
75 
76 
77 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
78 
79 
81 (
82  fvMatrix<vector>& eqn,
83  const label fieldi
84 )
85 {
86 
87 Info <<"eqn.psi() name is " << eqn.psi().name() << endl;
88 
89  const volVectorField& U = eqn.psi();
90  const volScalarField& canopy = canopy_;
91 
92 Info << "U volVectorField is " << nl << U << endl;
93 Info << "canopy volVectorField is " << nl << canopy << endl;
94 
95 
96  fvMatrix<vector> S_canopy
97  (
98  fvm::Sp(canopy * mag(U), U)
99  );
100 
101  eqn -= S_canopy;
102 
103 }
104 
105 
107  (
108  const volScalarField& rho,
109  fvMatrix<vector>& eqn,
110  const label fieldi
111  )
112  {
113 
114  if (eqn.psi().name() == word("U")) {
115 
116  const volVectorField& U = eqn.psi();
117  const volScalarField& canopy = canopy_;
118 
119  fvMatrix<vector> S_canopy
120  (
121  fvm::Sp(rho*canopy * mag(U), U)
122  );
123 
124  eqn -= S_canopy;
125  }
126 
127 
128  }
129 
130 
132 {
133 
134  if(landuseTable_.size() == 0)
136  << "Missing landuse classes for canopySource in constant/fvOptions"
137  << exit(FatalError);
138 
141  << "No source patches given for landuse data"
142  << exit(FatalError);
143 }
144 
146 
147  vector translationVector(0, 0, 0);
148  translationVector = coeffs_.lookupOrDefault("translateRaster", translationVector, false, false);
149  // translateRasterX_ = coeffs_.lookupOrDefault("translateRaster", vector0, false, false);
150  // translateRasterY_ = coeffs_.lookupOrDefault("translateRasterY", 0, false, false);
151 
152  Raster raster;
153 
154  // read raster
155  if(!raster.read(rasterPath.c_str()))
157  << "Cannot read raster file: " << rasterPath
158  << exit(FatalError);
159 
160  raster.translate(double(translationVector.x()), double(translationVector.y()));
161 
162  Info << " Reading raster: " << rasterPath << endl
163  << " (x1, y1, x2, y2): ("
164  << raster.xll << ", " << raster.yll << ", " << raster.xur << ", " << raster.yur
165  << ") (nrows, ncols): (" << raster.nrows << " ," << raster.ncols
166  << ") cellsize: " << raster.cellsize << endl << endl;
167  return raster;
168 }
169 
171 {
172  // get landuse definitions
173  dictionary landuseDict = coeffs_.subDict("landuse");
174  wordList landuseNames(landuseDict.toc());
175 
176  Info << endl
177  << " ---------------------Landuse categories--------------------" << endl;
178  Info << " name\tcode\tCd\tLAI\tz0\theight\tLADmax" << endl;
179  forAll(landuseNames, i) {
180  word name = landuseNames[i];
181  //dictionary luDict = landuseDict.subDict(name);
182  landuseClass lu(landuseDict, name);
183  landuseTable_.insert(lu.code(), lu);
184  Info << " " << lu.name() << "\t"<< lu.code() << "\t" << lu.Cd()
185  << "\t" << lu.LAI() << "\t" << lu.z0() << "\t" << lu.height()
186  << "\t" << lu.LADmax() << endl;
187  }
188  Info << endl;
189 }
190 
191 
193 {
194  if (!option::read(dict))
195  return false;
196 
197  // if option is not active, it will not be read
198  if (! active())
199  return true;
200 
201  // for which patches to set landuse
202  coeffs_.lookup("sourcePatches") >> sourcePatches_;
203 
204  // read from disk if present
205  readFromDisk_ = coeffs_.lookupOrDefault("readFromDisk", false, false, false);
206 
207  readLanduseFromRaster_ = coeffs_.lookupOrDefault("readLanduseFromRaster", false, false, false);
208  readCanopyHeightFromRaster_ = coeffs_.lookupOrDefault("readCanopyHeightFromRaster", false, false, false);
209  writeFields_ = coeffs_.lookupOrDefault("writeFields", false, false, false);
210 
211  readLanduseClasses();
212 
213  if (readLanduseFromRaster_ ) {
214  fileName landuseRasterFileName;
215  coeffs_.lookup("landuseRasterFileName") >> landuseRasterFileName;
216  landuseRaster_ = readRaster(landuseRasterFileName);
217  }
218 
219  if (readCanopyHeightFromRaster_ ) {
220  fileName canopyHeightRasterFileName;
221  coeffs_.lookup("canopyHeightRasterFileName") >> canopyHeightRasterFileName;
222  canopyHeightRaster_ = readRaster(canopyHeightRasterFileName);
223  }
224 
225  // read landuse codes for each patch
226  if (!readLanduseFromRaster_) {
227  labelList patchLanduseList;
228  coeffs_.lookup("patchLanduse") >> patchLanduseList;
229  if((patchLanduseList.size() != sourcePatches_.size()))
231  << "Wrong number of rows in patchLanduse,"
232  <<"should be equal to number of source patches "
233  << exit(FatalError);
234 
235  forAll(sourcePatches_, i) {
236  label patchID = mesh_.boundaryMesh().findPatchID(sourcePatches_[i]);
237  if (patchID == -1)
239  << "Cannot find landuse source patch: "
240  << sourcePatches_[i]
241  << exit(FatalError);
242 
243  label patchLanduseCode = patchLanduseList[i];
244  landuseClass lu = landuseTable_[patchLanduseCode];
245  patchLanduseTable_.insert(patchID, landuseTable_[lu.code()]);
246  }
247  }
248  checkData();
249  calculateCanopy();
250  return true;
251 }
252 
254  label patch,
255  volScalarField &landuse,
256  volScalarField &LAD,
257  volScalarField &z0,
259  volScalarField &d)
260 {
261 
262  const fvMesh & mesh=landuse.mesh();
263  const polyPatch& pp = mesh.boundaryMesh()[patch];
264 
265 
267  refCast<Foam::nutkAtmRoughWallFunctionFvPatchScalarField>(nut.boundaryField()[patch]);
268 
269  scalarField& nutZ0 = wallNut.z0();
270 
271  Foam::fvPatchScalarField& patchLanduse = landuse.boundaryField()[patch];
272  Foam::fvPatchScalarField& patchZ0 = z0.boundaryField()[patch];
273  forAll(patchLanduse,facei)
274  {
275 
276  landuseClass lu;
277  if (readLanduseFromRaster_) {
278  scalar x=pp.faceCentres()[facei].x();
279  scalar y=pp.faceCentres()[facei].y();
280  lu = landuseTable_[label(landuseRaster_.getValue(double(x),double(y)))];
281  }
282  else {
283  lu = patchLanduseTable_[patch];
284  }
285 
286  if (!landuse_from_disk_)
287  patchLanduse[facei] = scalar(lu.code());
288 
289  if (!z0_from_disk_)
290  patchZ0[facei] = lu.z0();
291 
292  // z0 for actual calculations is stored as scalarField
293  // within boundary condition dictionary of nut
294  nutZ0[facei] = patchZ0[facei];
295  }
296 
297  forAll(d.internalField(), celli)
298  {
299 
300  // get landuse class
301  landuseClass lu;
302 
303  scalar x = mesh.C()[celli].x();
304  scalar y = mesh.C()[celli].y();
305  scalar height = 0;
306 
307  if (readLanduseFromRaster_)
308  lu = landuseTable_[label(landuseRaster_.getValue(double(x),double(y)))];
309  else
310  lu = patchLanduseTable_[patch];
311 
312 //Info << "after read landuse, landuseClass lu is " << lu << endl;
313 
314 
315  if (readCanopyHeightFromRaster_
316  && lu.LADmax() > 0
317  && canopyHeightRaster_.inside(double(x), double(y))) {
318  height = canopyHeightRaster_.getValue(double(x), double(y));
319  }
320  else
321  height = lu.height();
322 
323 Info << "after read canopy height , the height of lu is " << endl << height << endl;
324  // set landuse up to canopy height and LAD according to LADProfile
325  scalar patchDistance = d.internalField()[celli];
326  if (patchDistance < 0)
327  cout<<"patchDistance: " << patchDistance<<'\n';
328  if (patchDistance < height && height > 0)
329  {
330  landuse.internalField()[celli] = scalar(lu.code());
331  LAD.internalField()[celli] = lu.LAD(patchDistance, height);
332  }
333 
334  Info << "landuse.internalField is "<< endl << landuse.internalField()[celli] << endl ;
335  Info << "LAD.internalField is "<< endl << LAD.internalField()[celli]<< endl;
336 
337  }
338 }
339 
340 
342 {
343 
344  labelHashSet sourcePatchIDs(1);
345  sourcePatchIDs.insert(patch);
346  // calculate distance to sourcePatches
347  d = (const volScalarField&) groundDist(mesh_,sourcePatchIDs).y();
348  Info << "calculatePatchDistance volScalarField d is " << nl << d << endl;
349  return;
350 }
351 
353 {
354 
355 
356  // volScalarField& landuse;
357  // volScalarField& LAD;
358  // volScalarField& z0;
359 
360  autoPtr<volScalarField> landuse;
363 
364  IOobject landuseHeader
365  (
366  "landuse",
367  mesh_.time().timeName(),
368  mesh_,
371  false
372  );
373 
374  if (readFromDisk_) {
375  landuse_from_disk_ = true;
376  Info << " Reading existing landuse field" << endl;
377  landuse.reset
378  (
379  new volScalarField
380  (
381  IOobject
382  (
383  "landuse",
384  mesh_.time().timeName(),
385  mesh_,
388  ),
389  mesh_
390  )
391  );
392  }
393  else {
394  landuse_from_disk_ = false;
395  landuse.reset
396  (
397  new volScalarField
398  (
399  IOobject
400  (
401  "landuse",
402  mesh_.time().timeName(),
403  mesh_,
406  ),
407  mesh_,
408  dimensionedScalar("landuse", dimensionSet(0,0,0,0,0,0,0), -1),
409  calculatedFvPatchScalarField::typeName
410  )
411  );
412  }
413 
414  IOobject z0Header
415  (
416  "z0",
417  mesh_.time().timeName(),
418  mesh_,
421  false
422  );
423 
424  if (readFromDisk_) {
425  z0_from_disk_ = true;
426  Info << " Reading existing z0 field" << endl;
427  z0.reset
428  (
429  new volScalarField
430  (
431  IOobject
432  (
433  "z0",
434  mesh_.time().timeName(),
435  mesh_,
438  ),
439  mesh_
440  )
441  );
442  }
443  else {
444  z0_from_disk_ = false;
445  z0.reset
446  (
447  new volScalarField
448  (
449  IOobject
450  (
451  "z0",
452  mesh_.time().timeName(),
453  mesh_,
456  ),
457  mesh_,
458  dimensionedScalar("z0", dimLength, -1),
459  calculatedFvPatchScalarField::typeName
460  )
461  );
462  }
463 
464  IOobject LADHeader
465  (
466  "LAD",
467  mesh_.time().timeName(),
468  mesh_,
471  false
472  );
473 
474  if (readFromDisk_) {
475  LAD_from_disk_ = true;
476  Info << " Reading existing LAD field" << endl;
477  LAD.reset
478  (
479  new volScalarField
480  (
481  IOobject
482  (
483  "LAD",
484  mesh_.time().timeName(),
485  mesh_,
488  ),
489  mesh_
490  )
491  );
492  }
493  else
494  {
495  LAD_from_disk_ = false;
496  LAD.reset
497  (
498  new volScalarField
499  (
500  IOobject
501  (
502  "LAD",
503  mesh_.time().timeName(),
504  mesh_,
507  ),
508  mesh_,
509  dimensionedScalar("lad", dimensionSet(0,-1,0,0,0,0,0), 0),
510  calculatedFvPatchScalarField::typeName
511  )
512  );
513  }
514 
515  // patch distance
517  (
518  IOobject
519  (
520  "d",
521  mesh_.time().timeName(),
522  mesh_,
525  ),
526  mesh_,
527  dimensionedScalar("d",dimLength, SMALL),
528  calculatedFvPatchScalarField::typeName
529  );
530 
531  canopy_.reset
532  (
533  new volScalarField(
534  IOobject
535  (
536  "canopy",
537  mesh_.time().timeName(),
538  mesh_,
541  ),
542  mesh_,
543  dimensionedScalar("canopy",dimensionSet(0,-1,0,0,0,0,0),0)
544  )
545  );
546 
547  volScalarField& nut = mesh_.lookupObjectRef<volScalarField>("nut");
548  scalarField& canopy = canopy_->internalField();
549 
550  // // set landuse, LAD and z0
551 // Info<<"\n Setting landuse for patch: " << endl;
552  forAll(sourcePatches_, sp) {
553  word patchName = sourcePatches_[sp];
554 // Info<<" -- " << patchName << endl;
555  label patchID = mesh_.boundaryMesh().findPatchID(patchName);
556 
557  if (patchID == -1)
559  "void Foam::fv::canopySource::setPatchLanduse("
560  "landuseClass,"
561  "label,"
562  "volScalarField&,"
563  "volScalarField&,"
564  "volScalarField&)",
565  coeffs_
566  ) << "Cannot find patch " << patchName << exit(FatalIOError);
567 
568 
569  calculatePatchDistance(patchID, d);
570  //setPatchLanduse(patchID, landuse(), LAD(), z0(), nut, d);
571  setPatchLanduse(patchID, landuse(), LAD(), z0(), nut, d);
572  }
573 
574  // calculate canopy (Cd * LAD)
575  forAll(landuse->internalField(),celli) {
576  label landuseCode(landuse->internalField()[celli]);
577  if (landuseCode != -1) {
578  landuseClass lu = landuseTable_[landuseCode];
579  canopy[celli] = lu.Cd() * LAD->internalField()[celli];
580  }
581  }
582 
583 
584  if (writeFields_) {
585  landuse->write();
586  LAD->write();
587  z0->write();
588  }
589 }
590 
591 
592 // ************************************************************************* //
Foam::fvPatchField
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:65
canopySource.H
Raster
Definition: Raster.H:13
Foam::IOobject
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:91
Foam::landuseClass
A landuseClass.
Definition: landuseClass.H:57
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::fileName
A class for handling file names.
Definition: fileName.H:69
Foam::groundDist::y
const volScalarField & y() const
Definition: groundDist.H:101
Foam::fv::canopySource::calculateCanopy
void calculateCanopy()
Definition: canopySource.C:352
Foam::fv::canopySource::calculatePatchDistance
void calculatePatchDistance(label patch, volScalarField &d)
Definition: canopySource.C:341
Foam::IOobject::AUTO_WRITE
@ AUTO_WRITE
Definition: IOobject.H:117
Foam::dimLength
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:50
Foam::landuseClass::name
const word & name()
Definition: landuseClass.H:88
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:406
Foam::landuseClass::height
const scalar & height()
Definition: landuseClass.H:108
groundDist.H
Foam::fv::canopySource::read
bool read(const dictionary &dict)
Read dictionary.
Definition: canopySource.C:192
Foam::read
bool read(const char *, int32_t &)
Definition: int32IO.C:87
Foam::landuseClass::LAD
scalar LAD(scalar z, scalar treeHeight)
Definition: landuseClass.C:72
Foam::landuseClass::z0
const scalar & z0()
Definition: landuseClass.H:104
Raster::ncols
int ncols
Definition: Raster.H:16
Foam::GeometricField::boundaryField
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
Definition: GeometricField.C:735
Foam::IOobject::MUST_READ
@ MUST_READ
Definition: IOobject.H:108
Foam::FatalIOError
IOerror FatalIOError
Foam::polyMesh::boundaryMesh
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Definition: polyMesh.H:421
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Foam::fv::canopySource::readLanduseFromRaster_
Switch readLanduseFromRaster_
Definition: canopySource.H:137
Foam::dimensionSet
Dimension set for the base types.
Definition: dimensionSet.H:116
Foam::mag
dimensioned< scalar > mag(const dimensioned< Type > &)
Foam::HashSet< label, Hash< label > >
Foam::fvMatrix::psi
const GeometricField< Type, fvPatchField, volMesh > & psi() const
Definition: fvMatrix.H:281
Raster::translate
void translate(const double &x, const double &y)
Definition: Raster.C:428
Foam::IOobject::NO_WRITE
@ NO_WRITE
Definition: IOobject.H:118
U
U
Definition: pEqn.H:46
Foam::nutkAtmRoughWallFunctionFvPatchScalarField
This boundary condition provides a turbulent kinematic viscosity for atmospheric velocity profiles....
Definition: nutkAtmRoughWallFunctionFvPatchScalarField.H:112
Foam::landuseClass::Cd
const scalar & Cd()
Definition: landuseClass.H:96
fvMatrices.H
A special matrix type and solver, designed for finite volume solutions of scalar equations.
Foam::fv::canopySource::setPatchLanduse
void setPatchLanduse(label patch, volScalarField &landuse, volScalarField &LAD, volScalarField &z0, volScalarField &nut, volScalarField &d)
Definition: canopySource.C:253
Foam::fv::canopySource::canopySource
canopySource(const canopySource &)
Disallow default bitwise copy construct.
Foam::fv::canopySource::sourcePatches_
wordList sourcePatches_
Definition: canopySource.H:127
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::fv::option
Finite volume options abtract base class. Provides a base set of controls, e.g.
Definition: fvOption.H:65
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
nut
nut
Definition: createTDFields.H:71
Foam::IOobject::NO_READ
@ NO_READ
Definition: IOobject.H:111
Foam::nl
static const char nl
Definition: Ostream.H:260
Foam::Info
messageStream Info
Foam::polyPatch
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
Raster::yur
double yur
Definition: Raster.H:20
Raster::read
int read(const char fileName[])
Definition: Raster.C:91
FatalIOErrorIn
#define FatalIOErrorIn(functionName, ios)
Report an error message using Foam::FatalIOError.
Definition: error.H:324
Foam::GeometricField::internalField
InternalField & internalField()
Return internal field.
Definition: GeometricField.C:724
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
Foam::fv::canopySource::checkData
void checkData() const
Definition: canopySource.C:131
Raster::xll
double xll
Definition: Raster.H:17
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::Vector::x
const Cmpt & x() const
Definition: VectorI.H:65
Foam::FatalError
error FatalError
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam::dimensioned
Generic dimensioned Type class.
Definition: dimensionedScalarFwd.H:41
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
fvMesh.H
Raster::cellsize
double cellsize
Definition: Raster.H:21
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::fv::option::read
virtual bool read(const dictionary &dict)
Read source dictionary.
Definition: fvOptionIO.C:53
Raster::nrows
int nrows
Definition: Raster.H:15
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
rho
rho
Definition: pEqn.H:3
fv
labelList fv(nPoints)
Foam::fv::defineTypeNameAndDebug
defineTypeNameAndDebug(option, 0)
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:318
Foam::fv::addToRunTimeSelectionTable
addToRunTimeSelectionTable(option, fixedTemperatureConstraint, dictionary)
Foam::fv::canopySource::readRaster
Raster readRaster(fileName rasterPath)
Definition: canopySource.C:145
Foam::fvMesh::C
const volVectorField & C() const
Return cell centres as volVectorField.
Definition: fvMeshGeometry.C:369
Foam::polyPatch::faceCentres
const vectorField::subField faceCentres() const
Return face centres.
Definition: polyPatch.C:308
Foam::Vector< scalar >
Foam::landuseClass::LADmax
const scalar & LADmax()
Definition: landuseClass.H:112
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Raster::yll
double yll
Definition: Raster.H:18
Foam::fv::canopySource::addSup
void addSup(const volScalarField &rho, fvMatrix< vector > &eqn, const label fieldi)
Source terms to momentum equation (for solvers with and without explicit density)
Definition: canopySource.C:107
Foam::landuseClass::LAI
const scalar & LAI()
Definition: landuseClass.H:100
Foam::HashSet::insert
bool insert(const Key &key)
Insert a new entry.
Definition: HashSet.H:116
x
x
Definition: LISASMDCalcMethod2.H:52
Foam::groundDist
Definition: groundDist.H:58
Foam::fvMatrix
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvPatchField.H:68
Foam::autoPtr::reset
void reset(T *=0)
If object pointer already set, delete object and set to given.
Definition: autoPtrI.H:114
Raster::xur
double xur
Definition: Raster.H:19
fvCFD.H
Foam::Vector::y
const Cmpt & y() const
Definition: VectorI.H:71
Foam::fv::canopySource::landuseTable_
HashTable< landuseClass, label > landuseTable_
Definition: canopySource.H:130
Foam::dictionary::toc
wordList toc() const
Return the table of contents.
Definition: dictionary.C:697
Foam::List::size
void size(const label)
Override size to be inconsistent with allocated storage.
Foam::fvc::Sp
tmp< GeometricField< Type, fvPatchField, volMesh > > Sp(const volScalarField &sp, const GeometricField< Type, fvPatchField, volMesh > &vf)
Definition: fvcSup.C:67
Foam::dictionary::subDict
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
Definition: dictionary.C:631
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
Foam::landuseClass::code
const label & code()
Definition: landuseClass.H:92
Foam::name
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
Foam::fv::canopySource::readLanduseClasses
void readLanduseClasses()
Definition: canopySource.C:170
y
scalar y
Definition: LISASMDCalcMethod1.H:14
Foam::nutkAtmRoughWallFunctionFvPatchScalarField::z0
scalarField & z0()
Definition: nutkAtmRoughWallFunctionFvPatchScalarField.H:205