Changed several naming conventions to match main branch.

This commit is contained in:
ssun30 2023-03-15 20:25:16 -04:00 committed by Ray Speth
parent 7f7a0fa34c
commit df17f4ead3
11 changed files with 28 additions and 25 deletions

View File

@ -19,8 +19,8 @@ classdef Solution < handle & ThermoPhase & Kinetics & Transport
% ``phase_name``. If a :mat:class:`Transport` model is included in ``input.yaml``,
% it will be included in the :mat:class:`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'``.
% set the input argument ``trans`` to one of ``'default'``, ``'none'``,
% ``'mixture-averaged'``, or ``'multicomponent'``.
% In this case, the phase name must be specified as well. Alternatively,
% change the ``transport`` node in the YAML file, or ``transport``
% property in the CTI file before loading the phase. The transport
@ -41,8 +41,9 @@ classdef Solution < handle & ThermoPhase & Kinetics & Transport
% :param id:
% ID of the phase to 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.
% String, transport modeling. Possible values are ``'default'``, ``'none'``,
% ``'mixture-averaged'``, or ``'multicomponent'``. If not specified,
% ``'default'`` is used.
% :return:
% Instance of class :mat:class:`Solution`.
@ -66,8 +67,8 @@ classdef Solution < handle & ThermoPhase & Kinetics & Transport
s@ThermoPhase(src, id);
s@Kinetics(tp, src, id);
if nargin == 3
if ~(strcmp(trans, 'default') || strcmp(trans, 'None')...
|| strcmp(trans, 'Mix') || strcmp(trans, 'Multi'))
if ~(strcmp(trans, 'default') || strcmp(trans, 'none')...
|| strcmp(trans, 'mixture-averaged') || strcmp(trans, 'multicomponent'))
error('Unknown transport modelling specified.');
end
else

View File

@ -37,15 +37,17 @@ classdef Transport < handle
% Create a new instance of class :mat:class:`Transport`. One to three
% arguments may be supplied. The first must be an instance of class
% :mat:class:`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
% phase definition. The third argument is the logging level desired.
% model desired, specified by the string ``'default'``,
% ``'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:class:`ThermoPhase`
% :param model:
% String indicating the transport model to use. Possible values
% are ``'default'``, ``'None'``, ``'Mix'``, and ``'Multi'``.
% are ``'default'``, ``'none'``, ``'mixture-averaged'``,
% and ``'multicomponent'``.
% Optional.
% :param loglevel:
% Level of diagnostic logging. Default if not specified is 4.

View File

@ -12,9 +12,9 @@ Installation guide:
3. For first time users, launch Matlab, then navigate to [/path/to/cantera/source/code]
using "Browse for Folder". 3.5) Note for Ubuntu users, Matlab must be launched from
the terminal using the following command:
`LD_PRELOAD='/usr/lib/x86_64-linux-gnu/libstdc++.so.6' matlab`. This is because
Matlab does not load the correct GLIBC++ library on start-up and will return an error
when loading the Cantera toolbox.
`LD_PRELOAD='/usr/lib/x86_64-linux-gnu/libstdc++.so.6' matlab -softwareopengl`.
This is because Matlab does not load the correct GLIBC++ library on start-up and
will return an error when loading the Cantera toolbox.
4. In the Maltab command window, run
`addpath(genpath([pwd, '/interfaces/matlab_experimental']))` to add search path for
the experimental toolbox.
@ -31,9 +31,9 @@ Installation guide:
and samples files are removed (if it's already installed). Having both the current
and experimental version of the toolbox in the search path will lead to conflicts.
9. In the Matlab command window, run `savepath` to save all search paths.
10. To start using the experimental toolbox, run `LoadCantera` command.
11. To stop using the new Cantera interface, run the following commands: `clear all`
`cleanup` `UnloadCantera`
10. To start using the experimental toolbox, run `ctLoad` command.
11. To stop using the new Cantera interface, run the following commands:
`ctCleanUp` `ctUnload`.
12. To switch back to the current matlab toolbox, undo steps 3, 4, 5, 8, and 9. The
command to remove search path in Matlab is `rmpath`.
13. A future updates will add automated installation.

View File

@ -27,7 +27,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
% Solve first for a hydrogen/air case for use as the initial estimate for
% the methane/air case.

View File

@ -42,7 +42,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
gas.TPX = {tburner, p, comp};

View File

@ -40,7 +40,7 @@ refine_grid = 1; % 1 to enable refinement, 0 to disable
% 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)
gas.TPX = {tin, p, comp2};

View File

@ -16,7 +16,7 @@ function prandtl1(g)
if nargin == 1
gas = g;
else
gas = Solution('gri30.yaml', 'gri30', 'Mix');
gas = Solution('gri30.yaml', 'gri30', 'mixture-averaged');
end
pr = zeros(31, 31);

View File

@ -15,7 +15,7 @@ function prandtl2(g)
if nargin == 1
gas = g;
else
gas = Solution('gri30.yaml', 'gri30', 'Multi');
gas = Solution('gri30.yaml', 'gri30', 'multicomponent');
end
pr = zeros(31, 31);

View File

@ -16,7 +16,7 @@ function reactor1(g)
if nargin == 1
gas = g;
else
gas = Solution('gri30.yaml', 'gri30', 'None');
gas = Solution('gri30.yaml', 'gri30', 'none');
end
P = 101325.0;
@ -33,7 +33,7 @@ function reactor1(g)
r = IdealGasReactor(gas);
% create a reservoir to represent the environment
a = Solution('air.yaml', 'air', 'None');
a = Solution('air.yaml', 'air', 'none');
a.TP = {a.T, P};
env = Reservoir(a);

View File

@ -16,7 +16,7 @@ function reactor2(g)
if nargin == 1
gas = g;
else
gas = Solution('gri30.yaml', 'gri30', 'None');
gas = Solution('gri30.yaml', 'gri30', 'none');
end
% set the initial conditions

View File

@ -34,7 +34,7 @@ r = IdealGasReactor(gas);
r.V = 1.0e-6;
% create a reservoir to represent the environment
a = Solution('air.yaml', 'air', 'None');
a = Solution('air.yaml', 'air', 'none');
a.TP = {t, OneAtm};
env = Reservoir(a);