Skip to content

Commit

Permalink
[Matlab] Update to reflect removal of CTI/XML input formts
Browse files Browse the repository at this point in the history
  • Loading branch information
ssun30 authored and speth committed May 11, 2023
1 parent e657dc5 commit e5a7785
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 28 deletions.
1 change: 0 additions & 1 deletion interfaces/matlab_experimental/1D/Domain1D.m
Expand Up @@ -23,7 +23,6 @@
% `Symm1D`
% `Outlet1D`
% `ReactingSurface`
% `Sim1D`
% `OutletRes`
%
% :param b:
Expand Down
5 changes: 2 additions & 3 deletions interfaces/matlab_experimental/Base/Interface.m
Expand Up @@ -11,14 +11,13 @@
function s = Interface(src, id, p1, p2, p3, p4)
% INTERFACE Interface class constructor.
% s = Interface(src, id, p1, p2, p3, p4)
% See `Interfaces <https://cantera.org/tutorials/cti/phases.html#interfaces>`__.
%
% See also: :mat:func:`importEdge`, :mat:func:`importInterface`
%
% :param src:
% CTI or CTML file containing the interface or edge phase.
% YAML file containing the interface or edge phase.
% :param id:
% Name of the interface or edge phase in the CTI or CTML file.
% Name of the interface or edge phase in the YAML file.
% :param p1:
% Adjoining phase to the interface.
% :param p2:
Expand Down
14 changes: 0 additions & 14 deletions interfaces/matlab_experimental/Base/Kinetics.m
Expand Up @@ -289,20 +289,6 @@ function kinClear(kin)
q = pt.Value;
end

function q = rop(kin)
% Get the forward and reverse rates of progress.
%
% :return:
% An I x 2 array of reaction rates of progress, where I is
% the number of reactions. The first column contains the
% forward rates of progress, and the second column the
% reverse rates.

f = rop_f(kin);
r = rop_r(kin);
q = [f, r];
end

function q = ropNet(kin)
% Get the net rates of progress for all reactions.
%
Expand Down
6 changes: 3 additions & 3 deletions interfaces/matlab_experimental/Base/Solution.m
Expand Up @@ -31,7 +31,7 @@
% in the input file. To specify the transport modeling, set the input
% argument ``trans`` to one of ``'default'``, ``'None'``, ``'Mix'``, or ``'Multi'``.
% In this case, the phase name must be specified as well. Alternatively,
% change the ``transport`` node in the CTML file, or ``transport``
% change the ``transport`` node in the YAML file, or ``transport``
% property in the CTI file before loading the phase. The transport
% modeling cannot be changed once the phase is loaded.
%
Expand All @@ -45,10 +45,10 @@
% See also: :mat:func:`ThermoPhase`, :mat:func:`Kinetics`, :mat:func:`Transport`
%
% :param src:
% Input string of CTI or CTML file name.
% Input string of YAML file name.
% :param id:
% Optional unless ``trans`` is specified. ID of the phase to
% import as specified in the CTML or CTI file.
% 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.
Expand Down
4 changes: 2 additions & 2 deletions interfaces/matlab_experimental/Base/ThermoPhase.m
Expand Up @@ -456,7 +456,7 @@ function tpClear(tp)
for j = 1:n
k(i, j) = calllib(ct, 'thermo_speciesIndex', ...
tp.tpID, name{i, j}) + 1;
if k(i, j) > 1e3
if k(i, j) > 1e6
warning(['Species ', name{i, j}, ...
' does not exist in the phase']);
k(i, j) = -1;
Expand All @@ -466,7 +466,7 @@ function tpClear(tp)
elseif ischar(name)
k = calllib(ct, 'thermo_speciesIndex', ...
tp.tpID, name) + 1;
if k > 1e3
if k > 1e6
warning(['Species ', name, ...
' does not exist in the phase.']);
k = -1;
Expand Down
1 change: 0 additions & 1 deletion interfaces/matlab_experimental/Phases/importEdge.m
Expand Up @@ -2,7 +2,6 @@
% Import edges between phases.
% s = importEdge(file, name, phase1, phase2, phase3, phase4)
% Supports up to four neighbor phases. See
% `Interfaces <https://cantera.org/tutorials/cti/phases.html#interfaces>`__
%
% :param file:
% File containing phases
Expand Down
3 changes: 1 addition & 2 deletions interfaces/matlab_experimental/Phases/importInterface.m
@@ -1,10 +1,9 @@
function s = importInterface(file, name, phase1, phase2)
% Import an interface between phases.
% s = importInterface(file, name, phase1, phase2)
% See `Interfaces <https://cantera.org/tutorials/cti/phases.html#interfaces>`__.
%
% :param file:
% CTI or CTML file containing the interface
% YAML file containing the interface
% :param name:
% Name of the interface to import
% :param phase1:
Expand Down
3 changes: 1 addition & 2 deletions interfaces/matlab_experimental/Utility/LoadCantera.m
Expand Up @@ -16,8 +16,7 @@
'addheader','ct','addheader','ctfunc', ...
'addheader','ctmultiphase','addheader', ...
'ctonedim','addheader','ctreactor', ...
'addheader','ctrpath','addheader','ctsurf', ...
'addheader','ctxml');
'addheader','ctrpath','addheader','ctsurf');
end
disp('Cantera is ready for use');
end

0 comments on commit e5a7785

Please sign in to comment.