### Install documentation dependencies Source: https://nasa.github.io/cea/faq.html Install the necessary Python requirements for building the documentation. ```bash pip install -e . python -m pip install sphinx breathe ``` -------------------------------- ### Install Python Bindings Source: https://nasa.github.io/cea/_sources/installation.rst.txt Standard installation of Python bindings from the source directory. ```bash cd pip install . ``` -------------------------------- ### Install Binary Wheel Source: https://nasa.github.io/cea/_sources/installation.rst.txt Install a generated binary wheel on a compatible local host. ```bash pip install path/to/wheel/ ``` -------------------------------- ### Install CEA Source: https://nasa.github.io/cea/_sources/installation.rst.txt Install the built CEA binaries. ```bash cmake --install build-intel ``` -------------------------------- ### Install CEA via PyPI Source: https://nasa.github.io/cea/_sources/quick_start.rst.txt Recommended installation method for most users to access the Python API immediately. ```bash python -m pip install cea ``` -------------------------------- ### Cloning and Installing the Repository Source: https://nasa.github.io/cea/_sources/developer_guide.rst.txt Clone the repository and perform an editable install of the Python binding to ensure local changes are reflected. ```bash git clone https://github.com/nasa/cea cd cea ``` ```bash pip install -e . ``` -------------------------------- ### Build documentation Source: https://nasa.github.io/cea/_sources/installation.rst.txt Install documentation dependencies and generate HTML documentation. ```bash pip install -e . pip install sphinx breathe doxygen Doxyfile cd docs make html ``` -------------------------------- ### Install CEA Build Artifacts Source: https://nasa.github.io/cea/_sources/quick_start.rst.txt Install the built artifacts into a staging directory. ```bash cmake --install build-dev ``` ```bash cmake --install build-win --config Debug ``` -------------------------------- ### Run CEA Sample Problems Source: https://nasa.github.io/cea/_sources/installation.rst.txt Execute a sample input file after the installation is properly configured. ```bash cea /samples/rp1311_examples.inp ``` -------------------------------- ### Install Python dependencies Source: https://nasa.github.io/cea/_sources/installation.rst.txt Install the necessary Python packages for bindings, tests, and documentation. ```bash pip install cython numpy setuptools pytest ``` -------------------------------- ### Console Output Example Source: https://nasa.github.io/cea/_sources/examples/shock/example7.rst.txt Example of the formatted output generated by the printing logic. ```console INITIAL GAS (1) Mach Number1 3.353 3.658 3.810 3.962 4.115 4.267 u1, m/s 1100.000 1200.000 1250.000 1300.000 1350.000 1400.000 P, bar 0.0133 0.0133 0.0133 0.0133 0.0133 0.0133 T, K 300.000 300.000 300.000 300.000 300.000 300.000 Density, kg/m^3 2.0126e-02 2.0126e-02 2.0126e-02 2.0126e-02 2.0126e-02 2.0126e-02 H, kJ/kg 1.062 1.062 1.062 1.062 1.062 1.062 U, kJ/kg -65.182 -65.182 -65.182 -65.182 -65.182 -65.182 G, kJ/kg -1556.265 -1556.265 -1556.265 -1556.265 -1556.265 -1556.265 S, kJ/kg 5.191 5.191 5.191 5.191 5.191 5.191 M, (1/n) 37.654 37.654 37.654 37.654 37.654 37.654 Cp, kJ/kg-K 0.574 0.574 0.574 0.574 0.574 0.574 Gamma_s 1.625 1.625 1.625 1.625 1.625 1.625 Son. Vel., m/s 328.087 328.087 328.087 328.087 328.087 328.087 SHOCKED GAS (2) - Incident, Equilibrium ``` -------------------------------- ### Install build tools on WSL Source: https://nasa.github.io/cea/_sources/installation.rst.txt Install required build tools within a WSL Ubuntu environment. ```bash sudo apt update sudo apt install gfortran ninja-build cmake python3 python3-pip git ``` -------------------------------- ### Run Python binding tests Source: https://nasa.github.io/cea/_sources/installation.rst.txt Install the package and run the Python binding test suite. ```bash pip install . pytest source\bind\python\tests ``` -------------------------------- ### Install CEA on Windows from build-win Source: https://nasa.github.io/cea/quick_start.html For the Windows build directory, install from build-win with the Debug configuration. ```bash cmake --install build-win --config Debug ``` -------------------------------- ### Build and Install CEA from Source Source: https://nasa.github.io/cea/_sources/installation.rst.txt Standard process to compile and install the CEA executable, library, and databases using CMake. ```bash cd mkdir build && cd build cmake -DCMAKE_INSTALL_PREFIX= -DCEA_BUILD_TESTING=OFF .. cmake --build . cmake --install . ``` -------------------------------- ### Run CEA Sample Problems Source: https://nasa.github.io/cea/_sources/quick_start.rst.txt Execute the NASA RP-1311 example suite or a specific input file using the CLI. ```bash cea samples/rp1311_examples.inp ``` ```bash cea samples/example1.inp ``` -------------------------------- ### Smoke-test the CLI Source: https://nasa.github.io/cea/_sources/installation.rst.txt Verify the installation by running the CEA CLI with a sample input file. ```bash cea \samples\rp1311_examples.inp ``` -------------------------------- ### Install Python Bindings in Editable Mode Source: https://nasa.github.io/cea/_sources/installation.rst.txt Use editable mode for iterative development against a local checkout. ```bash pip install -e . ``` -------------------------------- ### Install with GNU Toolchain Defaults Source: https://nasa.github.io/cea/_sources/installation.rst.txt Use the provided toolchain file to opt into historical GNU defaults (gcc/g++/gfortran). ```bash CMAKE_ARGS="-GNinja -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/gnu.cmake" pip install . ``` -------------------------------- ### Console Output Example Source: https://nasa.github.io/cea/_sources/examples/equilibrium/example14.rst.txt The resulting console output displaying thermodynamic properties, mole fractions, and trace species. ```console P, bar 0.05066 0.05066 0.05066 0.05066 0.05066 0.05066 0.05066 0.05066 T, K 1000.000 500.000 350.000 305.000 304.300 304.200 304.000 300.000 Density, kg/m^3 1.175e-02 2.350e-02 3.358e-02 3.853e-02 4.499e-02 4.715e-02 5.146e-02 1.304e-01 H, kJ/kg -10066.00 -11043.65 -11309.10 -11386.94 -11709.17 -11798.29 -11953.26 -12988.71 U, kJ/kg -10497.11 -11259.20 -11459.98 -11518.42 -11821.79 -11905.74 -12051.70 -13027.57 G, kJ/kg -23601.6 -17139.8 -15355.8 -14840.7 -14833.0 -14832.0 -14830.0 -14801.2 S, kJ/kg-K 13.5356 12.1924 11.5619 11.3239 10.2655 9.9726 9.4630 6.0416 M, (1/n) 19.287 19.287 19.287 19.287 22.466 23.541 25.676 64.179 MW 19.287 19.287 19.287 19.287 19.287 19.287 19.287 19.287 Cp, kJ/kg-K 2.1108 1.8069 1.7370 1.7233 936.2315 848.8474 707.1961 95.8701 Gamma_s 1.2567 1.3133 1.3301 1.3336 1.1080 1.1059 1.1018 1.0344 MOLE FRACTIONS H2O 0.90909 0.90909 0.90909 0.90909 0.76756 0.72836 0.66025 0.2096 O2 0.090909 0.090909 0.090909 0.090909 0.090909 0.090909 0.090909 0.090909 H2O(L) 0 0 0 0 0.14153 0.18073 0.24884 0.69949 TRACE SPECIES: H H2 H2O2 HO2 O O3 OH H2O(cr) ``` -------------------------------- ### Set mixture states and initialize solver for UV equilibrium Source: https://nasa.github.io/cea/examples/equilibrium/example4.html Uses fixed u/R and density from Example 3. Defines fuel and oxidant weights, reactants and products, creates the solver and solution objects, and initializes arrays for the solution variables. ```python # Thermo states u_R = -45.1343 density = 14.428 # kg/m^3 # Mixture states fuel_weights = np.array([0.0, 0.4, 0.6]) oxidant_weights = np.array([1.0, 0.0, 0.0]) T_reac = np.array([700.0, 298.15, 298.15]) of_ratios = np.array([17.0]) # Mixtures reac = cea.Mixture(reac_names) prod = cea.Mixture(reac_names, products_from_reactants=True, omit=omit_names) # Solver solver = cea.EqSolver(prod, reactants=reac, trace=trace) solution = cea.EqSolution(solver) # Initialize variable arrays n = len(of_ratios) of_ratio_out = np.zeros(n) T_out = np.zeros(n) P_out = np.zeros(n) rho = np.zeros(n) enthalpy = np.zeros(n) energy = np.zeros(n) gibbs = np.zeros(n) entropy = np.zeros(n) molecular_weight_M = np.zeros(n) molecular_weight_MW = np.zeros(n) gamma_s = np.zeros(n) cp_eq = np.zeros(n) cp_fr = np.zeros(n) cv_eq = np.zeros(n) cv_fr = np.zeros(n) mole_fractions = {} trace_species = [] i = 0 ``` -------------------------------- ### Define thermodynamic and mixture states, create mixtures and solver Source: https://nasa.github.io/cea/_sources/examples/equilibrium/example4.rst.txt Sets the fixed u/R and density values (from Example 3), defines fuel and oxidant weights, reactant temperatures, and oxidizer-to-fuel ratios. Creates reactant and product mixtures, an equilibrium solver, and initializes output arrays. ```python # Thermo states u_R = -45.1343 density = 14.428 # kg/m^3 # Mixture states fuel_weights = np.array([0.0, 0.4, 0.6]) oxidant_weights = np.array([1.0, 0.0, 0.0]) T_reac = np.array([700.0, 298.15, 298.15]) of_ratios = np.array([17.0]) # Mixtures reac = cea.Mixture(reac_names) prod = cea.Mixture(reac_names, products_from_reactants=True, omit=omit_names) # Solver solver = cea.EqSolver(prod, reactants=reac, trace=trace) solution = cea.EqSolution(solver) # Initialize variable arrays n = len(of_ratios) of_ratio_out = np.zeros(n) T_out = np.zeros(n) P_out = np.zeros(n) rho = np.zeros(n) enthalpy = np.zeros(n) energy = np.zeros(n) gibbs = np.zeros(n) entropy = np.zeros(n) molecular_weight_M = np.zeros(n) molecular_weight_MW = np.zeros(n) gamma_s = np.zeros(n) cp_eq = np.zeros(n) cp_fr = np.zeros(n) cv_eq = np.zeros(n) cv_fr = np.zeros(n) mole_fractions = {} trace_species = [] i = 0 ``` -------------------------------- ### Run the CEA command-line solver on sample problems Source: https://nasa.github.io/cea/quick_start.html Run all NASA RP-1311 example problems in one shot. The solver writes results to samples/rp1311_examples.out. ```bash cea samples/rp1311_examples.inp ``` -------------------------------- ### Install Python binding in editable mode Source: https://nasa.github.io/cea/developer_guide.html Installs the Python package in editable mode so that `import cea` resolves to the working tree. Requires an activated Python environment as described in the setup. ```bash pip install -e . ``` -------------------------------- ### Initialize ShockSolver and ShockSolution Source: https://nasa.github.io/cea/examples/shock/example7.html Set up the solver and solution objects, enabling reflected shock wave calculations. ```python solver = cea.ShockSolver(prod, reactants=reac) solution = cea.ShockSolution(solver, reflected=True) ``` -------------------------------- ### Customize Windows OneAPI Installation Source: https://nasa.github.io/cea/_sources/installation.rst.txt Specify a custom Python interpreter and installation directory for the Windows installer. ```powershell powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\install_windows_oneapi.ps1 ` -Python C:\Python314\python.exe ` -InstallPrefix C:\cea ``` -------------------------------- ### Build HTML documentation Source: https://nasa.github.io/cea/_sources/developer_guide.rst.txt Navigate to the docs directory and build the HTML documentation using make. ```bash cd docs make html ``` -------------------------------- ### Instantiate EqSolver and EqSolution Source: https://nasa.github.io/cea/_sources/examples/equilibrium/example3.rst.txt Create the solver and solution objects, passing the trace parameter to the solver. ```python solver = cea.EqSolver(prod, reactants=reac, trace=trace) solution = cea.EqSolution(solver) ``` -------------------------------- ### Console Output Example Source: https://nasa.github.io/cea/_sources/examples/equilibrium/example1.rst.txt Example of the terminal output generated by the equilibrium calculation process. ```console o/f 34.296 34.296 34.296 34.296 34.296 34.296 22.853 22.853 22.853 22.853 22.853 22.853 P, atm 1.000 1.000 0.100 0.100 0.010 0.010 1.000 1.000 0.100 0.100 0.010 0.010 T, K 3000.000 2000.000 3000.000 2000.000 3000.000 2000.000 3000.000 2000.000 3000.000 2000.000 3000.000 2000.000 Density, g/cc 9.178e-05 1.499e-04 8.085e-06 1.496e-05 6.614e-07 1.487e-06 8.122e-05 1.297e-04 7.116e-06 1.296e-05 5.672e-07 1.293e-06 Volume, cc/g 1.090e+04 6.671e+03 1.237e+05 6.687e+04 1.512e+06 6.723e+05 1.231e+04 7.707e+03 1.405e+05 7.714e+04 1.763e+06 7.735e+05 H, cal/g 663.714 -203.569 1369.546 -191.833 2647.099 -164.346 718.654 -120.698 1550.122 -116.204 3208.235 -101.779 U, cal/g 399.856 -365.131 1070.016 -353.764 2280.923 -327.156 420.475 -307.350 1209.797 -303.012 2781.243 -289.088 G, cal/g -7974.5 -5290.4 -8616.7 -5662.8 -9381.0 -6036.5 -8818.8 -5830.6 -9545.4 -6260.6 -10424.5 -6691.2 S, cal/g-K 2.879 2.543 3.329 2.735 4.009 2.936 3.179 2.855 3.698 3.072 4.544 3.295 M, (1/n) 22.594 24.600 19.903 24.544 16.281 24.412 19.994 21.293 17.518 21.275 13.962 21.219 MW 22.594 24.600 19.903 24.544 16.281 24.412 19.994 21.293 17.518 21.275 13.962 21.219 Gamma_s 1.1312 1.2258 1.1206 1.2026 1.1318 1.1668 1.1337 1.2529 1.1196 1.2389 1.1296 1.2051 Cp_eq, cal/g-K 1.6816 0.4552 3.4398 0.5215 3.7168 0.6858 1.8253 0.4671 4.1929 0.5000 4.9230 0.6077 Cp_fr, cal/g-K 0.4250 0.4008 0.4282 0.4008 0.4368 0.4010 0.4812 0.4520 0.4853 0.4521 0.4968 0.4522 Cv_eq, cal/g-K 1.4371 0.3711 2.8458 0.4330 3.0554 0.5856 1.5585 0.3727 3.4492 0.4034 4.0091 0.5032 Cv_fr, cal/g-K 0.3370 0.3200 0.3284 0.3199 0.3148 0.3196 0.3818 0.3587 0.3719 0.3587 0.3544 0.3586 MOLE FRACTIONS ``` -------------------------------- ### Set up EqSolver and pre-allocate result arrays Source: https://nasa.github.io/cea/_sources/examples/sample_plots.rst.txt Creates the equilibrium solver and solution object, then pre-allocates arrays for temperature, species mole fractions, and convergence flags. Each nested-loop iteration writes only to these arrays. ```python solver = cea.EqSolver(prod, reactants=reac) soln = cea.EqSolution(solver) X, Y = np.meshgrid(T0, phi) T_vals = np.zeros((n_phi, n_T0)) H_vals = np.zeros((n_phi, n_T0)) H2_vals = np.zeros((n_phi, n_T0)) H2O_vals = np.zeros((n_phi, n_T0)) O_vals = np.zeros((n_phi, n_T0)) O2_vals = np.zeros((n_phi, n_T0)) OH_vals = np.zeros((n_phi, n_T0)) convg_vals = np.zeros((n_phi, n_T0)) ``` -------------------------------- ### shocksolver_init Source: https://nasa.github.io/cea/interfaces/fortran_api.html Initializes a shocksolver object with products, reactants, and solver options. ```APIDOC ## Function: shocksolver_init ### Description Initializes a shocksolver object with products, reactants, and solver options. ### Signature ```fortran type(shocksolver) function cea_shock::shocksolver::shocksolver_init(products, reactants, trace, ions, all_transport, insert, smooth_truncation, truncation_width) ``` ### Parameters - **products** (type) - Required - Products specification. - **reactants** (type) - Required - Reactants specification. - **trace** (logical) - Required - Trace flag. - **ions** (logical) - Required - Ions flag. - **all_transport** (logical) - Required - All transport flag. - **insert** (logical) - Required - Insert flag. - **smooth_truncation** (logical) - Required - Smooth truncation flag. - **truncation_width** (real) - Required - Truncation width. ### Returns - **type(shocksolver)** - The initialized shock solver object. ``` -------------------------------- ### Instantiate EqSolver and EqSolution Source: https://nasa.github.io/cea/_sources/examples/equilibrium/example1.rst.txt Create the solver and solution objects required for the equilibrium calculation. ```python solver = cea.EqSolver(prod, reactants=reac) solution = cea.EqSolution(solver) ``` -------------------------------- ### Instantiate EqSolver and EqSolution Source: https://nasa.github.io/cea/_sources/examples/equilibrium/example2.rst.txt Create the solver and solution objects, passing the transport flag to the solver. ```python solver = cea.EqSolver(prod, reactants=reac, transport=transport) solution = cea.EqSolution(solver) ``` -------------------------------- ### Run Windows OneAPI Automated Installer Source: https://nasa.github.io/cea/_sources/installation.rst.txt Execute the PowerShell script to install dependencies and build the CEA interfaces. ```powershell powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\install_windows_oneapi.ps1 ``` -------------------------------- ### Run a single sample problem Source: https://nasa.github.io/cea/quick_start.html Run a single problem by pointing the executable at a specific .inp file. ```bash cea samples/example1.inp ``` -------------------------------- ### CEA_TP_SOLVE usage example Source: https://nasa.github.io/cea/_sources/interfaces/excel_api.rst.txt Example of calling the CEA_TP_SOLVE function with a reactant table range and specific amount mode. ```text =CEA_TP_SOLVE($A$1:$D$3, 3000, 10, of_ratio:=6, include_headers:=TRUE) ``` -------------------------------- ### Add CEA to PATH on Windows Source: https://nasa.github.io/cea/quick_start.html After installation, add the install prefix's bin directory to your PATH on Windows (PowerShell). ```powershell setx PATH "$env:PATH;\\bin" ``` -------------------------------- ### detonsolver_init (procedure) Source: https://nasa.github.io/cea/interfaces/fortran_api.html Initializes a detonsolver object with products, reactants, and solver options. ```APIDOC ## Function: detonsolver_init (procedure) ### Description Initializes a detonsolver object with products, reactants, and solver options. ### Signature ```fortran type(detonsolver) function cea_detonation::detonsolver::detonsolver_init(products, reactants, trace, ions, all_transport, insert, smooth_truncation, truncation_width) ``` n ### Parameters - **products** (type) - Required - Products specification. - **reactants** (type) - Required - Reactants specification. - **trace** (logical) - Required - Trace flag. - **ions** (logical) - Required - Ions flag. - **all_transport** (logical) - Required - All transport flag. - **insert** (logical) - Required - Insert flag. - **smooth_truncation** (logical) - Required - Smooth truncation flag. - **truncation_width** (real) - Required - Truncation width. ### Returns - **type(detonsolver)** - The initialized detonation solver object. ``` -------------------------------- ### Initialize RocketSolver and RocketSolution Source: https://nasa.github.io/cea/examples/rocket/example13.html Initializes the RocketSolver with the product mixture, reactants, trace, and insert arguments, and creates a RocketSolution instance. ```python solver = cea.RocketSolver(prod, reactants=reac, trace=trace, insert=insert) solution = cea.RocketSolution(solver) ``` -------------------------------- ### cea_equilibrium::get_species_other_phases Source: https://nasa.github.io/cea/interfaces/fortran_api.html Gets species in other phases. ```APIDOC ## cea_equilibrium::get_species_other_phases ### Description Gets species in other phases. ### Syntax integer function, dimension(:), allocatable cea_equilibrium::get_species_other_phases(name, products) ### Parameters - **name** - Species name. - **products** - Products mixture. ### Returns Array of species indices in other phases. ``` -------------------------------- ### mixture::get_valence Source: https://nasa.github.io/cea/interfaces/fortran_api.html Procedure to get valence. ```APIDOC ## mixture::get_valence ### Description Procedure to get the valence of the mixture. ### Procedure Signature procedure cea_mixture::mixture::get_valence() ``` -------------------------------- ### mixture::get_products Source: https://nasa.github.io/cea/interfaces/fortran_api.html Procedure to get products. ```APIDOC ## mixture::get_products ### Description Procedure to get products. ### Procedure Signature procedure cea_mixture::mixture::get_products() ``` -------------------------------- ### Initialize RocketSolver and RocketSolution Source: https://nasa.github.io/cea/_sources/examples/rocket/example11.rst.txt Create the RocketSolver with transport=True to compute transport properties later, and the RocketSolution instance. ```python solver = cea.RocketSolver(prod, reactants=reac, transport=True, ions=True) solution = cea.RocketSolution(solver) ``` -------------------------------- ### Initialize RocketSolver and RocketSolution Source: https://nasa.github.io/cea/_sources/examples/rocket/example13.rst.txt Initialize the solver and solution objects with the specified trace and insert parameters. ```python solver = cea.RocketSolver(prod, reactants=reac, trace=trace, insert=insert) solution = cea.RocketSolution(solver) ``` -------------------------------- ### cea_equilibrium::eqsolver::get_solution_vars Source: https://nasa.github.io/cea/interfaces/fortran_api.html Gets the solution variables. ```APIDOC ## cea_equilibrium::eqsolver::get_solution_vars ### Description Gets the solution variables. ### Syntax procedure cea_equilibrium::eqsolver::get_solution_vars() ``` -------------------------------- ### Build Wheel with GNU Defaults Source: https://nasa.github.io/cea/_sources/installation.rst.txt Use the convenience script to build a wheel using GNU toolchain defaults. ```bash bash scripts/build_wheel.sh ``` -------------------------------- ### cea_rocket_solver_get_size Source: https://nasa.github.io/cea/interfaces/c_api.html Gets a size parameter of a rocket solver. ```APIDOC ## cea_err cea_rocket_solver_get_size(const cea_rocket_solver solver, const cea_equilibrium_size eq_variable, cea_int *value) ### Description This function retrieves the size of a specified equilibrium variable (e.g., number of species) from a rocket solver. ### Parameters - solver (const cea_rocket_solver) - Required - Handle to the rocket solver. - eq_variable (const cea_equilibrium_size) - Required - Which size variable to get. - value (cea_int *) - Required - Output pointer to the size value. ### Returns - cea_err - Error code indicating success or failure. ``` -------------------------------- ### cea_eqderivatives_get_matrix Source: https://nasa.github.io/cea/interfaces/c_api.html Gets a matrix derivative from the derivatives context. ```APIDOC ## cea_err cea_eqderivatives_get_matrix(const cea_eqderivatives derivs, const cea_eqsolver solver, const cea_eqsolution soln, const cea_eqderiv_matrix which, const cea_derivative_method method, const cea_int rows, const cea_int cols, cea_real out[]) ### Description This function retrieves a matrix of derivative values from the derivatives context for a given matrix derivative type and method. ### Parameters - derivs (const cea_eqderivatives) - Required - The derivatives context. - solver (const cea_eqsolver) - Required - The solver context. - soln (const cea_eqsolution) - Required - The equilibrium solution. - which (const cea_eqderiv_matrix) - Required - Identify the matrix derivative type. - method (const cea_derivative_method) - Required - The computation method. - rows (const cea_int) - Required - Number of rows of the output matrix. - cols (const cea_int) - Required - Number of columns of the output matrix. - out (cea_real[]) - Required - Output array (row-major) to store the matrix. ### Returns - cea_err - Error code indicating success or failure. ``` -------------------------------- ### Configure and build CEA Source: https://nasa.github.io/cea/_sources/installation.rst.txt Configure the project using the Intel preset and build the binaries. ```bash cmake --preset intel-ifx -DCMAKE_INSTALL_PREFIX= -DCEA_BUILD_TESTING=OFF -DCEA_ENABLE_BIND_PYTHON=ON cmake --build build-intel ``` -------------------------------- ### detonsolver_init Source: https://nasa.github.io/cea/interfaces/fortran_api.html Initializes a detonsolver object with products, reactants, and solver options. ```APIDOC ## Function: detonsolver_init ### Description Initializes a detonsolver object with products, reactants, and solver options. ### Signature ```fortran type(detonsolver) function cea_detonation::detonsolver_init(products, reactants, trace, ions, all_transport, insert, smooth_truncation, truncation_width) ``` n ### Parameters - **products** (type) - Required - Products specification. - **reactants** (type) - Required - Reactants specification. - **trace** (logical) - Required - Trace flag. - **ions** (logical) - Required - Ions flag. - **all_transport** (logical) - Required - All transport flag. - **insert** (logical) - Required - Insert flag. - **smooth_truncation** (logical) - Required - Smooth truncation flag. - **truncation_width** (real) - Required - Truncation width. ### Returns - **type(detonsolver)** - The initialized detonation solver object. ``` -------------------------------- ### cea_eqderivatives_get_array Source: https://nasa.github.io/cea/interfaces/c_api.html Gets an array derivative from the derivatives context. ```APIDOC ## cea_err cea_eqderivatives_get_array(const cea_eqderivatives derivs, const cea_eqsolver solver, const cea_eqsolution soln, const cea_eqderiv_array which, const cea_derivative_method method, const cea_int len, cea_real out[]) ### Description This function retrieves an array of derivative values from the derivatives context, for a given derivative type and method. ### Parameters - derivs (const cea_eqderivatives) - Required - The derivatives context. - solver (const cea_eqsolver) - Required - The solver context used for computation. - soln (const cea_eqsolution) - Required - The equilibrium solution. - which (const cea_eqderiv_array) - Required - Identify the array derivative type. - method (const cea_derivative_method) - Required - The computation method. - len (const cea_int) - Required - Length of the output array. - out (cea_real[]) - Required - Output array to store the derivatives. ### Returns - cea_err - Error code indicating success or failure. ``` -------------------------------- ### cea_rocket_solution_get_moles Source: https://nasa.github.io/cea/interfaces/c_api.html Gets the total number of moles from a rocket solution. ```APIDOC ## cea_err cea_rocket_solution_get_moles(const cea_rocket_solution soln, cea_real *moles) ### Description This function retrieves the total number of moles in the rocket solution. ### Parameters - soln (const cea_rocket_solution) - Required - The solution handle. - moles (cea_real *) - Required - Output pointer to store the total moles. ### Returns - cea_err - Error code indicating success or failure. ``` -------------------------------- ### Configure, Build, and Test CEA Source: https://nasa.github.io/cea/_sources/installation.rst.txt Enable testing, compile the PFUnit suite, and execute tests. ```bash cmake -DCMAKE_BUILD_TYPE=Release -DCEA_BUILD_TESTING=ON .. cmake --build . ctest --output-on-failure ``` -------------------------------- ### cea_rocket_solution_get_size Source: https://nasa.github.io/cea/interfaces/c_api.html Gets the number of solution points from a rocket solution. ```APIDOC ## cea_err cea_rocket_solution_get_size(const cea_rocket_solution soln, cea_int *num_pts) ### Description This function retrieves the number of data points in the rocket solution. ### Parameters - soln (const cea_rocket_solution) - Required - The rocket solution handle. - num_pts (cea_int *) - Required - Output pointer to store the number of points. ### Returns - cea_err - Error code indicating success or failure. ``` -------------------------------- ### cea_shock::shocksolver_init Source: https://nasa.github.io/cea/interfaces/fortran_api.html Initializes a shocksolver object with the given products, reactants, and options. ```APIDOC ## FUNCTION cea_shock::shocksolver_init ### Description Initializes a shocksolver object with the given products, reactants, and options. ### Syntax type(shocksolver) function cea_shock::shocksolver_init(products, reactants, trace, ions, all_transport, insert, smooth_truncation, truncation_width) ### Parameters - **products** (type) - Products data. - **reactants** (type) - Reactants data. - **trace** (logical) - Flag for trace species. - **ions** (logical) - Flag for ions. - **all_transport** (logical) - Flag for all transport properties. - **insert** (logical) - Flag for insert. - **smooth_truncation** (logical) - Flag for smooth truncation. - **truncation_width** (real) - Truncation width. ### Returns - **type(shocksolver)** - The initialized shocksolver object. ``` -------------------------------- ### cea_eqderivatives_get_scalar Source: https://nasa.github.io/cea/interfaces/c_api.html Gets a scalar derivative value from the derivatives context. ```APIDOC ## cea_err cea_eqderivatives_get_scalar(const cea_eqderivatives derivs, const cea_eqderiv_scalar which, const cea_derivative_method method, cea_real *value) ### Description This function retrieves a scalar derivative value from the derivatives context, selecting the derivative type and computation method. ### Parameters - derivs (const cea_eqderivatives) - Required - The derivatives context. - which (const cea_eqderiv_scalar) - Required - Enum identifying the scalar derivative. - method (const cea_derivative_method) - Required - Computation method (analytical or finite difference). - value (cea_real *) - Required - Output pointer to store the derivative value. ### Returns - cea_err - Error code indicating success or failure. ``` -------------------------------- ### cea_reactant_get_valid_temperature_range Source: https://nasa.github.io/cea/interfaces/c_api.html Gets the valid temperature range for a reactant species. ```APIDOC ## cea_reactant_get_valid_temperature_range ### Description Gets the valid temperature range for a reactant species. ### Function Signature `cea_err cea_reactant_get_valid_temperature_range(const cea_string name, cea_real *temperature_min, cea_real *temperature_max)` ### Parameters - **name** (cea_string) - Required - Name of the reactant species. - **temperature_min** (cea_real*) - Required - Output parameter for minimum temperature. - **temperature_max** (cea_real*) - Required - Output parameter for maximum temperature. ### Returns - **cea_err** - Error code. ```