betaMaxDarcy.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) 2020-2023 PCOpt/NTUA
9  Copyright (C) 2020-2023 FOSS GP
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 "betaMaxDarcy.H"
31 
32 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33 
34 namespace Foam
35 {
36  defineTypeNameAndDebug(betaMaxDarcy, 0);
38 }
39 
40 
41 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
42 
43 Foam::betaMaxDarcy::betaMaxDarcy
44 (
45  const fvMesh& mesh,
46  const dictionary& dict
47 )
48 :
49  betaMax(mesh, dict),
50  DarcyNumber_
51  (
52  dict.subDict(type() + "Coeffs").getOrDefault<scalar>("Da", 1.e-5)
53  ),
54  length_(computeLength(dict))
55 {
56  scalar nu =
58  (
59  IOobject
60  (
61  "transportProperties",
62  mesh.time().constant(),
63  mesh,
66  false
67  )
68  ).get<dimensionedScalar>("nu").value();
69 
71  Info
72  << "Computed a betaMax value of " << value_
73  << " based on a length of " << length_ << nl << endl;
74 }
75 
76 
77 // ************************************************************************* //
dictionary dict
type
Types of root.
Definition: Roots.H:52
scalar value_
betaMax value
Definition: betaMax.H:78
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
constexpr char nl
The newline &#39;\n&#39; character (0x0a)
Definition: Ostream.H:50
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:531
Ignore writing from objectRegistry::writeObject()
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
Macros for easy insertion into run-time selection tables.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:50
scalar length_
Characteristic length of the case.
Definition: betaMaxDarcy.H:99
scalar DarcyNumber_
The Darcy number expressing the ratio of viscous to porous forces.
Definition: betaMaxDarcy.H:91
const dimensionedScalar e
Elementary charge.
Definition: createFields.H:11
dynamicFvMesh & mesh
Compute betaMax through the definition of the Darcy number, quantifying the viscous-to-porous forces ...
Definition: betaMaxDarcy.H:64
Base class for selecting the betaMax value, i.e. the value multiplying the Brinkman penalisation term...
Definition: betaMax.H:49
defineTypeNameAndDebug(combustionModel, 0)
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
messageStream Info
Information stream (stdout output on master, null elsewhere)
virtual scalar value() const
Get value.
Definition: betaMax.C:249
Defines the attributes of an object for which implicit objectRegistry management is supported...
Definition: IOobject.H:172
volScalarField & nu
Namespace for OpenFOAM.
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)