Thermodynamics

Thermodynamics factory

For instance, let's recover data for $N_2$ as provided here.

n2 = (bounds = [200.0, 1000.0],
      data   = [[ 3.53100528e+00, -1.23660987e-04, -5.02999437e-07,
                  2.43530612e-09, -1.40881235e-12, -1.04697628e+03,
                  2.96747468e+00 ]]
    );
(bounds = [200.0, 1000.0], data = [[3.53100528, -0.000123660987, -5.02999437e-7, 2.43530612e-9, -1.40881235e-12, -1046.97628, 2.96747468]])
nasa7_n2 = thermo_factory("NASA7", n2.data, n2.bounds)
nasa7_n2[1]

\[ \begin{equation} 8.3145 \left( 3.531 + T \left( -0.00012366 + T \left( -5.03 \cdot 10^{-7} + \left( 2.4353 \cdot 10^{-9} - 1.4088 \cdot 10^{-12} T \right) T \right) \right) \right) \end{equation} \]

n2 = (bounds = [200.0, 1000.0, 6000.0],
      data   = [[ 3.53100528e+00, -1.23660987e-04, -5.02999437e-07,
                  2.43530612e-09, -1.40881235e-12, -1.04697628e+03,
                  2.96747468e+00],
                [ 2.95257626e+00,  1.39690057e-03, -4.92631691e-07,
                  7.86010367e-11, -4.60755321e-15, -9.23948645e+02,
                  5.87189252e+00]
                ]
    )

nasa7_n2 = thermo_factory("NASA7", n2.data, n2.bounds)
nasa7_n2[1]

\[ \begin{equation} 8.3145 \left( 3.531 + T \left( -0.00012366 + T \left( -5.03 \cdot 10^{-7} + \left( 2.4353 \cdot 10^{-9} - 1.4088 \cdot 10^{-12} T \right) T \right) \right) \right) + \frac{1}{2} \left( -4.8093 + 0.012643 T + 8.6202 \cdot 10^{-8} T^{2} - 1.9595 \cdot 10^{-8} T^{3} + 1.1675 \cdot 10^{-11} T^{4} \right) \left( 1 + sign\left( -1000 + T \right) \right) \end{equation} \]

funcs_nasa7_n2 = CompiledThermoFunctions(nasa7_n2)
funcs_nasa7_n2.specific_heat(300.0)
29.125387280648052

Sample properties for $Al_2O_3$ from NIST Webbook of Chemistry.

al2o3 = (bounds = [200.0, 2327.0, 6000.0],
         data = [[ 1.02429000e+02,  3.87498000e+01, -1.59109000e+01,
                   2.62818100e+00, -3.00755100e+00, -1.71793000e+03,
                   1.46997000e+02, -1.67569000e+03],
                 [ 1.92464000e+02,  9.51985600e-08, -2.85892800e-08,
                   2.92914700e-09,  5.59940500e-08, -1.75771100e+03,
                   1.77100800e+02, -1.62056900e+03]]
        )
shomate_al2o3 = thermo_factory("Shomate", al2o3.data, al2o3.bounds)
funcs_shomate_al2o3 = CompiledThermoFunctions(shomate_al2o3)