Time: Added run-time selectable userTime option
replacing the virtual functions overridden in engineTime.
Now the userTime conversion function in Time is specified in system/controlDict
such that the solver as well as all pre- and post-processing tools also operate
correctly with the chosen user-time.
For example the user-time and rpm in the tutorials/combustion/XiEngineFoam/kivaTest case are
now specified in system/controlDict:
userTime
{
type engine;
rpm 1500;
}
The default specification is real-time:
userTime
{
type real;
}
but this entry can be omitted as the real-time class is instantiated
automatically if the userTime entry is not present in system/controlDict.
This commit is contained in:
@ -88,7 +88,7 @@ bool Foam::functionObjects::setTimeStepFunctionObject::execute()
|
||||
{
|
||||
const_cast<Time&>(time_).setDeltaT
|
||||
(
|
||||
timeStepPtr_().value(time_.userTime())
|
||||
timeStepPtr_().value(time_.userTimeValue())
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -85,7 +85,7 @@ bool Foam::functionObjects::setWriteIntervalFunctionObject::execute()
|
||||
{
|
||||
const_cast<Time&>(time_).setWriteInterval
|
||||
(
|
||||
writeIntervalPtr_().value(time_.userTime())
|
||||
writeIntervalPtr_().value(time_.userTimeValue())
|
||||
);
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user