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