Jump to content

Mini-challenge: max altitude with this supplied spacecraft


Recommended Posts

I think PakledHostage is using the conventional/terrestrial definition of cDA which is basically 2*FD/ (density x v2), so includes KSP\'s mass term. But I could be wrong...anyway your numbers check out with mine.

I\'m using the drag coefficient values that are given in the game\'s VAB. I assumed that they were drag areas (CdA), in which case the equation for drag would be:

5lvVO.png

I understood that, in the game\'s simple physics model, the total drag of the spacecraft is just the sum of the individual drag coefficients. Based on that understanding, I used a value of 1.1 for the spacecraft configuration shown in my post above.

In the aircraft world, Cd is dimensionless and drag area (CdA) has units of area. The units of Fd in the equation above are force. I was not aware that there are other forms of the aerodynamic drag equation.

I will have a look at the other threads listed above. I\'ve been away from the KSP forums for a month or so. I may have missed those other discussions.

In the mean time, I ran another test with a different configuration and got different results. Something is obviously wrong with my drag model (or with my interpretation of the drag coefficients given in the game).

PH.

Link to comment
Share on other sites

hmm but then wouldn\'t you have to give less thrust as the time increases, since the weight of the ship is getting lower, but the graph of kosmo suggests he\'s increasing thrust. Which makes more sense obviously. What am i missing here ?

Link to comment
Share on other sites

I made some changes to my spreadsheet, and have a ascent profile very close to optimal. Here are some graphs for you guys. Max altitude in that graph is 34,577. Of course, with history dependent data, it doesn\'t perfectly match real KSP conditions.

goddard2.png

goddard1.png

So... anyone want to fly this profile and report back?

Link to comment
Share on other sites

An amazing piece of work!

2 comments for now:

- Could you please explain the formula for and units for 'efficiency' in the spreadsheet

- if you calculate a new column = 2+2*accel/g, you\'ll see that with the exception of launch acceleration, it closely tracks your TWR column, so indeed your are optimizing instantaneous efficiency for most of the flight, as expected.

Link to comment
Share on other sites

The efficiency column I was only messing with. I don\'t know if that formula is a useful measure of efficiency. The only thing I\'m optimizing on that spreadsheet is matching drag force to gravitational force. As you can see, it still needs a tiny bit more work. After that is done, then it\'s time to move onto the 2 dimensional ascent trajectory.

Link to comment
Share on other sites

I suggest that fuel efficiency be measured in km/unit mass (unit mass = 1 command pod, taken as 1kg if you like).

overall efficiency = {total distance traveled over some defined path} / {total fuel spent}

instantaneous efficiency = speed/(mass loss rate) = v/m-dot = v/Thrust x ve where ve is the effective exhaust speed of the engine (= specific impulse, 5692 m/s for a liquid fuel engine).

Link to comment
Share on other sites

Ah, okay. And Fg?

I thought Force of gravity, but that doesn\'t seem to look right; I don\'t see why it would change to a linear plotting.

Also grad drag force doesn\'t look right either. Why the drop off around 17km? I thought the first atmosphere layer was around 13km

Edit: Ah, okay. I see that fuel runs out around 17km and so your craft is slowing down. I haven\'t tried this challenge yet, so I was unaware

Link to comment
Share on other sites

Ah, okay. And Fg?

I thought Force of gravity, but that doesn\'t seem to look right.

Also grad drag force doesn\'t look right either. Why the drop off around 17km? I thought the first atmosphere layer was around 13km

Fg is the weight of the rocket. FD drops off rapidly after 16km because the rocket has run out of fuel.

@ closette

I\'ll fiddle around with defining the efficiencies later today.

Link to comment
Share on other sites

That excel sheet is a great piece of work! What I don\'t understand yet is why you would want to set the drag equal to gravity - is there any apparent reason for that? It seems to work, but I can\'t really see why.

I\'ve been trying to write a little program that optimizes the throttle setting by solving the ODE for a given thrust curve and then inverting for it. Unfortunately, I\'m not that good with inverse methods, and my Monte Carlo approach has failed miserably - never got above 30km, and that\'s clearly not optimal. I\'ll keep working on it though.

Link to comment
Share on other sites

Got it. You posted this moments before I updated my post :P

So why doesn\'t the graph reflect the change in atmosphere at 13km? Is it not that significant? Or does the drag linearly degrade across the whole flight?

I\'ve always assumed the drag would degrade exponentially since it\'s held by gravity. That\'s just been my assumption, I\'ve never looked that up or anything

