lift during inverted loop

About advanced scenes, and the Thyme scripting language used in Algodoo.

lift during inverted loop

Postby RaRaMalum » Fri Jan 15, 2010 8:45 am

I'm about to make a solid state wing(it won't have any moving parts), but I'm having a bit of a problem.

lets say I give the wing a lift ratio of 5 to 100, this means for every 100 meters it will lift 5 meters.
I can easily achieve this with a bit of e.normal trickery.

Now lets say that the plane goes into an inverted loop, the wing won't support the plane but rather trow it even further outwards in the loop.

one solution I've come up with is using 2 lasers on that "reverses" the wings behavior during the reversed loop, but then I meet another problem, how will the wing know that this is infact happening?

I guess this is asmuch a math question as it is a thyme question.... but my tired brain can't figure a solution.

EDIT:
The wing now knows the xy speed it has and the overall speed(can add more if you feel it needs it).
Phundamentalists, come to the dark side.
We have much cooler toys.
User avatar
RaRaMalum
[Best newcomer 2010]
 
Posts: 280
Joined: Mon Aug 31, 2009 10:47 pm

Re: lift during inverted loop

Postby Kilinich » Fri Jan 15, 2010 9:34 am

RaRaMalum wrote:I'm about to make a solid state wing(it won't have any moving parts), but I'm having a bit of a problem.


I don't see any problem at all. You always know angle of wing (from e.normal), speed, position.

So just write function:
scene.my.wingForce = (wPos, wAngle, wVel) => {...}
with result ([forceX,forceY], momentum)

Define aerodynamics of wing and use vectors operations for calculating result forces.

Is your question was about how to calculate angle from e.normal or I misunderstood something?
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia

Re: lift during inverted loop

Postby RaRaMalum » Fri Jan 15, 2010 9:51 am

Kilinich wrote:I don't see any problem at all. You always know angle of wing (from e.normal), speed, position.

So just write function:
scene.my.wingForce = (wPos, wAngle, wVel) => {...}
with result ([forceX,forceY], momentum)

Define aerodynamics of wing and use vectors operations for calculating result forces.

Is your question was about how to calculate angle from e.normal or I misunderstood something?


I might be to tired or stupid to understand what you just said, but the problem isn't getting lift, its getting "lift" from the wing when its upside down or in an inverted loop.

a simple wing that gives lift would look something like this:
Code: Select all
scene.addcircle({ something, something, vel := xyspeed + (e.normal * 5)


that would give constant lift, but it wouldn't be able to fly upsidedown or an inverted loop.
Phundamentalists, come to the dark side.
We have much cooler toys.
User avatar
RaRaMalum
[Best newcomer 2010]
 
Posts: 280
Joined: Mon Aug 31, 2009 10:47 pm

Re: lift during inverted loop

Postby Kilinich » Fri Jan 15, 2010 10:02 am

Not so easy.
Lifting force depends on angle between wing normal vector and speed vector.
Means you need a vector multiply to find a projection of speed vector to wing e.normal vector, add constant lifting force and find result force. Plus, if you want to make it real, consider on speed proportional and altitude - depend force.
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia

Re: lift during inverted loop

Postby Kilinich » Fri Jan 15, 2010 10:04 am

OK, I'll write appropriate function :idea:
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia

Re: lift during inverted loop

Postby RaRaMalum » Fri Jan 15, 2010 10:20 am

Kilinich wrote:Not so easy.
Lifting force depends on angle between wing normal vector and speed vector.
Means you need a vector multiply to find a projection of speed vector to wing e.normal vector, add constant lifting force and find result force. Plus, if you want to make it real, consider on speed proportional and altitude - depend force.


That script was just added to make my point. You've seen my test thruster so you know I will add lift proportional to speed(not sure I'll bother with altitude).

For those that haven't seen my thruster(it contains alot of the thyme that will be used in the wing):
Rating: rated 5
Filesize: 13.25 kB
Comments: 4
Ratings: 1
download
Phundamentalists, come to the dark side.
We have much cooler toys.
User avatar
RaRaMalum
[Best newcomer 2010]
 
Posts: 280
Joined: Mon Aug 31, 2009 10:47 pm

Re: lift during inverted loop

Postby Kilinich » Fri Jan 15, 2010 11:48 am

RaRaMalum wrote:a simple wing that gives lift would look something like this:
Code: Select all
scene.addcircle({ something, something, vel := xyspeed + (e.normal * 5)

that would give constant lift, but it wouldn't be able to fly upsidedown or an inverted loop.


Simplifyed code is:
Code: Select all
scene.addcircle({ something, something,
  vel := xyspeed + (e.normal * (-1) * (e.normal(0)*xyspeed(0) + e.normal(1)*xyspeed(1)))})

As you can see - there is no constant lifting force - it calculates from flying direction and speed. You can add a constant or just preset wing to non-zero attack angle.
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia

Re: lift during inverted loop

Postby RaRaMalum » Fri Jan 15, 2010 7:12 pm

Thanks alot.

That seems to work great.
let me do some tests.
Phundamentalists, come to the dark side.
We have much cooler toys.
User avatar
RaRaMalum
[Best newcomer 2010]
 
Posts: 280
Joined: Mon Aug 31, 2009 10:47 pm

Re: lift during inverted loop

Postby Antotabo » Tue Jan 26, 2010 1:19 am

Take a look at my wing, the script is in the K-probe.
I think it is what you want. The red and green circle provide lift and drag based on calculation in the k-probe.

Rating: rated 7.4
Filesize: 80.61 kB
Comments: 11
Ratings: 8
download


As you can see, this get very complex to simulate a wing, and its not yet perfect.

There is a page where aerodynamics get explain a bit if you wanna see.
viewtopic.php?f=16&t=589
Antotabo
 
Posts: 54
Joined: Tue Sep 01, 2009 6:27 am


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 16 guests

cron