Mathematical Equation into Thyme

If you have problems installing or running Algodoo, have found a bug or need in-game help - this is it!

Mathematical Equation into Thyme

Postby xplane80 » Mon Feb 08, 2010 9:57 pm

How would I put this equation into thyme:-
Image

I'm trying to code air pressure into algodoo but I need to know how input this as thyme.

If you cannot do this one, here is same equation but written differently:-
Image


Source:
http://en.wikipedia.org/wiki/Atmospheric_pressure
Image<- Designed by PhysicsGuy
User avatar
xplane80
 
Posts: 498
Joined: Mon Aug 31, 2009 7:28 pm

Re: Mathematical Equation into Thyme

Postby link0007 » Mon Feb 08, 2010 10:32 pm

1) what do the variables mean (and what datatypes are they)
2) what's so special about the equation that you can't do it?

power = (G0*M)/(Rstar*Lb)
P = Pb*Math.Pow((Tb/(Tb+Lb*(H-Hb))),power)

Something like that should work if they're all floats and the dot is a normal multiplication.
Link: "Surely somebody hates Walter Cronkite.."
Sonic: "Probably.. But somebody hates everyone."
:D
User avatar
link0007
 
Posts: 408
Joined: Thu Jun 11, 2009 2:45 pm

Re: Mathematical Equation into Thyme

Postby xplane80 » Mon Feb 08, 2010 11:08 pm

Hb changes :-

The value of subscript b ranges from 0 to 6 in accordance with each of seven successive layers of the atmosphere shown in the table below. In these equations, g0, M and R* are each single-valued constants, while P, L, T, and h are multivalued constants in accordance with the table below. (Note that according to the convention in this equation, L0, the tropospheric lapse rate, is negative.) It should be noted that the values used for M, g0, and R * are in accordance with the U.S. Standard Atmosphere, 1976, and that the value for R * in particular does not agree with standard values for this constant.[7] The reference value for Pb for b = 0 is the defined sea level value, P0 = 101325 pascals or 29.92126 inHg. Values of Pb of b = 1 through b = 6 are obtained from the application of the appropriate member of the pair equations 1 and 2 for the case when h = hb + 1.:[7]
Subscript b Height Above Sea Level Static Pressure Standard Temperature
(K) Temperature Lapse Rate
(m) (ft) (pascals) (inHg) (K/m) (K/ft)
0 0 0 101325 29.92126 288.15 -0.00649 -0.0019812
1 11,000 36,089 22632 6.683245 216.65 0.0 0.0
2 20,000 65,617 5474 1.616734 216.65 0.001 0.0003048
3 32,000 104,987 868 0.2563258 228.65 0.0028 0.00085344
4 47,000 154,199 110 0.0327505 270.65 0.0 0.0
5 51,000 167,323 66 0.01976704 270.65 -0.0028 -0.00085344
6 71,000 232,940 4 0.00116833 214.65 -0.002 -0.0006097
Image<- Designed by PhysicsGuy
User avatar
xplane80
 
Posts: 498
Joined: Mon Aug 31, 2009 7:28 pm

Re: Mathematical Equation into Thyme

Postby link0007 » Mon Feb 08, 2010 11:45 pm

Yeah so? What's the deal?
you can figure this out by yourself. I'm pretty sure you're just too darn lazy to write *all those lines of code*.

So closed until you come up with the stuff YOU tried, and why it didn't work (pm that to me).
Link: "Surely somebody hates Walter Cronkite.."
Sonic: "Probably.. But somebody hates everyone."
:D
User avatar
link0007
 
Posts: 408
Joined: Thu Jun 11, 2009 2:45 pm


Return to Help / Bug reports

Who is online

Users browsing this forum: No registered users and 1 guest