Jump to content

Physically based rain


fatboYYY

Recommended Posts

Hey guys,

I am trying to create a physically based rain simulation. I am updating these acting forces on every frame: Gravity, wind and drag. The formulae themselves should be correct, but I am clearly overseeing something. The velocity should not exceed 15m/s, but currently it is going way past that point.

Any help is greatly appreciated.

Thanks,
Manu

PBRain_tmp_v0002_nocomment_mko_.hip

Link to comment
Share on other sites

1 minute ago, vtrvtr said:

Your projected area is many orders of magnitude smaller than everything else in your calculations, unless you put the drag into the 10^4 magnitude, everything else is irrelevant because of that

yeah I found the same. The value of your drag has to be really high to make an impact at all.

 

26 minutes ago, Noobini said:

I'm bamboozled by all the formulea.....but just a quick observation...shouldn't there be a Trail in there to compute velocity ?

Noobini the velocity is generated by the first wrangle node in pops, where gravity is created.

  • Like 1
Link to comment
Share on other sites

1 minute ago, Jesper Rahlff said:

Noobini the velocity is generated by the first wrangle node in pops, where gravity is created.

ah ok...so trail is really only for when you are manually manipulating the geo (like a mountain/noise) i guess....so it finds the diff between frames and make that the vel...

So now the gravity is doing the work instead of the mountain/noise.....Thanks Jesper

Link to comment
Share on other sites

30 minutes ago, Noobini said:

ah ok...so trail is really only for when you are manually manipulating the geo (like a mountain/noise) i guess....so it finds the diff between frames and make that the vel...

So now the gravity is doing the work instead of the mountain/noise.....Thanks Jesper

anytime

Link to comment
Share on other sites

You guys are right. All the variable calculations should be physically correct though:

float waterDensity = 1000; //http://www.sengpielaudio.com/calculator-densityunits.htm
float airDensity = 1.225; //https://en.wikipedia.org/wiki/Density_of_air
float Volume = 4/3*pi*radius; //https://en.wikipedia.org/wiki/Sphere#Enclosed_volume
float mass = Volume*waterDensity; //should be a given
float projectedArea = pi*pow((2*radius),2)/4; //http://www.mne.psu.edu/cimbala/me325web_Spring_2012/Labs/Drag/intro.pdf
float dragCoefficient = 0.3; //https://www.grc.nasa.gov/www/k-12/VirtualAero/BottleRocket/airplane/shaped.html
float drag = 0.5*dragCoefficient*airDensity*pow(velocity,2)*projectedArea; //https://www.grc.nasa.gov/www/k-12/VirtualAero/BottleRocket/airplane/drageq.html

 

I am so very sure, that I am just missing a tiny thing.

Link to comment
Share on other sites

but............the net effect, it's the same...unless I need to go back to see my high school math teacher....

(she's very beautiful btw, so I don't mind at all...)

Edited by Noobini
  • Haha 1
Link to comment
Share on other sites

Just now, Noobini said:

haha...detention for you young man !!!

I guess sometimes I want to find errors even when there are none :P

I actually had to get out a piece of paper and quickly assign each variable  a generic value and then do the math for both equations to assure myself you are correct.

Link to comment
Share on other sites

Correcting what Noobini has found, and then adjusting the drag coefficient to .7 returns a terminal velocity of 10.15 m/s.

That seems fairly realistic!

Now you just have to implement a dynamically adjusting drag coefficient based on velocity and drop size :Phttp://journals.ametsoc.org/doi/pdf/10.1175/1520-0450(1969)008<0249:TVORA>2.0.CO%3B2

 

  • Thanks 1
Link to comment
Share on other sites

1 hour ago, Noobini said:

 not that it's gonna fix the problem tho...

hang about...it DID fix it.....even using the current coeff of 0.3...terminal velocity is 'reasonable'...I gotta visit my math teacher more often !!!

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...