Math question - Formula for Exponential Graph Calculation

  1. ‹ Older
  2. 5 months ago

    Julen I

    Oct 5 Europe

    If you are going to let other people use your application, and they will get an estimate of the pressure from it, which can be used to design critical parts of the rockets, and you know that estimate may not be good (thinking about the effect of people using different propellants), I would let the user know the estimate may be off significantly (if that's the case).

    Just in case.

    This looks like a fun project, by the way.


  3. Steve,

    In case you are interested in including the chamber pressures from the other propellants on the page, I digitized and curve fit them. The results were:

    KNSB fine-grind
    result = -263.364815 + (9.336753*Kn) - (0.067671*Kn^2) + (0.000244*Kn^3)
    correlation coefficient = 0.998994

    KNSB granular
    result = -13.481586 + (1.101821*Kn) + (0.001619*Kn^2) - (0.000001*Kn^3)
    coefficient of correlation = 0.999997

    result = -805.695628 + (27.906111*Kn) - (0.294536*Kn^2) + (0.001434*Kn^3) - (0.000003*Kn^4)
    correlation coefficient = 0.998449

    KNER granular
    result = -19.268863 + (0.371073*Kn) + (0.001719*Kn^2)
    correlation coefficient = 0.999996


  4. 4 months ago

    Steve K

    Oct 9 Melbourne, Australia

    Thanks Dennis for doing all that.

    I can't get it all working though, and I'm not sure why. I don't want to seem ungrateful, but now that I see the potential, it's better than just having one propellant (KNSU).

    For a basic test, I'm using a Kn value of 252.78 very close to 250. The data is from previous worked tests.

    KNSB fine gound: 1713.8 (not correct)
    KNSB granular: 352.3 (looks correct)
    KNDX I get: -1658.4 (not correct)
    KNSU I get: 858.9 (looks correct)
    KNER 184.4 (looks correct)


    I'm not sure if it's something I've done, or a limitation in FileMaker.

  5. Steve,

    You didn't do anything wrong. I too quickly leapt to the wrong conclusion based on a print out that rounded some coefficients to only 6 decimal places.

    Use the following:

    KNSB fine-grind
    result = -263.364815 + (9.336753*Kn) - (0.067671*Kn^2) + (2.439214*10^-4*Kn^3) - (3.607539*10^-7*Kn^4) + (1.86522*10^-10*Kn^5)

    result = -805.695628 + (27.906111*Kn) - (0.294536*Kn^2) + (1.434205*10^-3*Kn^3) - (3.031777*10^-6*Kn^4) + (2.320255*10^-9*Kn^5)


  6. Robert W

    Oct 9 Western Canada
    Edited 4 months ago

    I strongly advise against trying to use such a high order polynomial to fit so few data points. What you'll find is that the resulting function can and will do a lot of wiggling between your sample data points. It may fit the sampled points more accurately, but it won't fit the intermediate segment nearly as well. To fit such smooth curves as the original graphs, you shouldn't require anything more than a cubic (3rd order) polynomial. Also, do not try to extrapolate outside of the range of the original graph. High order polynomials tend to explode as soon as you get outside the fitted area.

    See Overfitting .

  7. Steve K

    Oct 10 Melbourne, Australia
    Edited 4 months ago

    Thanks Dennis - That now works great! This FileMaker solution is working the best it ever has.

    I've considered re-writing this in Xojo. Instead of the numeric input shown above (FileMaker 5.5 circa 2001), I could have a dynamic visual display using a slider, showing the actual grain geometry... "big fat tyres, and everything" etc... It may well be my next project using Xojo. dunno.

    Thanks Robert, I understand that it won't be perfect. I can't do perfect, and the user can't do perfect either for the reasons explained previously, there are too many variables. But what I have now is very acceptable. I will have a message box alerting the user to the limitations.

    When the user selects the red question mark next to the propellant type list, they'll get this message box:


    The second last paragraph in that message box is obviously bollocks, but on occasion I do like to antagonise the User and sometimes deservedly so I think :).

    Jokes aside, I think it's way way better than where I was a week ago, creating some sort of slicing average.


  8. Julen I

    Oct 10 Europe
    Edited 4 months ago

    @SteveKelepouris I understand that it won't be perfect. I can't do perfect

    That's not the point. If you haven't, check the link to overfitting in Robert's post.

    You should plot those fitting curves and see how they match the overall shape of the dataset. Maybe Dennis has done this and he can confirm the fitting curves adjust well to the data.

    I was tempted to write about this potential issue here before, but didn't do it because only cubic polynomials had been used.


  9. Steve K

    Oct 10 Melbourne, Australia
    Edited 4 months ago

    Julen, much appreciated but you misunderstand MY point.

    It's not about perfection in this case.

    Are you saying that if I can't have perfection, then I should just abandon the whole idea?


    I've checked via "empirical" methods and the results are valid and more than adequate. What is the issue?

  10. Jean-Yves P

    Oct 10 Pre-Release Testers, Xojo Pro Europe (France, Besançon)

    as we know the exact formula from the firsts posts, we should use it instead of a polynomial approximation ...

  11. Steve K

    Oct 10 Melbourne, Australia

    And we need to know C* which can ONLY be known through actual testing.

  12. Jean-Yves P

    Oct 10 Pre-Release Testers, Xojo Pro Europe (France, Besançon)

    if you can draw a chart of the function, then you can calculate C*

  13. Steve K

    Oct 10 Melbourne, Australia

    Ok, we're possibly going around in circles.

    Finally I've found on Richard's website the instrument (Crawford Strand Burner) that was used in determining the Kn. Pressure tests were done using a "strand" of various fuels in a container pumped with Nitrogen.

    Most of us don't have access to that sort of equipment, therefore the best we can do is to use the recorded documented data for our own methods. Pretty much similar problems to most scientific research.

    There is no way I can do this, therefore I can only make "assumptions".

    Sometimes you have to be pragmatic. The trick is to know when to be, or when to be accurate.

  14. Julen I

    Oct 10 Europe
    Edited 4 months ago

    @SteveKelepouris Are you saying that if I can't have perfection, then I should just abandon the whole idea?

    Not at all, I still believe you are not getting Robert's point.

    This image shows Robert's point: -image-
    You can fit different expressions to your experimental data. If you use polynomial expressions, the higher the order of the polynomial, the lower the fitting error (the higher the R value), but as the image shows, a lower error doesn't necessarily mean a more correct fit. In that image, if we were to estimate the value of the studied magnitude (vertical axis) at around a value of -4.5 for the parameter in the horizontal axis using the fitting curve (the line in blue), the estimated value would be very bad. If we used the linear fitting curve for that, the estimation would be much better.

    How can one know if the fitting curve is correct? Plot the experimental data and the fitting curve on the same plot, and compare them.

    Concerning the "exponential" expression that has been mentioned in several posts:

    @Jean-YvesPochez as we know the exact formula from the firsts posts, we should use it instead of a polynomial approximation ...

    @SteveKelepouris And we need to know C* which can ONLY be known through actual testing.

    Maybe I am not getting all the intricacies that play a role here, and if that's the case I apologize for the noise. But, that "exponential" expression can be reduced to: Po=A*Kn^B where A is a constant, A=(a/alpha*rho*c)^(1/(1-n)) (all those are constants, right?), and B is another constant, B=1/(1-n). That is not an exponential, but a polynomial with a non integer exponent. You can fit your data, get A and B and you are done.

    The data posted by Dennis (shown below) are best fitted by A=0.246785767 and B=1.473602726.

    @Dennis H Steve,
    57.6, 94.2
    75.0, 143.0
    92.1, 194.9
    109.7, 254.6
    127.0, 311.3
    144.3, 375.0
    161.7, 444.8
    179.0, 518.1
    196.3, 591.3
    213.7, 666.4
    231.0, 746.7
    248.4, 834.8
    265.7, 923.8
    283.5, 1015.7
    299.6, 1099.2
    319.3, 1204.8
    336.6, 1309.5
    353.5, 1403.5
    371.3, 1512.0
    387.1, 1608.0

    However, that polynomial expression will not satisfactorily fit the experimental datasets corresponding to the fine ground KNSB and the KNDX, because of the shape of those curves (I haven't tried it, though). Interestingly, these are the two datasets you are having trouble with for the estimate of the pressure:

    @SteveKelepouris KNSB fine gound: 1713.8 (not correct)
    KNDX I get: -1658.4 (not correct)

    I would recommend using a polynomial for those (or even for all of them, it wont make a difference), using the lowest polynomial degree that gives you a decent estimate (maybe those given by Dennis already do this). A polynomial with integer exponents, that is.


  15. Edited 4 months ago

    In general, I agree with Robert's comments, especially the warning against extrapolation. In this case however, I think the 5th degree polynomials are reasonable. Below (if the images appear) are plots showing the digitized data points and the cubic and 5th degree regressions.



    A plot of the derivative of the KNSB fine grind 5th degree polynomial does not show any evidence of wobbling between data points.


    If there are still concerns about the 5th degree regression the cubic regressions are:

    KNSB fine-grind
    result = 196.4414 - (1.223419*Kn) + (0.012246*Kn^2) - (9.157754*10^-6*Kn^3)

    result = 236.859658 - (3.372982*Kn) + (0.0275866*Kn^2) - (3.276711*10^-5*Kn^3)


    Finally got the images embedded!

  16. All right, I guess I need to learn how to embed an image. Right clicking on the image link and selecting open image in new tab works.

    Any hints on how to embed the images in the post?


  17. Steve K

    Oct 10 Melbourne, Australia

    I'm a fish out of water here, but all is good.

    Approaching 1am and time to turn in for the night.


  18. Anthony D

    Oct 10 Pre-Release Testers, Xojo Pro Seattle WA

    Hi Dennis - There’s a sticky post in forum issues with posting tips:

  19. Julia T

    Oct 10 Sandy Hook, Connecticut

    This is one of the most educational threads ever!

  20. Steve K

    Oct 12 Melbourne, Australia

    If only I understood it all :)

  21. Steve K

    Oct 14 Melbourne, Australia
    Edited 4 months ago

    I know the original question was a Math question, but I guess it's not as simple as that. I'm not saying the Math is simple (I don't even half understand it). What I'm saying is that the problem itself is not a simple one. That's because there are too many variables in making the propellant.

    In Richard Nakka's notes accompanying the graphs, he explains the requirements for creating the propellant:

    • the propellant must be heat cast
    • the oxidizer must be finely ground (except as noted) such that 50% of the particles are less than 75 micron and the remaining 50 less than 250 micron (e.g. fully ground by an electric coffee grinder) Where specified granular oxidizer, 90% of the particles are in the range of 300-600 microns.
    • the constituents must be very well blended prior to casting (e.g. 1 hour per 100 g. in a rotating mixer) be of the standard 65/35 O/F ratio
    • the mass density ratio of the cast propellant should be in the range of 94-98% of theoretical

    blah blah blah, etc. etc. etc.

    There is pretty much no way that the average amateur rocket enthusiast could adhere to those standards. Therefore, perhaps I shouldn't have posted the question anyway. I was just thinking out aloud about the possibilities - there is nothing wrong with the math as far as I can see. The results work great with the posted formulas. Thank you.

    The reality is that a "given propellant" using the same composition that I make, will not be the same as you make.

    If I can indulge you further, let's take the propellant KNSU as an example. In this case "KN" has nothing to do with "Kn" It's just an unfortunate confuction.

    KN is KNO3 (Potassium Nitrate - the Oxidiser)
    SU is Sucrose (the Fuel)
    A good working standard ratio is: KN65/SU35, ie. 65% KNO3 + 35% SU

    There are various methods used to combine those two ingredients into a working propellant (in short):

    • The Dry Method
    • The Melted Method (Nakka)
    • The Dissolved-Recrystalised Method

    The graphs are "particular" to his method (melted).

    What I've learned from this thread is that there is Math that can be used to "reverse engineer" a known "graph" and someone (you guys) can come up with a formula than can be used to predict the outcome!! . . . Amazing!!!

    Well, It's a great thing to know, in that it CAN be done. :)


    And I'm using it in my current app - with a disclaimer regarding the accuracy.

or Sign Up to reply!