|
[Sponsors] |
January 26, 2019, 16:35 |
What is time in the SimpleFoam Solver?
|
#1 |
New Member
Brent Shambaugh
Join Date: Nov 2018
Posts: 8
Rep Power: 7 |
In the simpleFoam solver there are three types of times.
runTime.timeName() , runTime.elapsedCpuTime(), and p { margin-bottom: 0.1in; line-height: 120%; } runTime.elapsedClockTime() . What do they mean? Is there any one that reflects time that can be compared to one in the real world? First a definition of simpleFoam: https://www.openfoam.com/documentation/user-guide/standard-solvers.php "simpleFoam Steady-state solver for incompressible flows with turbulence modelling" In ControlDict there are the following lines: Code:
startFrom startTime; startTime 0; stopAt endTime; endTime 30; deltaT 0.05; writeControl timeStep; writeInterval 20; This is defined as: https://www.openfoam.com/documentati...p#x22-830006.1 startFrom Controls the start time of the simulation. startTime Start time for the simulation with startFrom startTime; stopAt Controls the end time of the simulation. - endTime Time specified by the endTime keyword entry. endTime End time for the simulation when stopAt endTime; is specified. deltaT Time step of the simulation. writeControl Controls the timing of write output to file. writeInterval Scalar used in conjunction with writeControl described above. The code for simpleFoam: https://github.com/OpenFOAM/OpenFOAM-dev/blob/master/applications/solvers/incompressible/simpleFoam/simpleFoam.C has: " “Time = “ << runTime.timeName() <<" further defined by: <code> Foam::word Foam::Time::timeName() const { return dimensionedScalar::name(); }</code> <code> /*---------------------------------------------------------------------------*\ Class Time Declaration \*---------------------------------------------------------------------------*/ classTime : publicclock, publiccpuTime, publicTimePaths, publicobjectRegistry, publicTimeState {….. // Access //- Return time name of given scalar time // formatted with given precision staticwordtimeName ( constscalar, constint precision = precision_ ); //- Return current time name virtualwordtimeName() const;</code> simpleFoam.C also has: “ExecutionTime = “ << runTime.elapsedCpuTime() <code> // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // double Foam::cpuTime::elapsedCpuTime() const { getTime(newTime_); return timeDifference(startTime_, newTime_); }</code> simpleFoam.C also has: “ClockTime” << runTime.elapsedClockTime() <code> // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // time_t Foam::clock::elapsedClockTime() const { newTime_ = getTime(); return newTime_ - startTime_; }</code> My best guess is runTime.timeName() corresponds to time iterations, or steps to get to convergence for a numerical algorithm. Since it is a steady state solver, it does not correspond real time in the physical world. There is no time in the physical world for this algorithm. It can only reach steady state, that is snapshots of the solution do not change as more interations are completed. This was inspired by the video: Solution Modes in Autodesk CFD: Steady State vs Transient https://www.youtube.com/watch?v=PVUFmYOyGkA My best guess is runTime.elapsedCpuTime() is the time for the computer in its own clock cycles to complete the simulation to the desired relaxation parameters. My best guess is runTime.elapsedClockTime() is the time that the simulation would take if it was timed with a stop watch. I performed this experiment by timing with my phone. Does anyone have anything to add? Thanks. p { margin-bottom: 0.1in; line-height: 120%; } p { margin-bottom: 0.1in; line-height: 120%; } p { margin-bottom: 0.1in; line-height: 120%; } p { margin-bottom: 0.1in; line-height: 120%; } p { margin-bottom: 0.1in; line-height: 120%; } p { margin-bottom: 0.1in; line-height: 120%; } p { margin-bottom: 0.1in; line-height: 120%; } p { margin-bottom: 0.1in; line-height: 120%; } |
|
January 27, 2019, 13:48 |
|
#2 |
New Member
Brent Shambaugh
Join Date: Nov 2018
Posts: 8
Rep Power: 7 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[General] Extracting ParaView Data into Python Arrays | Jeffzda | ParaView | 30 | November 6, 2023 21:00 |
courant number increases to rather large values | 6863523 | OpenFOAM Running, Solving & CFD | 22 | July 5, 2023 23:48 |
AMI speed performance | danny123 | OpenFOAM | 21 | October 24, 2020 04:13 |
Stuck in a Rut- interDyMFoam! | xoitx | OpenFOAM Running, Solving & CFD | 14 | March 25, 2016 07:09 |
Floating point exception error | lpz_michele | OpenFOAM Running, Solving & CFD | 53 | October 19, 2015 02:50 |