Aerodynamics in SFS

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Team Kolibri
Modder
TEAM HAWK
Atlas
Deja Vu
Under Pressure
Forum Legend
#77
To avoid unexpected things like centripetal acceleration, i flight stage 1 rocket only vertically. When stage 1 rocket runs out of fuel, i detach it from stage 2 rocket. Then i rotate stage 2 rocket to make it go horizontally. After reaching altitude of 30km, stage 2 ignition starts.
That's a possible strategy, though it's not optimal. But you still have to take into account horizontal speed during your second stage part. It's not complicated however, all you have to do is to consider that the gravity applied to your rocket is g minus a (with my notations above).

I guess we all know who won :D
The maths win, as always :p
 

Catalyst_Kh

TEAM HAWK
Atlas
Fly me to the Moon
Under Pressure
Registered
#78
its a 2 stage rocket. Program starts calculations with stage 2. Stage 2 starts at altitude of 30km and the goal is to orbit payload to a specific altitude. Calculations done in many loops. It starts like this: payload is 100t, initial fuel tank weight is 5t, initial titan engine amount is 1. So, the weight of stage 2 rocket inculing payload is 117t (100t payload, 5t fuel tank, 12t titan engine). Progam simulates these conditions to find out whether this rocket achieves to orbit or not. If not, returns to the beginning of the loop and increases fuel tank weigt 5t and this situation continues until it achieves orbit. If it cant achieve, at some point, T/W ratio will be 1 and it means rocket cant launch. Then program stops to increase tank weight. Instead, increases amount of titan engine 1 and simulation starts with 5t again and so on. This is the loop that designs a proper stage 2 rocket. When the stage 2 rocket is found, our new payload weight is payload weight+stage 2 rocket weight. Now stage 1 loop starts with our new payload weight and it does almost the same calculations to find out a proper stage 1 rocket. When the calculations done, program shows me tank weight and amount of booster for stage 1 and stage 2 separately. I hope i explained with an understandable English :D im not native
I understand the algorithm, you explained it well. My question was about the results. This loop is not endless, it will finish somewhere. So, what are the final result? What mass must be entire launcher at the surface with payload to be able to upload 100 t to orbit after it will burn all it's fuel?
 
#79
I understand the algorithm, you explained it well. My question was about the results. This loop is not endless, it will finish somewhere. So, what are the final result? What mass must be entire launcher at the surface with payload to be able to upload 100 t to orbit after it will burn all it's fuel?
1681235520048.png

it just tells me how stage 1 and 2 rockets should be. Rest is building


1681235579991.png

and this is the final result. I built the rocket using the gravity and orbiting velocity functions Altair gave me. Gravity works flawless, but there is something wrong about orbiting velocity. Fuel were barely enough to orbit at 50km as you can see
 

Catalyst_Kh

TEAM HAWK
Atlas
Fly me to the Moon
Under Pressure
Registered
#81
What is final launcher's weight? Is it 1028.31 tons from the picture?

So if we launch directly upwards and then after escaping atmosphere we will start horizontal acceleration, we need launcher of 1028.31 tons at the start to deliver 100 tons of payload to orbit at the end?

Or now your cargo is 189.11 t minus all casing, which is around 185 tons somewhere? And that 1028.31 t launcher delivers those 185 tons exactly at his last pint of fuel?

Gravity works flawless, but there is something wrong about orbiting velocity. Fuel were barely enough to orbit at 50km as you can see
But having a rocket which will use all its fuel to reach the orbit was exactly the goal, so nothing extra would left. So this is clearly the success. :)
 
#83
If it's just that, I can help you. For gravity, you can use the following formula:
g = g0 / (1 + alt/R)², where:
- g0 is the altitude at ground level (9.8 m/s²)
- alt: your altitude
- R: the Earth radius (R = 315000 meters)

Be careful though, this is not enough, you have to take into account the centripetal acceleration. It's oriented upwards and is opposed to gravity. It's:
a = Vh²/(R + alt)
With Vh: your horizontal speed.

You will notice that you've reached orbital velocity when a and g cancel out.
is there any other magical knowledge you would like to share :)
 

Catalyst_Kh

