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-------------------------------------------------------------------------------
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
27Class
28 Foam::rampHoldFall
29
30Description
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
34SourceFiles
35 rampHoldFall.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef rampHoldFall_H
40#define rampHoldFall_H
41
42#include "relaxationModel.H"
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
48
49/*---------------------------------------------------------------------------*\
50 Class rampHoldFall Declaration
51\*---------------------------------------------------------------------------*/
53class rampHoldFall
54:
55 public relaxationModel
56{
57private:
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
82public:
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// ************************************************************************* //
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Piecewise linear function with a ramp from a start value to a plateaux value, holding at this,...
Definition: rampHoldFall.H:55
rampHoldFall(const dictionary &relaxationDict, const Time &runTime)
Construct from components.
virtual scalar relaxation()
Return the current relaxation coefficient.
TypeName("rampHoldFall")
Runtime type information.
virtual ~rampHoldFall()=default
Destructor.
Abstract base class for providing relaxation values to the cell motion controller.
engineTime & runTime
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73