NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/

Information about this web site => Request for physics Simulations => Topic started by: tppramod on January 15, 2008, 07:48:13 pm



Title: Simulation of blowing object with debris falling down
Post by: tppramod on January 15, 2008, 07:48:13 pm
Hi,

This is what i need to code in C for which i need to know the physics involved:

Blowing of an object with its debris falling down.  For eg. in one of the classic DOS game, PARATROOPER, by Greg Kuperberg, the enemy paratroopers land on the side of the gun base and blow the gun base.  I want to have a similar simulation.  Any help...

Regards,

Pramod,
New Delhi, India



Title: Re: Simulation of blowing object with debris falling down
Post by: Fu-Kwun Hwang on January 15, 2008, 08:54:34 pm
I am not getting the whole picture of what you really want.
Could you explain it in more detail. May be with a simple diagram will help a lot.
You can upload image file as an attachment.


Title: Re: Simulation of blowing object with debris falling down
Post by: tppramod on January 16, 2008, 11:58:10 am
Sir,

Just managed to get the screenshot: Click Here http://www.bestoldgames.net/eng/old-games/paratrooper.php (http://www.bestoldgames.net/eng/old-games/paratrooper.php).  There are five small screenshots.  Please click the 5th one, which is the snapshot of blowing of gunbase.  I would appreciate if you look at the simulation by downloading the game, which is only 6.60 KB in size.  Here is the link for free download: http://www.dosgamesarchive.com/download/game/203 (http://www.dosgamesarchive.com/download/game/203).  The gunbase is blown once 4-5 Paratroopers land at the base..  so will have to wait till that.. :).  I see this animation different each time its blown.  so got more interested in this simulation. 

Hope u get the clear picture once u see this beautiful simulation.

Thanks n Regards,

Pramod,
New Delhi, India


Title: Re: Simulation of blowing object with debris falling down
Post by: Fu-Kwun Hwang on January 16, 2008, 01:05:16 pm
If you want to have something falling down under gravity.
Just add a gravity as an downward acceleration. ie. Fd= -m*g; // where m is the mass, g is the gravity
To make it more realistic, you can add upward drag force which is proportional to downward speed. i.e. Fu=-b*v;// where b is a constant.
So the total force is F=-m*g-b*v;
The above are physics involved. The rest are up to you how to present in a visual way.
I do not want to download those files.
Because it is a risk to download some executable file form somewhere you did not know and run it in your computer.


Title: Re: Simulation of blowing object with debris falling down
Post by: tppramod on January 16, 2008, 01:39:50 pm
Sir,

Thanks for your reply..   Could u please tell me what is b and v?  I guess v=Velocity right?  i am not an expertise in the subject.  But i have a clear understanding of gravity, velocity and acceleration.  I want to achieve my simulation like this..  All the debris after the blast (each debris being small objects) will move upward in the first instance slightly moving away from one another (i dont know how to calculate that) then ultimately falling down with gravity in the second instance.  So can i achieve both these instances with your suggested formula...  Fd= -m*g; Fu=-b*v; F=-m*g-b*v;   Actually i am not able to relate these formula with the required simulation.


Title: Re: Simulation of blowing object with debris falling down
Post by: Fu-Kwun Hwang on January 16, 2008, 03:09:25 pm
v is velocity and b is just a constant (which should proportional to the cross section of the object ..).
The drag force f=-b*v is a good approximation for relative small velocity.
For larger velocity in air, the drag force will be proportional to square of velocity.
You can check out http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=549.0

If the object need to move upward in the beginning. Just give them an upward initial velocity. Then it should be fine.

How to related those formula to the computer code?
You can use Runge-Kutta 4-th order method (library are available on the web).
If you use the EJS (Easy Java Simulation) tool, you just need to provide the equation and EJS will generate all the code for you. But if you want to code it with C by yourself.  You need to know how to do the numerical calculation with computer code or just copy existing library/code.


Title: Re: Simulation of blowing object with debris falling down
Post by: tppramod on January 16, 2008, 04:27:17 pm
Thanks a lot for your valuable inputs.  Let me try coding at my end..  will revert in case of trouble.

Regards,

Pramod


Title: Re: Simulation of blowing object with debris falling down
Post by: jeff_forssell on May 07, 2009, 02:49:36 pm
The topic here gave me the idea that it might be about "winnowing" which is the process where some one cleans harvested seeds from chaff and dirt by throwing or pouring the mixture while there is a wind. The lighter stuff blows away.

THAT would be a more constructive thing that I would like to see.