TEAM HAWK
Atlas
Fly me to the Moon
Under Pressure
Registered
#84
It is. However, i prefer a perfect circle orbit rather than elliptical :D
Change this during acceleration, it will cost just tiny amount of extra fuel.

Anyway i was just curious how much more fuel we need to burn to cover up for not accelerating horizontally at all right from the start. Looks like not too much at all. Simple classic rocket (without extra efficiency tweaks) can bring only 25% of its mass with instant horizontal acceleration right after start, at Normal level of difficulty. With your trajectory it is still close to 20% of payload. Thus generally looks like good take off trajectory is not that important, as good rocket design.

And with best trajectory and best tweaks, which are still not cheats and not bugs using, no clipings, and no edited or custom parts, i could get only up to 30% and no more. But with tweaks it is kind of not realistic rocket design. And classic and realistic-like gives only 25% with best take off trajectory.
 
Last edited:

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Team Kolibri
Modder
TEAM HAWK
Atlas
Deja Vu
Under Pressure
Forum Legend
#85
is there any other magical knowledge you would like to share :)
Yes: π = 355/113

More seriously, in your situation there's not much more I can do to help. The ultimate step would be to estimate the aerodynamics characteristics of a rocket (the cross sectional area) to enter this into your simulation, but I used to do it experimentally: I flew a rocket in a modified atmosphere of uniform density and measured its limit speed. From there I could deduce drag and the cross sectional area. I did it here for example.

But this is experimental and very dependant on the rocket in the end.
 
#86
Change this during acceleration, it will cost just tiny amount of extra fuel.

Anyway i was just curious how much more fuel we need to burn to cover up for not accelerating horizontally at all right from the start. Looks like not too much at all. Simple classic rocket (without extra efficiency tweaks) can bring only 25% of its mass with instant horizontal acceleration right after start, at Normal level of difficulty. With your trajectory it is still close to 20% of payload. Thus generally looks like good take off trajectory is not that important, as good rocket design.

And with best trajectory and best tweaks, which are still not cheats and not bugs using, no clipings, and no edited or custom parts, i could get only up to 30% and no more. But with tweaks it is kind of not realistic rocket design. And classic and realistic-like gives only 25% with best take off trajectory.
From there I could deduce drag and the cross sectional area. I did it here for example.
actually i read it months ago, however,
I finally measured effective surfaces for all pieces, and I tried to summarize my findings in a sheet as clearly as possible. Here it is:
SFS: Aerodynamics

In a few words, drag generated by a piece is proportional to its effective surface. The greater it is, the more drag will be generated.
I also put a comment column to explain when a piece has a special behaviour. But expect this to be like french grammar: exception is the rule!

In particular, some pieces have their drag application point off centered. Those pieces tend to make your rocket flip, even if your design is symmetric. Here is an example:
View attachment 13486
That build is unstable and tends to lean to the right. That's because of the wheels, their drag application center is on the right (no matter how you rotate and place them!).
But if I modify it that way:
View attachment 13487
Now the rocket is perfectly stable! o_Oo_Oo_O
Such pieces have been labeled as "generates instability" in the chart. This is what it means.

I'll make a second message soon to explain things more in detail, but feel free to ask anything if that's not clear, I'll try to answer the best I can :p
does this sheetstill valid?
The density formula used by SFS is:
rho(h) = density × exp(-curve × h/height)
and this?
T = 1/2 × density × S × v^2
can we just use this formula to calculate drag?
 
#87
1681293944249.png

Altaïr i should mention that changing planet properties does not work for my game. At least changing atmosphere height value does not work. After i change it, i open game and its still 30km. Then i open planet data again but there are no planet data files anymore
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Team Kolibri
Modder
TEAM HAWK
Atlas
Deja Vu
Under Pressure
Forum Legend
#88
does this sheetstill valid?
No, you can scrap that.


That part yes.


can we just use this formula to calculate drag?
Yes, but only in the context I described: for a rocket that reached its maximum velocity in an atmosphere with constant density, and with no gravity activated.

