mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: moved maxCo out of loop
This commit is contained in:
@ -295,6 +295,7 @@ bool Foam::KinematicParcel<ParcelType>::move
|
|||||||
const polyMesh& mesh = td.cloud().pMesh();
|
const polyMesh& mesh = td.cloud().pMesh();
|
||||||
const polyBoundaryMesh& pbMesh = mesh.boundaryMesh();
|
const polyBoundaryMesh& pbMesh = mesh.boundaryMesh();
|
||||||
const scalarField& V = mesh.cellVolumes();
|
const scalarField& V = mesh.cellVolumes();
|
||||||
|
const scalar maxCo = td.cloud().solution().maxCo();
|
||||||
|
|
||||||
scalar tEnd = (1.0 - p.stepFraction())*trackTime;
|
scalar tEnd = (1.0 - p.stepFraction())*trackTime;
|
||||||
const scalar dtMax = tEnd;
|
const scalar dtMax = tEnd;
|
||||||
@ -315,7 +316,6 @@ bool Foam::KinematicParcel<ParcelType>::move
|
|||||||
if (p.active() && magU > ROOTVSMALL)
|
if (p.active() && magU > ROOTVSMALL)
|
||||||
{
|
{
|
||||||
const scalar d = dt*magU;
|
const scalar d = dt*magU;
|
||||||
const scalar maxCo = td.cloud().solution().maxCo();
|
|
||||||
const scalar dCorr = min(d, maxCo*cbrt(V[cellI]));
|
const scalar dCorr = min(d, maxCo*cbrt(V[cellI]));
|
||||||
dt *=
|
dt *=
|
||||||
dCorr/d
|
dCorr/d
|
||||||
|
|||||||
Reference in New Issue
Block a user