I'm going to bang this out in English units because that's what I have a feel for and so am less likely to make an embarrassing mistake.
Let's use the thrust equation for non-airbreathing engines, copied from here From the General Thrust Equation towards Tsiolkovsky, how to explain dropping these terms along the way?
$ \ \ \ F = \dot{m}_\mathrm e V_\mathrm e + (p_\mathrm e - p_0) A_\mathrm e$
The first term to the right of the = is the momentum thrust. It's constant for a given throttle setting for what we are doing here.
You give:
- $F_v$ = 1,849,500 lbf
- $F_s$ = 1,710,000 lbf
We can solve for the exit plane area by filling in what we know in the two equations and subtracting one from the other. That gives us an exit plane area (for all nine engines) of 66 $\text{ft}^2$.
An (unsourced) answer to this question Temperature and pressure of rocket exhaust gives the Merlin exit plane pressure as 0.7 atm.
Now we can calculate the momentum thrust term $\dot{m}_\mathrm e V_\mathrm e$ to be 1,751,703 lbf.
Quick sanity check: the momentum thrust you calculate should be bigger than the sea level thrust and less than the vacuum thrust.
With that and a handy-dandy atmosphere table we have all we need.
I rounded off everything so the numbers don't match exactly. Just walk through what I did, using your units of choice. Then in your program use the momentum thrust, exit plane pressure, and exit plane area that you calculated in the thrust equation, and plug in an ambient pressure that you got by your method of choice.
Altitude |
Ambient Pressure |
Thrust |
0 ft |
2117 $\frac{\text{lbf}}{\text{ft}^2}$ |
1,709,793 lbf |
50K ft |
241 $\frac{\text{lbf}}{\text{ft}^2}$ |
1,833,609 lbf |
100K ft |
23 $\frac{\text{lbf}}{\text{ft}^2}$ |
1,847,997 lbf |
Infinity and beyond |
0 $\frac{\text{lbf}}{\text{ft}^2}$ |
1,849,515 lbf |
Plot of thrust (lbf) vs altitude (Kft)