Loading...
Searching...
No Matches
betaMaxReynoldsDarcy.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-------------------------------------------------------------------------------
11License
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
30#include "EdgeMap.H"
31#include "syncTools.H"
33
34// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
35
36namespace Foam
37{
38 defineTypeNameAndDebug(betaMaxReynoldsDarcy, 0);
39 addToRunTimeSelectionTable(betaMax, betaMaxReynoldsDarcy, dictionary);
40}
41
42
43// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
44
45Foam::betaMaxReynoldsDarcy::betaMaxReynoldsDarcy
46(
47 const fvMesh& mesh,
48 const dictionary& dict
49)
50:
52 ReynoldsDarcyNumber_
53 (
54 dict.subDict(type() + "Coeffs").getOrDefault<scalar>("ReDa", 1.e-5)
55 ),
56 length_(computeLength(dict)),
57 Uref_(dict.subDict(type() + "Coeffs").get<scalar>("Uref"))
58{
60 Info
61 << "Computed a betaMax value of " << value_
62 << " based on a length of " << length_ << nl << endl;
63}
64
65
66// ************************************************************************* //
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Compute betaMax through the products of the Reynolds and Darcy numbers, quantifying the momentum-to-p...
scalar Uref_
Reference velocity.
scalar length_
Characteristic length of the case.
scalar ReynoldsDarcyNumber_
The Darcy number expressing the ratio of viscous to porous forces.
Base class for selecting the betaMax value, i.e. the value multiplying the Brinkman penalisation term...
Definition betaMax.H:50
scalar value_
betaMax value
Definition betaMax.H:78
scalar computeLength(const dictionary &dict) const
Compute the characteristic length.
Definition betaMax.C:37
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Definition className.H:142
dynamicFvMesh & mesh
Namespace for OpenFOAM.
messageStream Info
Information stream (stdout output on master, null elsewhere).
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition Ostream.H:519
constexpr char nl
The newline '\n' character (0x0a).
Definition Ostream.H:50
dictionary dict