From: tim r. <bla...@ya...> - 2008-01-27 00:05:58
|
Markus Wondered: >Hi All, > >i am new to pyODE. > >Can i use pyODE for Problems like lifting force at >Water. >For Example i have got a empty Bottle which will be >swim on the Water, >but will be sink if it is filled with Water. My >Programm should calculate >what will happen. Or if something lies on the bottle >and push the Bottle >into the Water. > >Bye Markus I think it's unlikely that you'd find a library to do buoyancy for you. There are, however, libraries to make it relatively easy. Google 3d boolean operations. There is likely an operation that would allow you to find the section of your bottle that is below the water. Then, you find a library to help you find the volume and geometric center of the bottle. multiply the density of the fluid by the volume, and you get the magnitude of the force. Of course it will be pointed straight up, and applied at the center of the underwater portion. This is where ODE comes in. It's possible to feed in the buoyancy force you found, the force of gravity, and whatever other forces you have(an outboard engine?!?) and ODE will tell you exactly what's happening. ODE can easily handle setting soemthing on top of your bottle. It's just a matter of creating something to set on top, detecting collisions, and creating a contact joint as long as they are touching. ODE does all these things easily The other thing ODE can do is detect collisions between the neck of the bottle and the water. This will allow you to use some other method to calculate how much water flows in. I'm not sure what you'd do about the Free Surface Effect of the water inside the bottle(google it if you don't know what I'm talking about). You would certaintly have to add it to your center of gravity for the bottle, and thus to your gravitational force. You may not want to get this detailed. There are calculus methods for calculating how much water goes through a given opening in a given time. I could help you with that if you like. It's a fair bit of work, though, so I'll only help you if you want me to. I really do want you to ask me, because I enjoy this sort of thing, and tend to work problems like this at the slightest provocation :) --Tim Rau ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs |