Skip to content

Commit 97f9765

Browse files
committed
[test] update tests
1 parent 05c24fe commit 97f9765

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

test/data/air-plasma.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ phases:
1616
energy-levels: [0.0, 2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0, 18.0, 20.0, 22.0,
1717
24.0, 26.0, 28.0, 30.0, 32.0, 34.0, 36.0, 38.0, 40.0]
1818

19+
- name: air-plasma-default-ELs
20+
thermo: plasma
21+
kinetics: gas
22+
species:
23+
- nasa_gas.yaml/species: [Electron, O2, N2, O2+, N2+, O, O2-]
24+
state: {T: 300.0, P: 1 atm, X: {O2: 0.21, N2: 0.79}}
25+
electron-energy-distribution:
26+
type: Boltzmann-two-term
27+
1928
reactions:
2029
- equation: O2 + Electron => Electron + Electron + O2+
2130
type: electron-collision-plasma

test/python/test_thermo.py

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,28 +1328,21 @@ def test_elastic_power_loss_change_shape_factor(self, phase):
13281328

13291329
def test_eedf_solver(self):
13301330

1331-
phase = ct.Solution('air-plasma.yaml')
1331+
phase = ct.Solution('air-plasma.yaml','air-plasma-Phelps')
13321332
phase.TPX = 300., 101325., 'N2:0.79, O2:0.21, N2+:1E-10, Electron:1E-10'
13331333
phase.reduced_electric_field = 200.0 * 1e-21 # Reduced electric field [V.m^2]
13341334
phase.update_electron_energy_distribution()
13351335

13361336
grid = phase.electron_energy_levels
13371337
eedf = phase.electron_energy_distribution
13381338

1339-
reference_grid = np.logspace(-1, np.log10(60))
1340-
13411339
reference_eedf = np.array([
1342-
9.1027381e-02, 9.1026393e-02, 9.1025267e-02, 9.1023985e-02, 9.1022523e-02,
1343-
9.1020858e-02, 9.1015025e-02, 9.1006713e-02, 9.0997242e-02, 9.0986450e-02,
1344-
9.0974154e-02, 9.0954654e-02, 9.0923885e-02, 9.0888824e-02, 9.0842837e-02,
1345-
9.0775447e-02, 9.0695937e-02, 9.0578309e-02, 9.0398980e-02, 9.0118320e-02,
1346-
8.9293838e-02, 8.7498617e-02, 8.3767419e-02, 7.5765714e-02, 6.4856820e-02,
1347-
5.5592157e-02, 4.9309310e-02, 4.5268611e-02, 4.2261381e-02, 3.9440745e-02,
1348-
3.6437762e-02, 3.3181527e-02, 2.9616717e-02, 2.5795007e-02, 2.1676205e-02,
1349-
1.7347058e-02, 1.3022044e-02, 8.9705614e-03, 5.5251937e-03, 3.1894295e-03,
1350-
1.7301525e-03, 8.4647152e-04, 3.6030983e-04, 1.2894755e-04, 3.7416645e-05,
1351-
8.4693678e-06, 1.4299900e-06, 1.7026957e-07, 1.3992350e-08, 1.5340110e-09
1352-
])
1340+
0.09103376, 0.09103349, 0.09103313, 0.09103262, 0.09103193,
1341+
0.09103097, 0.09102965, 0.09102784, 0.09102534, 0.0910219,
1342+
0.09100814, 0.09098309, 0.09093237, 0.0908309, 0.09062281,
1343+
0.09005469, 0.08573433, 0.06499493, 0.0473475, 0.0,
1344+
0.0])
1345+
reference_grid = np.logspace(-1, np.log10(60), reference_eedf.size)
13531346

13541347
interp = np.interp(reference_grid, grid, eedf, left=0.0, right=0.0)
13551348

test/zeroD/test_zeroD.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ TEST(zerodim, test_individual_reactor_initialization)
193193

194194
TEST(zerodim, plasma_reactor_energy)
195195
{
196-
auto sol = newSolution("air-plasma.yaml", "air-plasma-Phelps", "none");
196+
auto sol = newSolution("air-plasma.yaml", "air-plasma-default-ELs", "none");
197197
auto thermo = sol->thermo();
198198
auto* plasma = dynamic_cast<PlasmaPhase*>(thermo.get());
199199
ASSERT_NE(plasma, nullptr);

0 commit comments

Comments
 (0)