49 relaxationModel(typeName, relaxationDict,
runTime),
50 rampStartRelaxation_(coeffDict().
get<scalar>(
"rampStartRelaxation")),
51 holdRelaxation_(coeffDict().
get<scalar>(
"holdRelaxation")),
52 fallEndRelaxation_(coeffDict().
get<scalar>(
"fallEndRelaxation")),
53 rampEndFraction_(coeffDict().
get<scalar>(
"rampEndFraction")),
54 fallStartFraction_(coeffDict().
get<scalar>(
"fallStartFraction")),
55 rampGradient_((holdRelaxation_ - rampStartRelaxation_)/(rampEndFraction_)),
58 (fallEndRelaxation_ - holdRelaxation_)/(1 - fallStartFraction_)
67 scalar t =
runTime_.time().timeOutputValue();
69 scalar tStart =
runTime_.time().startTime().value();
70 scalar tEnd =
runTime_.time().endTime().value();
71 scalar tSpan = tEnd - tStart;
75 return rampStartRelaxation_;
78 if (t - tStart < rampEndFraction_*tSpan)
82 return rampGradient_*((t - tStart)/tSpan) + rampStartRelaxation_;
84 else if (t - tStart > fallStartFraction_*tSpan)
89 fallGradient_*((t - tStart)/tSpan)
90 + fallEndRelaxation_ - fallGradient_;
96 return holdRelaxation_;
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Piecewise linear function with a ramp from a start value to a plateaux value, holding at this,...
rampHoldFall(const dictionary &relaxationDict, const Time &runTime)
Construct from components.
virtual scalar relaxation()
Return the current relaxation coefficient.
Abstract base class for providing relaxation values to the cell motion controller.
const Time & runTime_
Reference to the conformalVoronoiMesh holding this cvControls object.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.