APThermo 0.1.0

dotnet add package APThermo --version 0.1.0
                    
NuGet\Install-Package APThermo -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="APThermo" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="APThermo" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="APThermo" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add APThermo --version 0.1.0
                    
#r "nuget: APThermo, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package APThermo@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=APThermo&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=APThermo&version=0.1.0
                    
Install as a Cake Tool

APThermo

APThermo computes the chemical equilibrium composition and the thermodynamic and transport properties of rocket propellant combustion products, and from them the performance of a rocket engine (chamber, throat, nozzle exit; shifting-equilibrium and frozen flow). It is the class of tool NASA CEA belongs to: Gibbs-energy minimization (Gordon–McBride), one numerical program that runs on the CPU and, for large batches of states, on an NVIDIA GPU (CUDA) in double precision.

This package is the library. The command-line tool is APThermo.Cli (apthermo).

Install

dotnet add package APThermo

Minimal example

The NASA thermodynamic database (thermo.inp, trans.inp, from github.com/nasa/cea, Apache-2.0) is embedded in this package, so a solve needs no data files on disk. output is any TextWriter (Console.Out in a console application).

using APThermo.Data;
using APThermo.Execution;
using APThermo.Problems;
using APThermo.Thermo;
var database = SpeciesDatabase.LoadBundled();

var propellant = Propellant.From(database)
    .Oxidizer("O2(L)", temperature: 90.17)   // K
    .Fuel("H2(L)", temperature: 20.27)        // K
    .OxidizerToFuelRatio(6.0)
    .Build();

using var solver = Solver.Create(database, new EngineOptions { Accelerator = AcceleratorKind.Cpu });
RocketResult result = solver.Solve(propellant, new RocketProblem
{
    ChamberPressure = 7.0e6,   // Pa
    AreaRatios = [20.0],
});

Station chamber = result.Stations[0];
if (chamber.Status == CaseStatus.Ok)
{
    output.WriteLine($"chamber temperature = {chamber.State.Temperature:F1} K");
}

CUDA

The CPU accelerator (AcceleratorKind.Cpu) needs nothing beyond this package and ILGPU. The CUDA accelerator (AcceleratorKind.Cuda, or Auto on a machine with a usable GPU) additionally needs, at run time:

  • an NVIDIA driver with CUDA 12.8 or newer;
  • libnvvm (nvvm64_40_0.dll on Windows, libnvvm.so on Linux) and libdevice.10.bc, both from an NVIDIA CUDA Toolkit 12.8 or newer.

AcceleratorKind.Auto falls back to the CPU accelerator when no usable CUDA device or library is found; a bound solver's solver.Accelerator.CudaSkippedBecause names the reason (AcceleratorProbe.Describe answers the same question without solving a case).

Guide

The full guide has every scenario above and more (exits, a custom propellant, batches, state records, GPU acceleration, the database, troubleshooting): see Getting started in the source repository, or the repository README for the full guide index.

License and data notice

This package is MIT-licensed. It embeds the NASA CEA thermodynamic and transport databases, licensed Apache-2.0; the package includes the upstream NOTICE. See the package's license expression (MIT AND Apache-2.0) and the embedded NOTICE file for the full attribution, or call SpeciesDatabase.BundledNotice() at run time.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 81 9/19/2026