sonofeft / RocketCEA

RocketCEA Wraps The NASA Fortran CEA Code
GNU General Public License v3.0
91 stars 34 forks source link

Change the AP from fuel to oxidizer #17

Closed ina111 closed 2 years ago

ina111 commented 2 years ago

I would like to thank you for the wonderful OSS project you have created. I'm already using it practically and I really appreciate it. It is so wonderful that I wrote an introduction blog post in my native language, Japanese. (Sorry for the Japanese) my post: Rocket engine performance calculation with RocketCEA

I found one bug. Because of this bug, I have to make a new card when calculating solid propellant rockets. Please change the AP(ammonium perchlorate, NH4CLO4) from fuel to oxidizer.

sonofeft commented 2 years ago

Thanks very much for your Japanese introduction (at: https://qiita.com/ina111/items/4e09711b9121db90dbaa). I am always happy to see RocketCEA being used and especially happy to see it cross language barriers.

As you note in your article, RocketCEA requires propellant inputs to be classified as "fuel", "oxidizer" or "propellant".

There are some propellants like "AP" or "N2H4" that can appear in more than one category, depending on the analysis being run. These propellants are a bit "tricky".

"AP", Ammonium perchlorate NH4CLO4(I), usually shows up in solid propellants as you describe in the three "Solid rocket" sections of your excellent article.

Sometimes, however, it can be used in a hybrid rocket as part of a "fuel" mixture with an oxidizer like LOX or N2O4. An example of such a mixture is shown below.

blendName = newFuelBlend( fuelL=["AP","CFx","HTPB"], fuelPcentL=[10,50,40]) objBlend = CEA_Isp( oxName='LOX', fuelName=blendName )

It is for this reason that "AP" is included as a possible fuel.

An even "trickier" propellant is Hydrazine (N2H4). Note that N2H4 is included as both a fuel and an oxidizer depending on the other propellant with which it is burned. When used as a monopropellant, however, it is called out with names like "HYD30", "HYD40" or "HYD50" depending on the amount of ammonia dissociation that the catalyst bed delivers (see: https://rocketcea.readthedocs.io/en/latest/hydrazine_mono.html). Using "N2H4" in the NASA CEA code would deliver very wrong results as a monopropellant.

When I wrote RocketCEA, I was trying to make the interface feel familiar to a variety of users that might specialize in bipropellant, solid, monopropellant or hybrid designs. In retrospect, I probably wrote the documentation from too much of a bipropellant perspective. The documentation (at: https://rocketcea.readthedocs.io/en/latest/index.html) would probably benefit from some more examples of solid, monopropellant and hybrid designs.

Anyway, thank you for your interest in RocketCEA. I am very thankful for your comments and very pleased that you are reviewing the source code to help me make it better.