fatboYYY Posted January 8, 2018 Share Posted January 8, 2018 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 Quote Link to comment Share on other sites More sharing options...
Noobini Posted January 8, 2018 Share Posted January 8, 2018 I'm bamboozled by all the formulea.....but just a quick observation...shouldn't there be a Trail in there to compute velocity ? Quote Link to comment Share on other sites More sharing options...
vtrvtr Posted January 8, 2018 Share Posted January 8, 2018 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 Quote Link to comment Share on other sites More sharing options...
Jesper Rahlff Posted January 8, 2018 Share Posted January 8, 2018 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. 1 Quote Link to comment Share on other sites More sharing options...
Noobini Posted January 8, 2018 Share Posted January 8, 2018 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 Quote Link to comment Share on other sites More sharing options...
Jesper Rahlff Posted January 8, 2018 Share Posted January 8, 2018 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 Quote Link to comment Share on other sites More sharing options...
fatboYYY Posted January 9, 2018 Author Share Posted January 9, 2018 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. Quote Link to comment Share on other sites More sharing options...
Jesper Rahlff Posted January 9, 2018 Share Posted January 9, 2018 (edited) at one points I wrote something stupid here.... R.I.P Jesper maybe this paper can help you as well: https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/20140010645.pdf Edited January 9, 2018 by Jesper Rahlff I was wrooooongg 1 Quote Link to comment Share on other sites More sharing options...
Noobini Posted January 9, 2018 Share Posted January 9, 2018 same same innit ? you divide by 2 while the OP mults by 0.5 Quote Link to comment Share on other sites More sharing options...
Jesper Rahlff Posted January 9, 2018 Share Posted January 9, 2018 14 minutes ago, Noobini said: same same innit ? you divide by 2 while the OP mults by 0.5 except he mults everything with 0.5 I only divide power(velocity,2) with 2 Quote Link to comment Share on other sites More sharing options...
Noobini Posted January 9, 2018 Share Posted January 9, 2018 (edited) 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 January 9, 2018 by Noobini 1 Quote Link to comment Share on other sites More sharing options...
Jesper Rahlff Posted January 9, 2018 Share Posted January 9, 2018 4 minutes ago, Noobini said: but............the net effect, it's the same...unless I need to go back to see my high school math teacher.... I think I gotta forfeit this one.. Scratch whatever I said. Quote Link to comment Share on other sites More sharing options...
Noobini Posted January 9, 2018 Share Posted January 9, 2018 Just now, Jesper Rahlff said: I think I gotta forfeit this one.. Scratch whatever I said. haha...detention for you young man !!! Quote Link to comment Share on other sites More sharing options...
Jesper Rahlff Posted January 9, 2018 Share Posted January 9, 2018 Just now, Noobini said: haha...detention for you young man !!! I guess sometimes I want to find errors even when there are none 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. Quote Link to comment Share on other sites More sharing options...
fatboYYY Posted January 9, 2018 Author Share Posted January 9, 2018 Thanks for the link Jesper! Shows some really cool stuff. Unfortunately, it shows the same equations that I used, so no real solution in sight. Quote Link to comment Share on other sites More sharing options...
Noobini Posted January 9, 2018 Share Posted January 9, 2018 waiiiiiiiiiit just a minute....my math teacher said....sphere vol should be 4/3 PI r CUBED !!! you forgot the CUBED !!! (not that it's gonna fix the problem tho...but let's get this right first) 1 Quote Link to comment Share on other sites More sharing options...
coltonmil Posted January 10, 2018 Share Posted January 10, 2018 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 http://journals.ametsoc.org/doi/pdf/10.1175/1520-0450(1969)008<0249:TVORA>2.0.CO%3B2 1 Quote Link to comment Share on other sites More sharing options...
Noobini Posted January 10, 2018 Share Posted January 10, 2018 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 !!! 1 Quote Link to comment Share on other sites More sharing options...
Jesper Rahlff Posted January 10, 2018 Share Posted January 10, 2018 Just now, Noobini said: 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 !!! wait you know math now?! ... *throws the towel* Quote Link to comment Share on other sites More sharing options...
Noobini Posted January 10, 2018 Share Posted January 10, 2018 Just now, Jesper Rahlff said: wait you know math now?! ... *throws the towel* well anything that's got pi in it...I'm in.... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.