regularisationRadiusIsotropic.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) 2021 PCOpt/NTUA
9  Copyright (C) 2021 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 Class
29  Foam::isotropic
30 
31 Description
32  An isotropic regularisationRadius (same in all spatial directions)
33 
34 
35 SourceFiles
36  isotropic.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef isotropic_H
41 #define isotropic_H
42 
43 #include "regularisationRadius.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class isotropic Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 class isotropic
55 :
57 {
58 
59 private:
60 
61  // Private Member Functions
62 
63  //- No copy construct
64  isotropic(const isotropic&) = delete;
65 
66  //- No copy assignment
67  void operator=(const isotropic&) = delete;
68 
69 
70 protected:
71 
72  // Protected data
73 
74  //- Multiplier of the wall thickness, used to obtain the radius for
75  //- the second regularisation in bi-fluid topO
76  scalar wallThicknessMult_;
77 
78  //- Smoothing radius of the first regulatisation
80 
81 
82  // Protected Member Functions
83 
84  //- Compute smoothing radius, if not directly given
85  scalar computeRadius(const dictionary& dict);
86 
87 
88 public:
89 
90  //- Runtime type information
91  TypeName("isotropic");
92 
93 
94  // Constructors
95 
96  //- Construct from components
97  isotropic
98  (
99  const fvMesh& mesh,
100  const dictionary& dict,
101  bool adjustWallThickness
102  );
103 
104 
105  //- Destructor
106  virtual ~isotropic() = default;
107 
108 
109  // Member Functions
110 
111  //- Add a Laplacian term with an isotropic diffusivity
112  virtual void addRegularisationTerm
113  (
114  fvScalarMatrix& matrix,
115  bool isTopoField
116  ) const;
117 };
118 
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 } // End namespace Foam
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 #endif
127 
128 // ************************************************************************* //
Base class for selecting the regulatisation radius.
dictionary dict
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
An isotropic regularisationRadius (same in all spatial directions)
virtual void addRegularisationTerm(fvScalarMatrix &matrix, bool isTopoField) const
Add a Laplacian term with an isotropic diffusivity.
dimensionedScalar radius_
Smoothing radius of the first regulatisation.
dynamicFvMesh & mesh
TypeName("isotropic")
Runtime type information.
scalar wallThicknessMult_
Multiplier of the wall thickness, used to obtain the radius for the second regularisation in bi-fluid...
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
Definition: fvPatchField.H:64
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
scalar computeRadius(const dictionary &dict)
Compute smoothing radius, if not directly given.
virtual ~isotropic()=default
Destructor.
Namespace for OpenFOAM.