mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
MPPICParcel: Retain effect of patch interactions on correction velocity
This prevents infinite loops occurring during correction steps as a result of a fixed correction velocity repeatedly pushing the particle towards a rebound patch. Resolves bug report https://bugs.openfoam.org/view.php?id=2935
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -94,17 +94,16 @@ bool Foam::MPPICParcel<ParcelType>::move
|
|||||||
}
|
}
|
||||||
case trackingData::tpCorrectTrack:
|
case trackingData::tpCorrectTrack:
|
||||||
{
|
{
|
||||||
vector U = p.U();
|
const scalar f = p.stepFraction();
|
||||||
|
const scalar a = p.age();
|
||||||
|
|
||||||
scalar f = p.stepFraction();
|
Swap(p.U(), p.UCorrect());
|
||||||
|
|
||||||
scalar a = p.age();
|
|
||||||
|
|
||||||
p.U() = (1.0 - f)*p.UCorrect();
|
|
||||||
|
|
||||||
ParcelType::move(cloud, td, trackTime);
|
ParcelType::move(cloud, td, trackTime);
|
||||||
|
|
||||||
p.U() = U + (p.stepFraction() - f)*p.UCorrect();
|
Swap(p.U(), p.UCorrect());
|
||||||
|
|
||||||
|
p.U() += (p.stepFraction() - f)*p.UCorrect();
|
||||||
|
|
||||||
p.age() = a;
|
p.age() = a;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user