diff --git a/test/matlab/TestThermo.m b/test/matlab/TestThermo.m index 1f1fdeccc..8b8998493 100644 --- a/test/matlab/TestThermo.m +++ b/test/matlab/TestThermo.m @@ -11,7 +11,7 @@ classdef TestThermo < TestCase function setUp(self) global staticTestThermoGas if isempty(staticTestThermoGas) - staticTestThermoGas = importPhase('../data/steam-reforming.xml', 'full'); + staticTestThermoGas = Solution('../data/steam-reforming.xml', 'full'); end self.gas = staticTestThermoGas; set(self.gas, 'T', 300, 'P', oneatm, 'Y', [0.5, 0, 0.5, 0, 0, 0, 0]); @@ -38,7 +38,7 @@ classdef TestThermo < TestCase assertEqual(i, speciesIndex(self.gas, name)) end end - + function test_nAtoms(self) assertEqual(nAtoms(self.gas, 1, 3), 4) assertEqual(nAtoms(self.gas, 1, 4), 0) @@ -46,7 +46,7 @@ classdef TestThermo < TestCase assertExceptionThrown(@() nAtoms(self.gas, 2, 5), '') assertExceptionThrown(@() nAtoms(self.gas, 8, 1), '') end - + function testSetState(self) u0 = intEnergy_mass(self.gas); h0 = enthalpy_mass(self.gas); @@ -54,15 +54,15 @@ classdef TestThermo < TestCase v0 = 1/density(self.gas); T0 = temperature(self.gas); P0 = pressure(self.gas); - + set(self.gas, 'T', 400, 'P', 5*oneatm); assertAlmostEqual(temperature(self.gas), 400) assertAlmostEqual(pressure(self.gas), 5*oneatm) - + set(self.gas, 'H', h0, 'P', P0); assertAlmostEqual(temperature(self.gas), T0, 1e-8) assertAlmostEqual(entropy_mass(self.gas), s0, 1e-8) - + set(self.gas, 'T', 400, 'P', 5*oneatm); set(self.gas, 'U', u0, 'V', v0); assertAlmostEqual(pressure(self.gas), P0, 1e-8) diff --git a/test/matlab/testImport.m b/test/matlab/testImport.m index c5d395bcd..e02939d0e 100644 --- a/test/matlab/testImport.m +++ b/test/matlab/testImport.m @@ -2,12 +2,12 @@ function test_suite = testImport initTestSuite; function testImportXML -gas = importPhase('gri30.xml', 'gri30_mix'); +gas = Solution('gri30.xml', 'gri30_mix'); dkm = mixDiffCoeffs(gas); assertEqual(length(dkm), nSpecies(gas)) function testImportCTI -gas = importPhase('h2o2.cti'); +gas = Solution('h2o2.cti'); assertEqual(temperature(gas), 300) cleanup()