Bug report in virtualMassForce model

Submitted by rqwang on Fri, 02/14/2014 - 02:32

Hi, Chris and Alice,

I might find a bug in virtualMassForce model.

1. when a particle is inserted, UrelOld is always some random number, e.g. vector(1,1,1), because there is no previous Ur. So the first calculation is wrong with it.

2. when the particle moves from one processor to another, UrelOld is wrong again, because the new processor has no record of previous UrelOld.

3. There is some literatures (e.g. equations 45 and 46 in Maxey and Riley, Phys. Fluids 26, 883, [1983]) pointing out that the current way is not accurate, i.e. virtualMassForce=0.5*m_f*d(Ur)/dt. It should be 0.5*m_f*(dUs/dt-Duf/Dt).

Please check the code. Thanks in advance.

rq

rqwang | Mon, 02/17/2014 - 23:17

To update,

1) I found line 136
particleCloud_.dataExchangeM().allocateArray(UrelOld_,1.,1);
should be
particleCloud_.dataExchangeM().allocateArray(UrelOld_,1.,3);

and
2) the UrelOld is not broadcasted to other processors, so I temporarily use MPI_Send and MPI_Recv to enforce it happen so that all the processors have the same information of UrelOld.

Looking forward to your official solution...