When instantiating a phase from a .cti file, do the conversion in memory, without writing the XML representation to disk. This eliminates the unrequrested XML files that Cantera normally generates, and also avoids errors when running Cantera from a directory where the user does not have write permissons.
11 lines
273 B
Matlab
11 lines
273 B
Matlab
function test_suite = testImport
|
|
initTestSuite;
|
|
|
|
function testImportXML
|
|
gas = importPhase('gri30.xml', 'gri30_mix');
|
|
dkm = mixDiffCoeffs(gas);
|
|
assertEqual(length(dkm), nSpecies(gas))
|
|
|
|
function testImportCTI
|
|
gas = importPhase('h2o2.cti');
|
|
assertEqual(temperature(gas), 300)
|