CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (http://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   possible bug in KinematicParcel (http://www.cfd-online.com/Forums/openfoam-bugs/87381-possible-bug-kinematicparcel.html)

guanghaowu April 19, 2011 04:20

possible bug in KinematicParcel
 
Hello,

Suppose a particle is in a cell next to rebound type wall, while the fluid velocity of the cell center is toward to the wall.
If the particle hits the wall,
U_ = rebound of U_,
but
dt > ROOTVSMALL
then
U_ = Uc_;
where Uc_ is toward to the wall, so in the next WHILE iteration, dt becomes very small 1E-19 order, but still
dt > ROOTVSMALL
and the WHILE iteration does not stop...

----------------------------------
In KinematicParcel.C

template<class ParcelType>
template<class TrackData>
bool Foam::KinematicParcel<ParcelType>::move(TrackData& td)
{
...
while (td.keepParticle && !td.switchProcessor && tEnd > ROOTVSMALL)
{
....
if (p.active())
{
dt *= p.trackToFace(p.position() + dt*U_, td);
}

tEnd -= dt;
p.stepFraction() = 1.0 - tEnd/deltaT;

// Avoid problems with extremely small timesteps
if (dt > ROOTVSMALL) //=> if (dt > ROOTVSMALL && !p.onBoundary())
{
// Update cell based properties
p.setCellValues(td, dt, cellI);

if (td.cloud().cellValueSourceCorrection())
{
p.cellValueSourceCorrection(td, dt, cellI);
}

p.calc(td, dt, cellI);
}

if (p.onBoundary() && td.keepParticle)
{
if (isA<processorPolyPatch>(pbMesh[p.patch(p.face())]))
{
td.switchProcessor = true;
}
}
....
}
...
}

Best regards,
Guanghao


All times are GMT -4. The time now is 11:13.