View attachment 101768
Altaïr i should mention that changing planet properties does not work for my game. At least changing atmosphere height value does not work. After i change it, i open game and its still 30km. Then i open planet data again but there are no planet data files anymore
Oh, you must not modify the content of the Example folder. It's a folder generated by the game itself so that planet editors have something to start from. You have to make a copy of the Example folder and rename it: this will be your solar system name. Modify it as you wish, then start the game and create a new world based on the system you created. Your changes should be available ingame.

It's strange that your folder is completely empty though...
 
#89
Oh, you must not modify the content of the Example folder. It's a folder generated by the game itself so that planet editors have something to start from. You have to make a copy of the Example folder and rename it: this will be your solar system name. Modify it as you wish, then start the game and create a new world based on the system you created. Your changes should be available ingame.
1681299794724.png

i copied example folder and didnt change it. Used it to create a new world an this is the result
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Team Kolibri
Modder
TEAM HAWK
Atlas
Deja Vu
Under Pressure
Forum Legend
#90
View attachment 101770
i copied example folder and didnt change it. Used it to create a new world an this is the result
Ah, I forgot, that's a known bug. You can use the solar system I posted here then.
Or if you prefer you can add the "version" parameter in each file as I showed in the linked post.
 
#91
Ah, I forgot, that's a known bug. You can use the solar system I posted here then.
Or if you prefer you can add the "version" parameter in each file as I showed in the linked post.
every time i solve a problem, a new problem lands to my earth :D drag is zero since i set curve to zero. Im asking too much questions but nothing comes from my hands other than asking right now :(
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Team Kolibri
Modder
TEAM HAWK
Atlas
Deja Vu
Under Pressure
Forum Legend
#92
every time i solve a problem, a new problem lands to my earth :D drag is zero since i set curve to zero. Im asking too much questions but nothing comes from my hands other than asking right now :(
Strange. What value did you use for density? curve = 0 should just mean that density doesn't vary with altitude...
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Team Kolibri
Modder
TEAM HAWK
Atlas
Deja Vu
Under Pressure
Forum Legend
#96
i tried for curve=10.0, 5.0, 1.0, 0.1 and 0. 10.0, 5.0 and 1.0 are ok, but 0.0 and 0.1 didnt work.
That's surprising... I don't think the curve value would be rounded down, but I should make a try...

rho(h) = density × exp(-curve × h/height)
is h/height means (instant altitude)/(atmosphere height) ?
Yes, exactly.
 
#98
Altaïr I can proudly say that simulation calculates drag force and curve taken as 10 as it should be and thats perfect. PERFECT. I mean, its not perfect of course but it works quite accurately and im very proud my little project. About S coefficient, it is a whole another story but I dont care about it right now.

My first attempt of new version of program worked very well. I had a rocket which has a coefficient of S equals to 2.168367347e-15 which is quite smaller than i expected. I didnt have an expectation though. Anyways, this rocket's main payload was 189.11 tons and i built a rocket to orbit it at 50km. I got the design of rocket from program of course but drag force didnt calculated at that time and these were happening at this morning. After I solved curve=0 problem, i found out the S coefficient for this rocket. At the end, i used this S value with 189.11 tons and 50km altitude values to find a proper rocket design. As i added drag force calculation part to the program, it was obvious that program doesnt give me the exact design for this payload but also i knew that even drag force is important, it does not have an enormous impact on rocket. As i expected, new rocket design got just a little bit more fuel. +15 tons of fuel tank for stage 2 rocket and 22.5 tons for stage 1 rocket. In total, there's a 3.6% of weight increasement. Amount of boosters didnt change. Btw, for 50km altitude goal, calculated altitude is 50.3km and practically it is 49.8. 1% error
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Team Kolibri
Modder
TEAM HAWK
Atlas
Deja Vu
Under Pressure
Forum Legend
I ran a few tests to check that myself...
Spaceflight Simulator_2023-04-13-07-59-34.jpg

And I found that drag behaved very strangely!
Curve set to 0 generates no drag at all indeed, but with a small value (even 0.1) some drag is generated. What is strange is that higher values of curve lead to a higher drag, it should be the opposite since curve is basically a coefficient that tells how fast density decreases with altitude.

I'll check the code to see if there's anything strange in the drag calculation. But I'm really surprised, I made the gliding heat shields mod a while ago, it gave the expected results so I don't know what's going wrong :confused: