Skip to content

Commit 2c33ae8

Browse files
authored
updated eqsolver max temperature to fix high-temperature errors (#100)
* updated eqsolver max temperature to fix high-temperature errors
1 parent 46be9bd commit 2c33ae8

6 files changed

Lines changed: 56 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,20 @@ All notable user-visible changes to this project are documented here.
66

77
### Changed
88

9+
### Fixed
10+
11+
### Added
12+
13+
## [3.3.1] - 2026-07-29
14+
15+
### Changed
16+
917
### Fixed
1018
- Frozen rocket calculations now switch from equilibrium to frozen composition
1119
after `n_frz` when the boundary falls within a multi-point exit schedule,
1220
restoring CEA2 behavior for both IAC and FAC calculations.
21+
- Equilibrium solves now support gas temperatures through the CEA2
22+
high-temperature fit range instead of reporting non-convergence above 6600 K.
1323

1424
### Added
1525

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
88
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
99
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
1010
project(CEA
11-
VERSION 3.3.0
11+
VERSION 3.3.1
1212
LANGUAGES Fortran
1313
)
1414

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
copyright = ''
2323
author = 'Mark Leader'
2424
version = '3.3'
25-
release = '3.3.0'
25+
release = '3.3.1'
2626

2727
# -- General configuration ---------------------------------------------------
2828
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

source/bind/python/cea/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "3.3.0"
1+
__version__ = "3.3.1"
22

33
# initialize libcea, loading in the default data files
44
from cea.lib.libcea import init as libcea_init

source/equilibrium.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ module cea_equilibrium
7777
!! Maximum number of times the problem can converge without establishing a set of condensed species
7878
real(dp) :: T_min = 160.0d0
7979
!! Minimum mixture temperature (K)
80-
real(dp) :: T_max = 6600.0d0
81-
!! Maximum mixture temperature (K)
80+
real(dp) :: T_max = 22000.0d0
81+
!! Maximum mixture temperature (K), including the CEA2 10% margin above the 20000 K gas-fit limit
8282

8383
contains
8484

source/equilibrium_test.pf

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -930,6 +930,47 @@ contains
930930

931931
end subroutine
932932

933+
@test
934+
subroutine test_high_temperature_ionized_ar_n2_h2
935+
936+
type(Mixture) :: products
937+
type(Mixture) :: reactants
938+
type(EqSolver) :: solver
939+
type(EqSolution) :: soln
940+
character(snl), allocatable :: product_names(:)
941+
integer :: idx_ar_plus, idx_h_plus, idx_n_plus, idx_electron
942+
real(dp) :: pressure, weights(3)
943+
real(dp), parameter :: tol = 1.0d-6
944+
945+
reactants = Mixture(all_thermo, ['Ar', 'N2', 'H2'], ions=.true.)
946+
product_names = reactants%get_products(all_thermo)
947+
products = Mixture(all_thermo, product_names, ions=.true.)
948+
949+
solver = EqSolver(products, reactants, ions=.true.)
950+
soln = EqSolution(solver)
951+
952+
weights = reactants%weights_from_moles([0.75d0, 0.10d0, 0.15d0])
953+
pressure = atm_to_bar(1.0d0)
954+
955+
call solver%solve(soln, 'tp', 20000.0d0, pressure, weights)
956+
957+
idx_ar_plus = findloc(products%species_names, 'Ar+', dim=1)
958+
idx_h_plus = findloc(products%species_names, 'H+', dim=1)
959+
idx_n_plus = findloc(products%species_names, 'N+', dim=1)
960+
idx_electron = findloc(products%species_names, 'e-', dim=1)
961+
962+
@assertTrue(soln%converged)
963+
@assertRelativelyEqual(20000.0d0, soln%T, tol)
964+
@assertRelativelyEqual(7.426681957390653d-2, soln%n, tol)
965+
966+
! Major ionized-species mole fractions agree with the CEA2 high-temperature reference case.
967+
@assertRelativelyEqual(2.9875203384714055d-1, soln%nj(idx_ar_plus)/soln%n, tol)
968+
@assertRelativelyEqual(1.1399947689736623d-1, soln%nj(idx_h_plus)/soln%n, tol)
969+
@assertRelativelyEqual(7.8210494984876172d-2, soln%nj(idx_n_plus)/soln%n, tol)
970+
@assertRelativelyEqual(4.9096191012797125d-1, soln%nj(idx_electron)/soln%n, tol)
971+
972+
end subroutine
973+
933974
@test
934975
subroutine test_negative_reactant
935976
type(Mixture) :: products

0 commit comments

Comments
 (0)