Code center > Suggestions

Swimming physics and drag

(1/2) > >>

Numsgil:
I'm playing around with the equations for swimming physics and drag.  I think this is on the top of your todo list, too, Eric.  Anyway, I found this article helpful.  Check out pages 8 to 10.  It talks about this integral:

Drag Force = Int((n dot v) * n) dS over the surface (S) of the body, using the instantaneous velocity (v) of the point (dS) in question and the normal (n) to the surface.  For ties the normal is constant, the instaneous velocity is easily arrived at by lerping the velocities of either bot, and the length is simply bot2.pos - bo1.pos.  So I think we can build an equation that is physically accurate to allow for swimming motions in the present version.  I don't think it will properly take in to account the energy needed to move the tie to produce the motion in the first place, but it's a start.

I'll try to plug it in to Maple when I get home tonight to arrive at a closed form for a drag force from the tie on either bot.

bacillus:
Oooh, I'm exited!! Now all we need is collisions, and the ties will be totally realistic!

Numsgil:
The paper wasn't as much as I'd hoped.  It just ended up resolving down to the same dang problem I've been wrestling with for 3 years.  Good news, though, is that I know more now than I did before.  I think this is the answer: (looks right, too.  Something this simple from so much work fulfills some sort of cosmic edict)


--- Code: ---let v = (v1 + v2)
 
 F1 = -b * L / 6 * (v + v1) dot n
 F2 = -b * L / 6 * (v + v2) dot n
 
 where b is the drag coefficient, L is the length of the tie, v1 and v2 are the velocities of either body (vectors), respectively, and n is the normal for the tie (vector), and F1 and F2 are the forces to apply to bot 1 and 2, respectively.
--- End code ---

Doing some more tricks, you can combine the n and L term in to a single vector that is simply:


--- Code: ---normal = (pos2 - pos1)
 normal = Vector(-normal.y, normal.x);
--- End code ---

and just implicitly scale the b term by 1/6 (since it's arbitrarily chosen anyway)

and arrive at just:

--- Code: ---F1 = -b * (v + v1) dot normal
 F2 = -b * (v + v2) dot normal
--- End code ---

Also attached is the maple worksheet I used, if anyone is particularly interested.

gymsum:
I'm not 100% certain I remeber everything from physics, so I haev to ask.

Does this acount for multiple shapes in DB? I had an idea if it doesnt. It seesm we have several options for defining a shape in DB, and it seems we should be able to make multiple types of shaped bots; oblong ones, and circular ones. Regardless of which method is implemented, we have 3choices for equations to define the normal surface of a shape usign conics.

Set A:


--- Code: ---(X-H)^2+(Y-K)^2=R^2 (taken from a^2+b^2=c^20
where h = horizontal shift from center; k =  vertical shift, and r is radious of full circle - the square of the shifts.
--- End code ---

Set B:


--- Code: ---AX^2+AY^2+BX+CY+D=0
the break down of the polynomial:{ X(AX+B),(AY+C), D } = 0
--- End code ---

Set C:


--- Code: ---(X-H)^2)/A^2+(Y-K)^2/B^2=1
where h and y are horizontal and vertical point shifts for the center, and A is horizontal component of radius and B is vertical component of radius
--- End code ---

I think those explinations are correct... Also I believe that mass adds to drag and should be used for inertia of drag, this would allow for you to calculate things like slipping force, which is the critical speed before a bot doesn't have enough drag force to steer. Not sure what you're calling the normal, is it the surface of the bot and tie? Or is it the normal angle of a tie?

EricL:
This topic is really useful.  Thanks guys.  Short on tiem at the moment, but I may dive into this next week.

Navigation

[0] Message Index

[#] Next page

Go to full version