diff --git a/include/cantera/transport/MixTransport.h b/include/cantera/transport/MixTransport.h index b75f55ca5..11c059e1f 100644 --- a/include/cantera/transport/MixTransport.h +++ b/include/cantera/transport/MixTransport.h @@ -60,7 +60,7 @@ public: MixTransport() = default; virtual std::string transportModel() const { - return (m_mode == CK_Mode) ? "mixture-averaged-CK" : "Mix"; + return (m_mode == CK_Mode) ? "mixture-averaged-CK" : "mixture-averaged"; } //! Return the thermal diffusion coefficients diff --git a/include/cantera/transport/MultiTransport.h b/include/cantera/transport/MultiTransport.h index d34ae0344..f6c7b9774 100644 --- a/include/cantera/transport/MultiTransport.h +++ b/include/cantera/transport/MultiTransport.h @@ -33,7 +33,7 @@ public: MultiTransport(ThermoPhase* thermo=0); virtual std::string transportModel() const { - return (m_mode == CK_Mode) ? "multicomponent-CK" : "Multi"; + return (m_mode == CK_Mode) ? "multicomponent-CK" : "multicomponent"; } //! Return the thermal diffusion coefficients (kg/m/s) diff --git a/interfaces/cython/cantera/_onedim.pyx b/interfaces/cython/cantera/_onedim.pyx index bd07c4e9c..c32de628c 100644 --- a/interfaces/cython/cantera/_onedim.pyx +++ b/interfaces/cython/cantera/_onedim.pyx @@ -1227,9 +1227,9 @@ cdef class Sim1D: # Do initial solution steps without multicomponent transport transport = self.transport_model - solve_multi = self.transport_model == 'Multi' + solve_multi = self.transport_model == 'multicomponent' if solve_multi: - set_transport('Mix') + set_transport('mixture-averaged') def log(msg, *args): if loglevel: @@ -1340,7 +1340,7 @@ cdef class Sim1D: if solve_multi: log('Solving with multicomponent transport') - set_transport('Multi') + set_transport('multicomponent') if soret_doms: log('Solving with Soret diffusion') diff --git a/interfaces/matlab/toolbox/@Solution/Solution.m b/interfaces/matlab/toolbox/@Solution/Solution.m index 3518bfe11..8cd072b1e 100644 --- a/interfaces/matlab/toolbox/@Solution/Solution.m +++ b/interfaces/matlab/toolbox/@Solution/Solution.m @@ -18,7 +18,8 @@ function s = Solution(src, id, trans) % included in ``input.yaml``, it will be included in the :mat:func:`Solution` % instance with the default transport modeling as set % in the input file. To specify the transport modeling, set the input -% argument ``trans`` to one of ``'default'``, ``'None'``, ``'Mix'``, or ``'Multi'``. +% argument ``trans`` to one of ``'default'``, ``'None'``, or specific transport model +% such as ``'mixture-averaged'`` or ``'multicomponent'``. % In this case, the phase name must be specified as well. Alternatively, % change the ``transport`` field in the YAML file before loading the phase. The % transport modeling cannot be changed once the phase is loaded. @@ -39,7 +40,7 @@ function s = Solution(src, id, trans) % import as specified in the YAML file. % :param trans: % String, transport modeling. Possible values are ``'default'``, ``'None'``, -% ``'Mix'``, or ``'Multi'``. If not specified, ``'default'`` is used. +% or a specific transport model name. If not specified, ``'default'`` is used. % :return: % Instance of class :mat:func:`Solution` % @@ -51,12 +52,7 @@ k = Kinetics(t, src, id); s.kin = k; s.th = t; if nargin == 3 - if (strcmp(trans, 'default') || strcmp(trans, 'None')... - || strcmp(trans, 'Mix') || strcmp(trans, 'Multi')) - tr = Transport(t, trans, 0); - else - error('Unknown transport modeling specified.') - end + tr = Transport(t, trans, 0); else tr = Transport(t, 'default', 0); end diff --git a/interfaces/matlab/toolbox/@Transport/Transport.m b/interfaces/matlab/toolbox/@Transport/Transport.m index a1894a03d..fa3802df7 100644 --- a/interfaces/matlab/toolbox/@Transport/Transport.m +++ b/interfaces/matlab/toolbox/@Transport/Transport.m @@ -4,16 +4,17 @@ function tr = Transport(th, model, loglevel) % Create a new instance of class :mat:func:`Transport`. One to three arguments % may be supplied. The first must be an instance of class % :mat:func:`ThermoPhase`. The second (optional) argument is the type of -% model desired, specified by the string ``'default'``, ``'Mix'`` or -% ``'Multi'``. ``'default'`` uses the default transport specified in the +% model desired, specified by the string ``'default'`` or a specific transport model +% name such as ``'mixture-averaged'`` or ``'multicomponent'``. +% ``'default'`` uses the default transport specified in the % phase definition. The third argument is the logging level desired. % % :param th: % Instance of class :mat:func:`ThermoPhase` % :param model: % String indicating the transport model to use. Possible values -% are ``'default'``, ``'None'``, ``'Mix'``, and ``'Multi'``. -% Optional. +% are ``'default'``, ``'None'``, ``'mixture-averaged'``, and ``'multicomponent'``, +% among others. Optional. % :param loglevel: % Level of diagnostic logging. Default if not specified is 4. % :return: diff --git a/interfaces/matlab/toolbox/@Transport/mixDiffCoeffs.m b/interfaces/matlab/toolbox/@Transport/mixDiffCoeffs.m index 03daf9ee6..d50b56ee3 100644 --- a/interfaces/matlab/toolbox/@Transport/mixDiffCoeffs.m +++ b/interfaces/matlab/toolbox/@Transport/mixDiffCoeffs.m @@ -2,16 +2,15 @@ function v = mixDiffCoeffs(a) % MIXDIFFCOEFFS Get the mixture-averaged diffusion coefficients. % v = mixDiffCoeffs(a) % Object ``a`` must belong to a class derived from -% Transport, and that was constructed by specifying the ``'Mix'`` -% option. If ``'Mix'`` was not specified, you will get the error message :: +% Transport, and that was constructed using a model that implements +% mixture-averaged transport properties. If not, you will get the error message :: % % **** Method getMixDiffCoeffs not implemented. **** % -% In this case, try method :mat:func:`multiDiffCoeffs`, or create a -% new gas mixture model that uses a mixture-averaged transport manager, -% for example:: +% In this case, create a new gas mixture model that uses a mixture-averaged +% transport manager, for example:: % -% >> gas = GRI30('Mix'); +% >> gas = GRI30('mixture-averaged'); % % See also: :mat:func:`MultiDiffCoeffs` % diff --git a/interfaces/matlab/toolbox/@Transport/multiDiffCoeffs.m b/interfaces/matlab/toolbox/@Transport/multiDiffCoeffs.m index 37fe13ae3..2fdf2abd0 100644 --- a/interfaces/matlab/toolbox/@Transport/multiDiffCoeffs.m +++ b/interfaces/matlab/toolbox/@Transport/multiDiffCoeffs.m @@ -2,8 +2,8 @@ function v = multiDiffCoeffs(a) % MULTIDIFFCOEFFS Get the multicomponent diffusion coefficients. % v = multiDiffCoeffs(a) % Object ``a`` must belong to a class derived from -% Transport, and that was constructed by specifying the ``'Multi'`` -% option. If ``'Multi'`` was not specified, you will get the +% Transport, and that was constructed by specifying the ``'multicomponent'`` +% option. If ``'multicomponent'`` was not specified, you will get the % error message :: % % **** Method getMultiDiffCoeffs not implemented. **** @@ -12,7 +12,7 @@ function v = multiDiffCoeffs(a) % new gas mixture model that uses a mixture-averaged transport manager, % for example:: % -% >> gas = GRI30('Multi'); +% >> gas = GRI30('multicompnent'); % % :param a: % Instance of class :mat:func:`Transport` (or another diff --git a/interfaces/matlab/toolbox/@Transport/thermalDiffCoeffs.m b/interfaces/matlab/toolbox/@Transport/thermalDiffCoeffs.m index 644ff68c4..fc0f1fca5 100644 --- a/interfaces/matlab/toolbox/@Transport/thermalDiffCoeffs.m +++ b/interfaces/matlab/toolbox/@Transport/thermalDiffCoeffs.m @@ -2,8 +2,8 @@ function v = thermalDiffCoeffs(a) % THERMALDIFFCOEFFS Get the thermal diffusion coefficients. % v = thermalDiffCoeffs(a) % Object ``a`` must belong to a class derived from -% Transport, and that was constructed by specifying the ``'Multi'`` -% option. If ``'Multi'`` was not specified, the returned values will +% Transport, and that was constructed by specifying the ``'multicomponent'`` +% option. If ``'multicomponent'`` was not specified, the returned values will % all be zero. % % :param a: diff --git a/interfaces/matlab/toolbox/GRI30.m b/interfaces/matlab/toolbox/GRI30.m index 398e10b84..9bd8dac97 100644 --- a/interfaces/matlab/toolbox/GRI30.m +++ b/interfaces/matlab/toolbox/GRI30.m @@ -19,13 +19,13 @@ function s = GRI30(tr) % % .. code-block:: matlab % -% g1 = GRI30 % mixture-averaged transport properties -% g2 = GRI30('Mix') % mixture-averaged transport properties -% g3 = GRI30('Multi') % miulticomponent transport properties -% g4 = GRI30('None') % no transport properties +% g1 = GRI30 % mixture-averaged transport properties +% g2 = GRI30('mixture-averaged') % mixture-averaged transport properties +% g3 = GRI30('multicomponent') % miulticomponent transport properties +% g4 = GRI30('None') % no transport properties % % :param tr: -% Transport modeling, ``'None'``, ``'Mix'``, or ``'Multi'`` +% Transport modeling, ``'None'``, ``'mixture-averaged'``, or ``'multicomponent'`` % :return: % Instance of class :mat:func:`Solution` % @@ -33,15 +33,7 @@ function s = GRI30(tr) if nargin == 0 s = Solution('gri30.yaml', 'gri30'); elseif nargin == 1 - if strcmp(tr, 'None') - s = Solution('gri30.yaml', 'gri30', 'None'); - elseif strcmp(tr, 'Mix') - s = Solution('gri30.yaml', 'gri30', 'Mix'); - elseif strcmp(tr, 'Multi') - s = Solution('gri30.yaml', 'gri30', 'Multi') - else - error('Unknown transport specified. "None", "Mix", or "Multi" are supported.') - end + s = Solution('gri30.yaml', 'gri30', tr); else error('Wrong number of arguments.'); end diff --git a/samples/cxx/gas_transport/gas_transport.cpp b/samples/cxx/gas_transport/gas_transport.cpp index da9572332..7765c5ebe 100644 --- a/samples/cxx/gas_transport/gas_transport.cpp +++ b/samples/cxx/gas_transport/gas_transport.cpp @@ -48,7 +48,7 @@ void write_csv(const std::string& name, const std::vector& names, void transport_example() { // create a gas mixture, and set its state - auto sol = newSolution("gri30.yaml", "gri30", "Mix"); + auto sol = newSolution("gri30.yaml", "gri30", "mixture-averaged"); auto gas = sol->thermo(); double temp = 500.0; double pres = 2.0*OneAtm; diff --git a/samples/f77/demo.f b/samples/f77/demo.f index 18127fced..057571543 100644 --- a/samples/f77/demo.f +++ b/samples/f77/demo.f @@ -23,7 +23,7 @@ c write(*,*) write(*,*) '******** Fortran 77 Test Program ********' - call newIdealGasMix('h2o2.yaml','ohmech','Mix') + call newIdealGasMix('h2o2.yaml','ohmech','mixture-averaged') t = 1200.0 p = 101325.0 call setState_TPX_String(t, p, diff --git a/samples/matlab/catcomb.m b/samples/matlab/catcomb.m index 8c5d96cb7..a7147cd25 100644 --- a/samples/matlab/catcomb.m +++ b/samples/matlab/catcomb.m @@ -26,7 +26,7 @@ p = oneatm; % pressure tinlet = 300.0; % inlet temperature tsurf = 900.0; % surface temperature mdot = 0.06; % kg/m^2/s -transport = 'Mix'; % transport model +transport = 'mixture-averaged'; % transport model % We will solve first for a hydrogen/air case to % use as the initial estimate for the methane/air case diff --git a/samples/matlab/diffflame.m b/samples/matlab/diffflame.m index 3a5b93b28..5fb861749 100644 --- a/samples/matlab/diffflame.m +++ b/samples/matlab/diffflame.m @@ -17,7 +17,7 @@ p = oneatm; % Pressure tin = 300.0; % Inlet temperature mdot_o = 0.72; % Air mass flux, kg/m^2/s mdot_f = 0.24; % Fuel mass flux, kg/m^2/s -transport = 'Mix'; % Transport model +transport = 'mixture-averaged'; % Transport model % NOTE: Transport model needed if mechanism file does not have transport % properties. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/samples/matlab/flame1.m b/samples/matlab/flame1.m index 0e7850ced..1d4c91ffa 100644 --- a/samples/matlab/flame1.m +++ b/samples/matlab/flame1.m @@ -36,7 +36,7 @@ max_jacobian_age = [5, 10]; % This object will be used to evaluate all thermodynamic, kinetic, % and transport properties % -gas = Solution(rxnmech, 'ohmech', 'Mix'); +gas = Solution(rxnmech, 'ohmech', 'mixture-averaged'); % set its state to that of the unburned gas at the burner set(gas,'T', tburner, 'P', p, 'X', comp); diff --git a/samples/matlab/flame2.m b/samples/matlab/flame2.m index 74ffdacd3..fb0c24383 100644 --- a/samples/matlab/flame2.m +++ b/samples/matlab/flame2.m @@ -33,7 +33,7 @@ refine_grid = 1; % 1 to enable refinement, 0 to % This object will be used to evaluate all thermodynamic, kinetic, % and transport properties % -gas = Solution(rxnmech,'gri30','Mix'); +gas = Solution(rxnmech,'gri30','mixture-averaged'); % set its state to that of the fuel (arbitrary) set(gas,'T', tin, 'P', p, 'X', comp2); diff --git a/samples/matlab/prandtl1.m b/samples/matlab/prandtl1.m index 3aadcd85b..975c6d083 100644 --- a/samples/matlab/prandtl1.m +++ b/samples/matlab/prandtl1.m @@ -12,7 +12,7 @@ help prandtl1 if nargin == 1 gas = g; else - gas = Solution('h2o2.yaml', 'ohmech', 'Mix'); + gas = Solution('h2o2.yaml', 'ohmech', 'mixture-averaged'); end pr = zeros(31,31); diff --git a/samples/matlab/prandtl2.m b/samples/matlab/prandtl2.m index e8b8dda2c..23de6c38a 100644 --- a/samples/matlab/prandtl2.m +++ b/samples/matlab/prandtl2.m @@ -11,7 +11,7 @@ help prandtl2 if nargin == 1 gas = g; else - gas = Solution('h2o2.yaml', 'ohmech', 'Multi'); + gas = Solution('h2o2.yaml', 'ohmech', 'multicomponent'); end pr = zeros(31,31); diff --git a/samples/matlab/tut2.m b/samples/matlab/tut2.m index 691973352..5f589950c 100644 --- a/samples/matlab/tut2.m +++ b/samples/matlab/tut2.m @@ -18,7 +18,7 @@ t0 = cputime; % GRI-Mech 3.0. Another way to do this is shown here, with statements % added to measure how long this takes: -gas1 = Solution('gri30.yaml', 'gas', 'Mix'); +gas1 = Solution('gri30.yaml', 'gas', 'mixture-averaged'); msg = sprintf('time to create gas1: %f', cputime - t0) % Function 'Solution' constructs an object representing a phase of diff --git a/samples/matlab/tut6.m b/samples/matlab/tut6.m index 2bdf2a185..0de6b634a 100644 --- a/samples/matlab/tut6.m +++ b/samples/matlab/tut6.m @@ -29,11 +29,11 @@ % To use the multicomponent model with GRI-Mech 3.0, call function % GRI30 as follows: -g1 = GRI30('Multi') +g1 = GRI30('multicomponent') % To use the mixture-averaged model: -g2 = GRI30('Mix') +g2 = GRI30('mixture-averaged') % Both models use a mixture-averaged formulation for the viscosity. visc = [viscosity(g1), viscosity(g2)] diff --git a/samples/python/kinetics/extract_submechanism.py b/samples/python/kinetics/extract_submechanism.py index a9297b7f4..2d02ee6c3 100644 --- a/samples/python/kinetics/extract_submechanism.py +++ b/samples/python/kinetics/extract_submechanism.py @@ -56,7 +56,8 @@ print('\n') gas1 = ct.Solution(input_file) gas2 = ct.Solution(name="gri30-CO-H2-submech", - thermo="ideal-gas", kinetics="gas", transport_model="Mix", + thermo="ideal-gas", kinetics="gas", + transport_model="mixture-averaged", species=species, reactions=reactions) # Save the resulting mechanism for later use diff --git a/samples/python/onedim/adiabatic_flame.py b/samples/python/onedim/adiabatic_flame.py index 0297d573d..1bc8d3a24 100644 --- a/samples/python/onedim/adiabatic_flame.py +++ b/samples/python/onedim/adiabatic_flame.py @@ -29,7 +29,7 @@ f.set_refine_criteria(ratio=3, slope=0.06, curve=0.12) f.show_solution() # Solve with mixture-averaged transport model -f.transport_model = 'Mix' +f.transport_model = 'mixture-averaged' f.solve(loglevel=loglevel, auto=True) if "native" in ct.hdf_support(): @@ -45,7 +45,7 @@ f.show_solution() print(f"mixture-averaged flamespeed = {f.velocity[0]:7f} m/s") # Solve with multi-component transport properties -f.transport_model = 'Multi' +f.transport_model = 'multicomponent' f.solve(loglevel) # don't use 'auto' on subsequent solves f.show_solution() print(f"multicomponent flamespeed = {f.velocity[0]:7f} m/s") diff --git a/samples/python/onedim/burner_flame.py b/samples/python/onedim/burner_flame.py index 4001476ef..e4323c1bb 100644 --- a/samples/python/onedim/burner_flame.py +++ b/samples/python/onedim/burner_flame.py @@ -24,7 +24,7 @@ f.burner.mdot = mdot f.set_refine_criteria(ratio=3.0, slope=0.05, curve=0.1) f.show_solution() -f.transport_model = 'Mix' +f.transport_model = 'mixture-averaged' f.solve(loglevel, auto=True) if "native" in ct.hdf_support(): @@ -35,7 +35,7 @@ output.unlink(missing_ok=True) f.save(output, name="mix", description="solution with mixture-averaged transport") -f.transport_model = 'Multi' +f.transport_model = 'multicomponent' f.solve(loglevel) # don't use 'auto' on subsequent solves f.show_solution() f.save(output, name="multi", description="solution with multicomponent transport") diff --git a/samples/python/onedim/flame_fixed_T.py b/samples/python/onedim/flame_fixed_T.py index 5a9b5055e..2829d1d99 100644 --- a/samples/python/onedim/flame_fixed_T.py +++ b/samples/python/onedim/flame_fixed_T.py @@ -57,7 +57,7 @@ f.show_solution() f.energy_enabled = False # first solve the flame with mixture-averaged transport properties -f.transport_model = 'Mix' +f.transport_model = 'mixture-averaged' f.set_refine_criteria(ratio=3.0, slope=0.3, curve=1) f.solve(loglevel, refine_grid) @@ -71,7 +71,7 @@ output.unlink(missing_ok=True) f.save(output, name="mix", description="solution with mixture-averaged transport") print('\n\n switching to multicomponent transport...\n\n') -f.transport_model = 'Multi' +f.transport_model = 'multicomponent' f.set_refine_criteria(ratio=3.0, slope=0.1, curve=0.2) f.solve(loglevel, refine_grid) diff --git a/samples/python/onedim/premixed_counterflow_twin_flame.py b/samples/python/onedim/premixed_counterflow_twin_flame.py index 476da9c8b..fb40e9a38 100644 --- a/samples/python/onedim/premixed_counterflow_twin_flame.py +++ b/samples/python/onedim/premixed_counterflow_twin_flame.py @@ -103,7 +103,7 @@ oppFlame = ct.CounterflowTwinPremixedFlame(gas, width=width) # Uncomment the following line to use a Multi-component formulation. Default is # mixture-averaged -# oppFlame.transport_model = 'Multi' +# oppFlame.transport_model = 'multicomponent' # Now run the solver. The solver returns the peak temperature, strain rate and # the point which we ascribe to the characteristic strain rate. diff --git a/samples/python/surface_chemistry/catalytic_combustion.py b/samples/python/surface_chemistry/catalytic_combustion.py index 548d36cfa..20b8ccc42 100644 --- a/samples/python/surface_chemistry/catalytic_combustion.py +++ b/samples/python/surface_chemistry/catalytic_combustion.py @@ -22,7 +22,7 @@ p = ct.one_atm # pressure tinlet = 300.0 # inlet temperature tsurf = 900.0 # surface temperature mdot = 0.06 # kg/m^2/s -transport = 'Mix' # transport model +transport = 'mixture-averaged' # transport model # We will solve first for a hydrogen/air case to use as the initial estimate # for the methane/air case diff --git a/samples/python/transport/multiprocessing_viscosity.py b/samples/python/transport/multiprocessing_viscosity.py index 262d6c93c..103fe92a9 100644 --- a/samples/python/transport/multiprocessing_viscosity.py +++ b/samples/python/transport/multiprocessing_viscosity.py @@ -28,7 +28,7 @@ def init_process(mech): initialize any Cantera objects we need to use. """ gases[mech] = ct.Solution(mech) - gases[mech].transport_model = 'Multi' + gases[mech].transport_model = 'multicomponent' def get_thermal_conductivity(args): diff --git a/src/oneD/StFlow.cpp b/src/oneD/StFlow.cpp index 0bb0868ad..01094dede 100644 --- a/src/oneD/StFlow.cpp +++ b/src/oneD/StFlow.cpp @@ -113,7 +113,7 @@ StFlow::StFlow(shared_ptr sol, const std::string& id, size_t points) "An appropriate transport model\nshould be set when instantiating the " "Solution ('gas') object.\nImplicit setting of the transport model " "is deprecated and\nwill be removed after Cantera 3.0."); - setTransportModel("Mix"); + setTransportModel("mixture-averaged"); } m_solution->registerChangedCallback(this, [this]() { setKinetics(m_solution->kinetics()); @@ -165,7 +165,7 @@ void StFlow::setTransport(shared_ptr trans) if (m_trans->transportModel() == "None") { throw CanteraError("StFlow::setTransport", "Invalid Transport model 'None'."); } - m_do_multicomponent = (m_trans->transportModel() == "Multi" || + m_do_multicomponent = (m_trans->transportModel() == "multicomponent" || m_trans->transportModel() == "multicomponent-CK"); m_diff.resize(m_nsp * m_points); @@ -249,7 +249,7 @@ void StFlow::setTransport(Transport& trans) throw CanteraError("StFlow::setTransport", "Invalid Transport model 'None'."); } - m_do_multicomponent = (m_trans->transportModel() == "Multi" || + m_do_multicomponent = (m_trans->transportModel() == "multicomponent" || m_trans->transportModel() == "multicomponent-CK"); m_diff.resize(m_nsp*m_points); @@ -855,7 +855,7 @@ void StFlow::setMeta(const AnyMap& state, int loglevel) } } - setTransportModel(state.getString("transport-model", "Mix")); + setTransportModel(state.getString("transport-model", "mixture-averaged")); if (state.hasKey("Soret-enabled")) { m_do_soret = state["Soret-enabled"].asBool(); diff --git a/src/transport/TransportFactory.cpp b/src/transport/TransportFactory.cpp index 5402a0d52..a2afa7fc1 100644 --- a/src/transport/TransportFactory.cpp +++ b/src/transport/TransportFactory.cpp @@ -33,11 +33,11 @@ TransportFactory::TransportFactory() reg("unity-Lewis-number", []() { return new UnityLewisTransport(); }); addDeprecatedAlias("unity-Lewis-number", "UnityLewis"); reg("mixture-averaged", []() { return new MixTransport(); }); - addAlias("mixture-averaged", "Mix"); + addDeprecatedAlias("mixture-averaged", "Mix"); reg("mixture-averaged-CK", []() { return new MixTransport(); }); addDeprecatedAlias("mixture-averaged-CK", "CK_Mix"); reg("multicomponent", []() { return new MultiTransport(); }); - addAlias("multicomponent", "Multi"); + addDeprecatedAlias("multicomponent", "Multi"); reg("multicomponent-CK", []() { return new MultiTransport(); }); addDeprecatedAlias("multicomponent-CK", "CK_Multi"); reg("ionized-gas", []() { return new IonGasTransport(); }); diff --git a/test/clib/test_clib.cpp b/test/clib/test_clib.cpp index ef96f34a7..4474f776b 100644 --- a/test/clib/test_clib.cpp +++ b/test/clib/test_clib.cpp @@ -63,7 +63,7 @@ TEST(ct, soln_objects) int ref = soln_newSolution("gri30.yaml", "gri30", "none"); ASSERT_EQ(ref, 0); - int ref2 = soln_newSolution("h2o2.yaml", "ohmech", "Mix"); + int ref2 = soln_newSolution("h2o2.yaml", "ohmech", "mixture-averaged"); ASSERT_EQ(ref2, 1); int thermo = soln_thermo(ref2); diff --git a/test/clib/test_ctonedim.cpp b/test/clib/test_ctonedim.cpp index d35827b41..309c28a4b 100644 --- a/test/clib/test_ctonedim.cpp +++ b/test/clib/test_ctonedim.cpp @@ -12,7 +12,7 @@ TEST(ctonedim, freeflow) { ct_resetStorage(); - int sol = soln_newSolution("h2o2.yaml", "ohmech", "Mix"); + int sol = soln_newSolution("h2o2.yaml", "ohmech", "mixture-averaged"); int ph = soln_thermo(sol); ASSERT_GE(ph, 0); int kin = soln_kinetics(sol); @@ -96,7 +96,7 @@ TEST(ctonedim, freeflame_from_parts) ct_resetStorage(); auto gas = newThermo("h2o2.yaml", "ohmech"); - int sol = soln_newSolution("h2o2.yaml", "ohmech", "Mix"); + int sol = soln_newSolution("h2o2.yaml", "ohmech", "mixture-averaged"); int ph = soln_thermo(sol); int kin = soln_kinetics(sol); int tr = soln_transport(sol); diff --git a/test/oneD/test_oneD.cpp b/test/oneD/test_oneD.cpp index 9e677bef9..9a6aa7bd2 100644 --- a/test/oneD/test_oneD.cpp +++ b/test/oneD/test_oneD.cpp @@ -11,7 +11,7 @@ using namespace Cantera; // (clib::test_ctonedim.cpp::ctonedim::freeflame_from_parts) TEST(onedim, freeflame) { - auto sol = newSolution("h2o2.yaml", "ohmech", "Mix"); + auto sol = newSolution("h2o2.yaml", "ohmech", "mixture-averaged"); auto gas = sol->thermo(); size_t nsp = gas->nSpecies(); diff --git a/test/python/test_composite.py b/test/python/test_composite.py index 65e6113d4..9d68e5e41 100644 --- a/test/python/test_composite.py +++ b/test/python/test_composite.py @@ -147,7 +147,7 @@ class TestPickle(utilities.CanteraTest): def test_pickle_gas_with_transport(self): gas = ct.Solution("h2o2.yaml") gas.TPX = 500, 500000, "H2:.75,O2:.25" - gas.transport_model = "Multi" + gas.transport_model = "multicomponent" with open(self.test_work_path / "gas.pkl", "wb") as pkl: pickle.dump(gas, pkl) @@ -157,7 +157,7 @@ class TestPickle(utilities.CanteraTest): self.assertNear(gas.P, gas2.P) self.assertArrayNear(gas.X, gas2.X) - self.assertEqual(gas2.transport_model, "Multi") + self.assertEqual(gas2.transport_model, "multicomponent") def test_pickle_interface(self): gas = ct.Solution("diamond.yaml", "gas") diff --git a/test/python/test_onedim.py b/test/python/test_onedim.py index 96a592958..f076b5130 100644 --- a/test/python/test_onedim.py +++ b/test/python/test_onedim.py @@ -134,15 +134,15 @@ class TestOnedim(utilities.CanteraTest): flame = ct.FreeFlame(gas, width=0.1) flame.set_initial_guess() - assert gas.transport_model == flame.transport_model == 'Mix' + assert gas.transport_model == flame.transport_model == 'mixture-averaged' flame.transport_model = 'unity-Lewis-number' assert gas.transport_model == flame.transport_model == 'unity-Lewis-number' Dkm_flame = flame.mix_diff_coeffs assert all(Dkm_flame[1,:] == Dkm_flame[2,:]) - gas.transport_model = 'Multi' - assert flame.transport_model == 'Multi' + gas.transport_model = 'multicomponent' + assert flame.transport_model == 'multicomponent' class TestFreeFlame(utilities.CanteraTest): @@ -177,13 +177,13 @@ class TestFreeFlame(utilities.CanteraTest): self.sim.solve(loglevel=0, refine_grid=refine) self.assertTrue(self.sim.energy_enabled) - self.assertEqual(self.sim.transport_model, 'Mix') + self.assertEqual(self.sim.transport_model, 'mixture-averaged') def solve_multi(self): - self.sim.transport_model = 'Multi' + self.sim.transport_model = 'multicomponent' self.sim.solve(loglevel=0, refine_grid=True) - self.assertEqual(self.sim.transport_model, 'Multi') + self.assertEqual(self.sim.transport_model, 'multicomponent') def test_flow_type(self): Tin = 300 @@ -374,7 +374,7 @@ class TestFreeFlame(utilities.CanteraTest): 'max_time_step_count': 100, 'energy_enabled': False, 'radiation_enabled': True, - 'transport_model': 'Multi'} + 'transport_model': 'multicomponent'} settings.update(changed) sim.settings = settings @@ -471,7 +471,7 @@ class TestFreeFlame(utilities.CanteraTest): self.sim.solve(loglevel=0, auto=True) dh_unity_lewis = self.sim.enthalpy_mass.ptp() - self.sim.transport_model = 'Mix' + self.sim.transport_model = 'mixture-averaged' self.sim.solve(loglevel=0) dh_mix = self.sim.enthalpy_mass.ptp() @@ -485,7 +485,7 @@ class TestFreeFlame(utilities.CanteraTest): self.create_sim(101325, 300, 'H2:1.0, O2:1.0') self.assertFalse(self.sim.soret_enabled) - self.assertFalse(self.sim.transport_model == 'Multi') + self.assertFalse(self.sim.transport_model == 'multicomponent') with self.assertRaisesRegex(ct.CanteraError, 'requires.*multicomponent'): self.sim.soret_enabled = True @@ -496,7 +496,7 @@ class TestFreeFlame(utilities.CanteraTest): # Test that auto solving with Soret enabled works self.create_sim(101325, 300, 'H2:2.0, O2:1.0') self.sim.soret_enabled = True - self.sim.transport_model = 'Multi' + self.sim.transport_model = 'multicomponent' self.sim.solve(loglevel=0, auto=True) def test_set_soret_multi_mix(self): @@ -504,14 +504,14 @@ class TestFreeFlame(utilities.CanteraTest): # can be set in any order without raising errors self.create_sim(101325, 300, 'H2:1.0, O2:1.0') - self.sim.transport_model = 'Multi' + self.sim.transport_model = 'multicomponent' self.sim.soret_enabled = True - self.sim.transport_model = 'Mix' + self.sim.transport_model = 'mixture-averaged' self.sim.soret_enabled = False self.sim.soret_enabled = True - self.sim.transport_model = 'Multi' + self.sim.transport_model = 'multicomponent' def test_prune(self): reactants = 'H2:1.1, O2:1, AR:5' @@ -892,7 +892,7 @@ class TestDiffusionFlame(utilities.CanteraTest): self.sim.solve(loglevel=0, refine_grid=True) self.assertTrue(self.sim.energy_enabled) - self.assertEqual(self.sim.transport_model, 'Mix') + self.assertEqual(self.sim.transport_model, 'mixture-averaged') @utilities.slow_test def test_mixture_averaged(self, saveReference=False): diff --git a/test/python/test_transport.py b/test/python/test_transport.py index d1b54ecd9..d3e67beec 100644 --- a/test/python/test_transport.py +++ b/test/python/test_transport.py @@ -31,13 +31,13 @@ class TestTransport(utilities.CanteraTest): self.assertNear(Dkm_prime[0], alpha) def test_mixtureAveraged(self): - self.assertEqual(self.phase.transport_model, 'Mix') + self.assertEqual(self.phase.transport_model, 'mixture-averaged') Dkm1 = self.phase.mix_diff_coeffs Dkm1b = self.phase.mix_diff_coeffs_mole Dkm1c = self.phase.mix_diff_coeffs_mass Dbin1 = self.phase.binary_diff_coeffs - self.phase.transport_model = 'Multi' + self.phase.transport_model = 'multicomponent' Dkm2 = self.phase.mix_diff_coeffs Dkm2b = self.phase.mix_diff_coeffs_mole Dkm2c = self.phase.mix_diff_coeffs_mass @@ -83,7 +83,7 @@ class TestTransport(utilities.CanteraTest): Dkm1 = self.phase.mix_diff_coeffs Dbin1 = self.phase.binary_diff_coeffs - self.phase.transport_model = 'Mix' + self.phase.transport_model = 'mixture-averaged' Dkm2 = self.phase.mix_diff_coeffs Dbin2 = self.phase.binary_diff_coeffs self.assertArrayNear(Dkm1, Dkm2) @@ -96,7 +96,7 @@ class TestTransport(utilities.CanteraTest): self.assertArrayNear(self.phase.thermal_diff_coeffs, np.zeros(self.phase.n_species)) - self.phase.transport_model = 'Multi' + self.phase.transport_model = 'multicomponent' self.assertTrue(all(self.phase.multi_diff_coeffs.flat >= 0.0)) self.assertTrue(all(self.phase.thermal_diff_coeffs.flat != 0.0)) @@ -110,11 +110,11 @@ class TestTransport(utilities.CanteraTest): state = 500, 2e5, 'H2:0.4, O2:0.29, CH4:0.01, H2O:0.3' gas1 = ct.Solution(thermo='ideal-gas', species=[S[s] for s in base+extra]) - gas1.transport_model = 'Mix' + gas1.transport_model = 'mixture-averaged' gas1.TPX = state gas2 = ct.Solution(thermo='ideal-gas', species=[S[s] for s in base]) - gas2.transport_model = 'Mix' + gas2.transport_model = 'mixture-averaged' for s in extra: gas2.add_species(S[s]) gas2.TPX = state @@ -134,11 +134,11 @@ class TestTransport(utilities.CanteraTest): state = 500, 2e5, 'H2:0.3, O2:0.28, CH4:0.02, H2O:0.3, N2:0.1' gas1 = ct.Solution(thermo='ideal-gas', species=[S[s] for s in base+extra]) - gas1.transport_model = 'Multi' + gas1.transport_model = 'multicomponent' gas1.TPX = state gas2 = ct.Solution(thermo='ideal-gas', species=[S[s] for s in base]) - gas2.transport_model = 'Multi' + gas2.transport_model = 'multicomponent' for s in extra: gas2.add_species(S[s]) gas2.TPX = state diff --git a/test/transport/transportFromScratch.cpp b/test/transport/transportFromScratch.cpp index fd8c5e4f3..5e15fcdec 100644 --- a/test/transport/transportFromScratch.cpp +++ b/test/transport/transportFromScratch.cpp @@ -65,7 +65,7 @@ public: TEST_F(TransportFromScratch, binaryDiffCoeffs) { - auto trRef = newTransport(ref, "Mix"); + auto trRef = newTransport(ref, "mixture-averaged"); MixTransport trTest; trTest.init(test.get()); @@ -86,7 +86,7 @@ TEST_F(TransportFromScratch, binaryDiffCoeffs) TEST_F(TransportFromScratch, mixDiffCoeffs) { - auto trRef = newTransport(ref, "Mix"); + auto trRef = newTransport(ref, "mixture-averaged"); MixTransport trTest; trTest.init(test.get()); @@ -105,7 +105,7 @@ TEST_F(TransportFromScratch, mixDiffCoeffs) TEST_F(TransportFromScratch, viscosity) { - auto trRef = newTransport(ref, "Mix"); + auto trRef = newTransport(ref, "mixture-averaged"); MixTransport trTest; trTest.init(test.get()); @@ -119,7 +119,7 @@ TEST_F(TransportFromScratch, viscosity) TEST_F(TransportFromScratch, thermalConductivityMix) { - auto trRef = newTransport(ref, "Mix"); + auto trRef = newTransport(ref, "mixture-averaged"); MixTransport trTest; trTest.init(test.get()); @@ -134,7 +134,7 @@ TEST_F(TransportFromScratch, thermalConductivityMix) TEST_F(TransportFromScratch, multiDiffCoeffs) { - auto trRef = newTransport(ref, "Multi"); + auto trRef = newTransport(ref, "multicomponent"); MultiTransport trTest; trTest.init(test.get()); @@ -155,7 +155,7 @@ TEST_F(TransportFromScratch, multiDiffCoeffs) TEST_F(TransportFromScratch, thermalConductivityMulti) { - auto trRef = newTransport(ref, "Multi"); + auto trRef = newTransport(ref, "multicomponent"); MultiTransport trTest; trTest.init(test.get()); diff --git a/test/transport/transportModels.cpp b/test/transport/transportModels.cpp index 4f274cb48..9d3123fd3 100644 --- a/test/transport/transportModels.cpp +++ b/test/transport/transportModels.cpp @@ -128,7 +128,7 @@ shared_ptr DefaultTransportTest::soln_; TEST_F(DefaultTransportTest, check_type) { auto tr = soln_->transport(); - ASSERT_EQ(tr->transportModel(), "Mix"); + ASSERT_EQ(tr->transportModel(), "mixture-averaged"); } TEST_F(DefaultTransportTest, check_scalar) diff --git a/test_problems/mixGasTransport/mixGasTransport.cpp b/test_problems/mixGasTransport/mixGasTransport.cpp index bd72e4401..b81f4ec99 100644 --- a/test_problems/mixGasTransport/mixGasTransport.cpp +++ b/test_problems/mixGasTransport/mixGasTransport.cpp @@ -32,7 +32,7 @@ using namespace Cantera; int main(int argc, char** argv) { try { - auto sol = newSolution("gri30.yaml", "gri30", "Mix"); + auto sol = newSolution("gri30.yaml", "gri30", "mixture-averaged"); auto gas = sol->thermo(); size_t nsp = gas->nSpecies(); double pres = 1.0E5; diff --git a/test_problems/multiGasTransport/multiGasTransport.cpp b/test_problems/multiGasTransport/multiGasTransport.cpp index 0820b25e5..6f1c82606 100644 --- a/test_problems/multiGasTransport/multiGasTransport.cpp +++ b/test_problems/multiGasTransport/multiGasTransport.cpp @@ -40,7 +40,7 @@ static double cutoff(double val, double atol=1.0E-15) int main(int argc, char** argv) { try { - auto sol = newSolution("gri30.yaml", "gri30", "Multi"); + auto sol = newSolution("gri30.yaml", "gri30", "multicomponent"); auto gas = sol->thermo(); size_t nsp = gas->nSpecies(); double pres = 1.0E5;