Wednesday, April 13, 2011

Bubble Bomber Update : Version 15

Adding bubble expansion sink term Ea. It should be given by a simple mass balance removing the gas added to the discrete bubble from the dissolved gas in the local SPH particles, but what is MASS BALANCE?!!

Now just calculate it by a distance weight from the surrounding fluid particles to determine gas transfer to bubbles(threshold as 0.01), and increase the bubble  radius by an arbitrary constant of 0.10 * pcurr->gas_concentration * fac.

Parameters:

float mR = 100 * m_Param[SPH_SMOOTHRADIUS];

Vector3DF r ( p->pos.x - pcurr->pos.x, p->pos.y - pcurr->pos.y, p->pos.z - pcurr->pos.z );
double distance = r.Length();
double fac = (mR - distance) / mR;

if (fac < 1.0  && fac > 0.0 && pcurr->gas_concentration >= 0.01) {

//the default contribution is set up as 0.01
pcurr->gas_concentration -= 0.01 * fac;
p->gas_concentration += 0.01 * fac;
p->radius += 0.01 * fac;
//p->gas_concentration

So in this commitment I assumed the non strict law of gas transferring and bubble expansion(radius increases according to the distance weight of surrounding fluid particles and 0.10 * pcurr->gas_concentration * fac).
Should modify them after clarify the laws.

No comments:

Post a Comment