Need help with dealing with thermochemistry using the thermo package /u/Sfs_Gamer Python Education

Hi, I am working on a Python project to generate rocket engines according to user parameters. However, I’ve been dealing with the thermochemistry calculations for quite a while and I do not know what to do about it. The script is meant to calculate the adiabatic combustion temperature of two propellants given their names only with data sourced from the JANAF NIST Thermochemistry Tables website for the reactants (because their enthalpy will stay stagnant) and the thermo package for the product enthalpy calculations following combustion. The method was derived from [here](http://www.braeunig.us/space/thermo.htm).

My main problem is that when I start calculating the combustion temperatures of oxygen oxidizer reactions all goes well but when i get on to the fluorine oxidizer reactions i get an error. The error is specifically due to not being able to find the two closest numbers to 0 from comparing the enthalpy calculations (given no energy gain or loss, the enthalpy of the system should remain the same so comparing them makes sense) but when this procedure is done with fluorinated reactions, it ends up with negative numbers which is the crux of the problem.

I decided to come here to see if anyone could help me with the code and see if the code is the problem or if it is the chemistry (or the physics).

Here is my code, and here is the full output after running the code. Sorry if the description is not the best and if the sentence structure is all over the place, I’m not a native English speaker.

submitted by /u/Sfs_Gamer
[link] [comments]

​r/learnpython Hi, I am working on a Python project to generate rocket engines according to user parameters. However, I’ve been dealing with the thermochemistry calculations for quite a while and I do not know what to do about it. The script is meant to calculate the adiabatic combustion temperature of two propellants given their names only with data sourced from the JANAF NIST Thermochemistry Tables website for the reactants (because their enthalpy will stay stagnant) and the thermo package for the product enthalpy calculations following combustion. The method was derived from [here](http://www.braeunig.us/space/thermo.htm). My main problem is that when I start calculating the combustion temperatures of oxygen oxidizer reactions all goes well but when i get on to the fluorine oxidizer reactions i get an error. The error is specifically due to not being able to find the two closest numbers to 0 from comparing the enthalpy calculations (given no energy gain or loss, the enthalpy of the system should remain the same so comparing them makes sense) but when this procedure is done with fluorinated reactions, it ends up with negative numbers which is the crux of the problem. I decided to come here to see if anyone could help me with the code and see if the code is the problem or if it is the chemistry (or the physics). Here is my code, and here is the full output after running the code. Sorry if the description is not the best and if the sentence structure is all over the place, I’m not a native English speaker. submitted by /u/Sfs_Gamer [link] [comments] 

Hi, I am working on a Python project to generate rocket engines according to user parameters. However, I’ve been dealing with the thermochemistry calculations for quite a while and I do not know what to do about it. The script is meant to calculate the adiabatic combustion temperature of two propellants given their names only with data sourced from the JANAF NIST Thermochemistry Tables website for the reactants (because their enthalpy will stay stagnant) and the thermo package for the product enthalpy calculations following combustion. The method was derived from [here](http://www.braeunig.us/space/thermo.htm).

My main problem is that when I start calculating the combustion temperatures of oxygen oxidizer reactions all goes well but when i get on to the fluorine oxidizer reactions i get an error. The error is specifically due to not being able to find the two closest numbers to 0 from comparing the enthalpy calculations (given no energy gain or loss, the enthalpy of the system should remain the same so comparing them makes sense) but when this procedure is done with fluorinated reactions, it ends up with negative numbers which is the crux of the problem.

I decided to come here to see if anyone could help me with the code and see if the code is the problem or if it is the chemistry (or the physics).

Here is my code, and here is the full output after running the code. Sorry if the description is not the best and if the sentence structure is all over the place, I’m not a native English speaker.

submitted by /u/Sfs_Gamer
[link] [comments] 

Leave a Reply

Your email address will not be published. Required fields are marked *