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