piecewiseLinearRamp.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) 2012-2015 OpenFOAM Foundation
9  Copyright (C) 2018 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::piecewiseLinearRamp
29 
30 Description
31  A linear ramp between 0 and 1 with definable start and end points.
32 
33 SourceFiles
34  piecewiseLinearRamp.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef piecewiseLinearRamp_H
39 #define piecewiseLinearRamp_H
40 
41 #include "faceAreaWeightModel.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class piecewiseLinearRamp Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 :
54  public faceAreaWeightModel
55 {
56 private:
57 
58  // Private data
59 
60  //- Face area fraction below which a weight of 0 is returned
61  scalar lAF_;
62 
63  //- Face area fraction above which a which of 1 is returned
64  scalar uAF_;
65 
66 
67 public:
68 
69  //- Runtime type information
70  TypeName("piecewiseLinearRamp");
71 
72  // Constructors
73 
74  //- Construct from components
76  (
77  const dictionary& faceAreaWeightDict
78  );
79 
80 
81  //- Destructor
82  virtual ~piecewiseLinearRamp() = default;
83 
84 
85  // Member Functions
86 
87  //- Return the faceAreaWeight
88  virtual scalar faceAreaWeight(scalar faceAreaFraction) const;
89 };
90 
91 
92 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
93 
94 } // End namespace Foam
95 
96 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
97 
98 #endif
99 
100 // ************************************************************************* //
Foam::piecewiseLinearRamp::TypeName
TypeName("piecewiseLinearRamp")
Runtime type information.
Foam::piecewiseLinearRamp
A linear ramp between 0 and 1 with definable start and end points.
Definition: piecewiseLinearRamp.H:51
Foam::piecewiseLinearRamp::~piecewiseLinearRamp
virtual ~piecewiseLinearRamp()=default
Destructor.
Foam::faceAreaWeightModel
Abstract base class for providing faceAreaWeight values to the cell motion controller based on an arg...
Definition: faceAreaWeightModel.H:56
Foam::piecewiseLinearRamp::piecewiseLinearRamp
piecewiseLinearRamp(const dictionary &faceAreaWeightDict)
Construct from components.
Foam::piecewiseLinearRamp::faceAreaWeight
virtual scalar faceAreaWeight(scalar faceAreaFraction) const
Return the faceAreaWeight.
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
faceAreaWeightModel.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33