MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / stepFractionSpan

Method stepFractionSpan

src/lagrangian/basic/particle/particleI.H:117–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115
116
117inline Foam::Pair<Foam::scalar> Foam::particle::stepFractionSpan() const
118{
119 if (mesh_.time().subCycling())
120 {
121 const TimeState& tsNew = mesh_.time();
122 const TimeState& tsOld = mesh_.time().prevTimeState();
123
124 const scalar tFrac =
125 (
126 (tsNew.value() - tsNew.deltaTValue())
127 - (tsOld.value() - tsOld.deltaTValue())
128 )/tsOld.deltaTValue();
129
130 const scalar dtFrac = tsNew.deltaTValue()/tsOld.deltaTValue();
131
132 return Pair<scalar>(tFrac, dtFrac);
133 }
134 else
135 {
136 return Pair<scalar>(0, 1);
137 }
138}
139
140
141inline Foam::scalar Foam::particle::currentTimeFraction() const

Callers

nothing calls this directly

Calls 4

subCyclingMethod · 0.80
timeMethod · 0.80
deltaTValueMethod · 0.80
valueMethod · 0.45

Tested by

no test coverage detected