Edit: Waaaaait it does curve doesn\'t it. Veeeeerrry slightly

Link to comment
Share on other sites

That excel sheet is a great piece of work! What I don\'t understand yet is why you would want to set the drag equal to gravity - is there any apparent reason for that? It seems to work, but I can\'t really see why.

I\'ve been trying to write a little program that optimizes the throttle setting by solving the PDE for a given thrust curve and then inverting for it. Unfortunately, I\'m not that good with inverse methods, and my Monte Carlo approach has failed miserably - never got above 30km, and that\'s clearly not optimal. I\'ll keep working on it though.

Watch this post here in a couple hours, and I will explain how I optimized my throttle settings. I have to go to my heat transfer class right now.

Link to comment
Share on other sites

Got it. You posted this moments before I updated my post :P

So why doesn\'t the graph reflect the change in atmosphere at 13km? Is it not that significant? Or does the drag linearly degrade across the whole flight?

I\'ve always assumed the drag would degrade exponentially since it\'s held by gravity. That\'s just been my assumption, I\'ve never looked that up or anything

It does change exponentially. That\'s not a straight line you\'re looking at.

Link to comment
Share on other sites

I\'ve heard that the optimal velocity to be climbing at is one which the drag force equals the weight of the rocket.

That being the case, the velocity a rocket should follow for maximum efficiency is given by the attached equation. All that\'s missing is an equation describing mass as a function of time, which is different for every rocket.

Link to comment
Share on other sites

@jebbe and others, if I may fill in for Kosmo-not while he is in class:

That excel sheet is a great piece of work! What I don\'t understand yet is why you would want to set the drag equal to gravity - is there any apparent reason for that? It seems to work, but I can\'t really see why.

See the attached derivation (in PDF format). I got tired of trying to format the equations within the message board.

Link to comment
Share on other sites

@thosesneakyfrench,

In the Kerbal universe the mass cancels out in the equation for terminal velocity (which is the same as the TWR=2 velocity), since the drag force is proportional to mass, unlike the real world.

i.e.. for a single object, FD = 1/2 x maximum_drag x m x density x v2 as was verified in threads referenced above,

and of course the weight Fg = mg

Set these equal and you will find that v2 = 2 mg / (m x density x maximum_drag) = 2 g / (density x maximum_drag). You can see how the mass m cancels out. For an assembled spacecraft replace the maximum_drag with a mass-weighted average of all the parts\' maximum_drag factors, which usually results in a value of 0.2-0.3.

This is also why an empty and a full SRB will fall together, unlike in reality.

For a rocket with maximum_drag = 0.2, I find the terminal speed is well described by the equation vT=97.8 m/s exp(+height/9891m). The reason why the scale height is not 10000m is due to the small decrease in gravity at higher altitudes.

Link to comment
Share on other sites

My interpretation of the drag equation for KSP is that mass = area. It makes perfect sense for me, since empty tanks fall at the same rate as full ones in an atmosphere.

I had another look at the data from my second drop test after reading through the two threads that Closette quoted on page 2 of this thread. It seems that my data actually does agree with your equation and my data also supports your results. The difference can be explained in the relative magnitudes of the our differing Cds. Your Cd = 0.2027 is about 18% of my Cd = 1.1, while my 'density scaling parameter' of 0.0017 is about 17% of your 0.0098.

And as to why my second test didn\'t agree with the predicted values, I think I also figured that out. On a hunch, I removed the Cd term from the drag equation, leaving:

OOBl1.gif

I then moved your Cd value of 0.2027 into to the density equation by multiplying your 'density scaling parameter' of 0.0098 by 0.2027 to get 0.001986. The game\'s atmospheric density equation is then approximated as:

xV8bq.gif

Using these two equations in my spreadsheet, I then compared the predicted altitudes and velocities for the two (very different) ship configurations with the measured values. Both tests showed very good correlation (apoapsis, for example, matched within about 20 m).

So, my conclusion is that the Cd terms given in the VAB are not used in the game\'s drag equation. (At least not directly. I know that there is some variation depending on how the craft is oriented relative to the direction of travel, but I only tested cases where the spacecraft was kept oriented straigt up and down by the SAS). Instead, the drag equation seems to be solely a function of density, mass and velocity as given above.

Can anyone independently verify this? Maybe we could do a drop test using a modified version of foamyesque\'s FAKOOM lander legs? I had a look to see if I could readily modify them, but it wasn\'t obvious to me how to do it.

I\'ll update this post with my plots and data when I get a chance.

PH.

Edit: Added suggestion on how we could do further systematic testing.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...