All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rampHoldFall.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2012-2019 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 Class
25  Foam::rampHoldFall
26 
27 Description
28  Piecewise linear function with a ramp from a start value to a plateaux
29  value, holding at this, then a linear fall to an end value.
30 
31 SourceFiles
32  rampHoldFall.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef rampHoldFall_H
37 #define rampHoldFall_H
38 
39 #include "relaxationModel.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class rampHoldFall Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 class rampHoldFall
51 :
52  public relaxationModel
53 {
54 
55 private:
56 
57  // Private Data
58 
59  //- Relaxation coefficient at the start of the ramp
60  scalar rampStartRelaxation_;
61 
62  //- Relaxation coefficient for the hold portion
63  scalar holdRelaxation_;
64 
65  //- Relaxation coefficient at the end of the fall
66  scalar fallEndRelaxation_;
67 
68  //- Fraction through the run where the ramp ends and the hold starts
69  scalar rampEndFraction_;
70 
71  //- Fraction through the run where the hold ends and the fall starts
72  scalar fallStartFraction_;
73 
74  //- Gradient in ramp portion, normalised against time
75  scalar rampGradient_;
76 
77  //- Gradient in fall portion, normalised against time
78  scalar fallGradient_;
79 
80 public:
81 
82  //- Runtime type information
83  TypeName("rampHoldFall");
84 
85  // Constructors
86 
87  //- Construct from components
89  (
90  const dictionary& relaxationDict,
91  const Time& runTime
92  );
93 
94 
95  //- Destructor
96  virtual ~rampHoldFall()
97  {}
98 
99 
100  // Member Functions
101 
102  //- Return the current relaxation coefficient
103  virtual scalar relaxation();
104 };
105 
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 } // End namespace Foam
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 #endif
114 
115 // ************************************************************************* //
virtual ~rampHoldFall()
Destructor.
Definition: rampHoldFall.H:95
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
TypeName("rampHoldFall")
Runtime type information.
engineTime & runTime
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
Piecewise linear function with a ramp from a start value to a plateaux value, holding at this...
Definition: rampHoldFall.H:49
virtual scalar relaxation()
Return the current relaxation coefficient.
Abstract base class for providing relaxation values to the cell motion controller.
Namespace for OpenFOAM.
rampHoldFall(const dictionary &relaxationDict, const Time &runTime)
Construct from components.