@@ -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