Skip to content

Commit

Permalink
[Matlab] Fix various typos
Browse files Browse the repository at this point in the history
  • Loading branch information
speth committed May 11, 2023
1 parent eeb1355 commit 700bf42
Show file tree
Hide file tree
Showing 17 changed files with 31 additions and 37 deletions.
4 changes: 2 additions & 2 deletions interfaces/matlab_experimental/Base/Interface.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
% See `ideal-surface <https://cantera.org/documentation/docs-2.6/sphinx/html/yaml/phases.html#sec-yaml-ideal-surface>`__
% and `Declaring adjacent phases <https://cantera.org/tutorials/yaml/phases.html#declaring-adjacent-phases>`__.
%
% :param varagin:
% :param varargin:
% Variable number of inputs consisting of the following:
% - src: YAML file containing the interface or edge phase.
% - id: Name of the interface or edge phase in the YAML file.
Expand Down Expand Up @@ -91,7 +91,7 @@ function delete(s)

function d = get.siteDensity(s)
surfID = s.tpID;
d = calllibt(ct, 'surf_siteDensity', surfID);
d = ctFunc('surf_siteDensity', surfID);
end

function c = get.concentrations(s)
Expand Down
12 changes: 6 additions & 6 deletions interfaces/matlab_experimental/Base/Kinetics.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
% reaction rates of progress, species production rates, and other
% quantities pertaining to a reaction mechanism.
%
% :param varagin:
% :param varargin:
% Variable number of inputs consisting of the following:
% - ph:
% An instance of class :mat:class:`ThermoPhase` representing the
Expand Down Expand Up @@ -235,7 +235,7 @@ function delete(kin)
% coefficients should be retrieved. Optional argument; if
% specified, ``rxns`` must be specified as well.
% :param rxns:
% Reaction indicies for which reactant stoichiometric
% Reaction indices for which reactant stoichiometric
% coefficients should be retrieved. Optional argument; if
% specified, ``species`` must be specified as well.
% :return:
Expand All @@ -246,7 +246,7 @@ function delete(kin)
% matrix will contain only entries for the specified species
% and reactions. For example, ``stoich_p(a, 3, [1, 3, 5,
% 7])`` returns a sparse matrix containing only the
% coefficients for specis 3 in reactions 1, 3, 5, and 7.
% coefficients for species 3 in reactions 1, 3, 5, and 7.

nsp = kin.nTotalSpecies;
nr = kin.nReactions;
Expand Down Expand Up @@ -288,7 +288,7 @@ function delete(kin)
% coefficients should be retrieved. Optional argument; if
% specified, ``rxns`` must be specified as well.
% :param rxns:
% Reaction indicies for which product stoichiometric
% Reaction indices for which product stoichiometric
% coefficients should be retrieved. Optional argument; if
% specified, ``species`` must be specified as well.
% :return:
Expand Down Expand Up @@ -335,7 +335,7 @@ function delete(kin)
% should be retrieved. Optional argument; if specified,
% "rxns" must be specified as well.
% :param rxns:
% Reaction indicies for which net stoichiometric
% Reaction indices for which net stoichiometric
% coefficients should be retrieved. Optional argument; if
% specified, "species" must be specified as well.
% :return:
Expand Down Expand Up @@ -534,7 +534,7 @@ function delete(kin)
end

function advanceCoverages(kin, dt)
% Advance the surface coveages forward in time. ::
% Advance the surface coverages forward in time. ::
%
% >> kin.advanceCoverages(dt)
%
Expand Down
2 changes: 1 addition & 1 deletion interfaces/matlab_experimental/Base/Mixture.m
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
% :param m:
% Instance of class :mat:class:`Mixture`.
% :param name:
% Name of the speces whose index is desired.
% Name of the species whose index is desired.
% :return:
% Index of species with name ``name``.
%
Expand Down
7 changes: 1 addition & 6 deletions interfaces/matlab_experimental/Base/ThermoPhase.m
Original file line number Diff line number Diff line change
Expand Up @@ -667,11 +667,6 @@ function display(tp)
m = element;
end

% if k < 0 | m < 0
% n = -1;
% return
% end

n = ctFunc('thermo_nAtoms', tp.tpID, k - 1, m - 1);

end
Expand Down Expand Up @@ -1341,7 +1336,7 @@ function display(tp)
elseif isa(yy, 'char')
ctFunc('thermo_setMassFractionsByName', tp.tpID, yy);
else
error('Invalud input.')
error('Invalid input.')
end

end
Expand Down
2 changes: 1 addition & 1 deletion interfaces/matlab_experimental/OneDim/Domain1D.m
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function delete(d)
function b = bounds(d, component)
% Get the (lower, upper) bounds for a solution component. ::
%
% >> b = d.bounds(componoent)
% >> b = d.bounds(component)
%
% :param component:
% String name of the component for which the bounds are returned.
Expand Down
6 changes: 3 additions & 3 deletions interfaces/matlab_experimental/OneDim/Sim1D.m
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function save(s, fname, id, desc)
% :param component:
% String component for which the solution is desired. If omitted,
% solution for all of the components will be returned in
% an :math:`nPoints \times nComponnts` array.
% an :math:`nPoints \times nComponents` array.
% :return:
% Either an :math:`nPoints \times 1` vector, or
% :math:`nPoints \times nComponents` array.
Expand Down Expand Up @@ -163,7 +163,7 @@ function solve(s, loglevel, refineGrid)
% Instance of class :mat:class:`Sim1D`.
% :param loglevel:
% Integer flag controlling the amount of diagnostic output.
% Zero supresses all output, and 5 produces very verbose output.
% Zero suppresses all output, and 5 produces very verbose output.
% :param refineGrid:
% Integer, 1 to allow grid refinement, 0 to disallow.

Expand Down Expand Up @@ -483,7 +483,7 @@ function setValue(s, n, comp, localPoints, v)
% This sets component 5 at the leftmost point (local point 1)
% in domain 3 to the value 5.6. Note that the local index
% always begins at 1 at the left of each domain, independent of
% the global index of the point, wchih depends on the location
% the global index of the point, which depends on the location
% of this domain in the class :mat:class:`Sim1D` object.
%
% :param s:
Expand Down
2 changes: 1 addition & 1 deletion interfaces/matlab_experimental/OneDim/Surface.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
classdef Surface < Bondary1D
classdef Surface < Boundary1D
% Create a surface domain. ::
%
% >> m = Surface(phase, id)
Expand Down
6 changes: 3 additions & 3 deletions interfaces/matlab_experimental/Reactor/FlowDevice.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
properties (SetAccess = immutable)

type % Type of flow device.
id % ID of Flowdevice object.
id % ID of FlowDevice object.

end

Expand Down Expand Up @@ -110,13 +110,13 @@ function install(f, upstream, downstream)

end

%% Flowdevice Get Methods
%% FlowDevice Get Methods

function mdot = get.massFlowRate(f)
mdot = ctFunc('flowdev_massFlowRate2', f.id);
end

%% Flowdevice Set Methods
%% FlowDevice Set Methods

function set.massFlowRate(f, mdot)

Expand Down
6 changes: 3 additions & 3 deletions interfaces/matlab_experimental/Reactor/Reactor.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
%
% If the chemistry is disabled, then the reactor composition is
% constant. The parameter should be the string "on" to enable
% the species equaionts, or "off" to disable it.
% the species equations, or "off" to disable it.
%
% By default, :mat:class:`Reactor` objects are created with the species
% equations enabled if there are reactions present in the
Expand Down Expand Up @@ -92,9 +92,9 @@
% >> r = Reactor(content, typ)
%
% A :mat:class:`Reactor` object simulates a perfectly-stirred reactor.
% It has a time-dependent tstate, and may be coupled to other
% It has a time-dependent state, and may be coupled to other
% reactors through flow lines or through walls that may expand
% or contract and/orconduct heat.
% or contract and/or conduct heat.
%
% :param contents:
% Instance of :mat:class:`Solution` representing the contents of
Expand Down
6 changes: 3 additions & 3 deletions interfaces/matlab_experimental/Reactor/ReactorNet.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
% The integrator chooses a step size based on the desired error
% tolerance and the rate at which the solution is changing.
% In some cases, the solution changes very slowly at first,
% then very rapidly (ifnition problems). In such cases, the
% then very rapidly (ignition problems). In such cases, the
% integrator may choose a timestep that is too large, which
% leads to numerical problems later. Use thismethod to set an
% leads to numerical problems later. Use this method to set an
% upper bound on the timestep.
maxTimeStep

Expand Down Expand Up @@ -124,7 +124,7 @@ function advance(r, tout)
% In some cases, the solution changes very slowly at first,
% then very rapidly (ignition problems). In such cases, the
% integrator may choose a timestep that is too large, which
% leads to numerical problems later. Use thismethod to set an
% leads to numerical problems later. Use this method to set an
% upper bound on the timestep.
%
% :param maxstep:
Expand Down
2 changes: 1 addition & 1 deletion interfaces/matlab_experimental/Reactor/ReactorSurface.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
%
% A surface on which heterogeneous reactions take place. The
% mechanism object (typically an instance of :mat:class:`Interface`)
% mustb be constructed so that it is properly linked to the
% must be constructed so that it is properly linked to the
% object representing the fluid in the reactor. The surface
% temperature on each side is taken to be equal to the
% temperature of the reactor.
Expand Down
3 changes: 1 addition & 2 deletions interfaces/matlab_experimental/Reactor/Valve.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
% does not model real valve characteristics - in particular, it
% does not model choked flow. The mass flow rate is always assumed
% to be linearly proportional to the pressure difference, no matter how
% large the pressure difference. THIS MAY CHANGE IN A F`UTURE
% RELEASE.
% large the pressure difference. THIS MAY CHANGE IN A FUTURE RELEASE.
%
% see also: :mat:class:`FlowDevice`, :mat:class:`MassFlowController`
%
Expand Down
2 changes: 1 addition & 1 deletion interfaces/matlab_experimental/Utility/ctUnload.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function ctUnload()
% Unload the Cantear C Library from the Memory
% Unload the Cantera C Library from the Memory

if libisloaded(ctLib)
ctCleanUp;
Expand Down
2 changes: 1 addition & 1 deletion samples/matlab_experimental/catcomb.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
% chemistry is included too, and has some effect very near the
% surface.
%
% The catalytic combustion mechanism is from Deutschman et al., 26th
% The catalytic combustion mechanism is from Deutschmann et al., 26th
% Symp. (Intl.) on Combustion,1996 pp. 1747-1754
%
% Keywords: combustion, catalysis, 1D flow, surface chemistry
Expand Down
2 changes: 1 addition & 1 deletion samples/matlab_experimental/ignite.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
% boundary conditions - the rate of change of volume, the heat
% flux, and the area.

% Rate of change of volume. Any arbirtrary function may be implemented.
% Rate of change of volume. Any arbitrary function may be implemented.
% Input arguments:
% t time
% vol volume
Expand Down
2 changes: 1 addition & 1 deletion samples/matlab_experimental/reactor1.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function reactor1(g)
%% REACTOR1 Zero-dimensional kinetics: adiabatc, constant pressure.
%% REACTOR1 Zero-dimensional kinetics: adiabatic, constant pressure.
%
% This example illustrates how to use class 'Reactor' for zero-dimensional
% kinetics simulations. Here the parameters are set so that the reactor is
Expand Down
2 changes: 1 addition & 1 deletion samples/matlab_experimental/surf_reactor.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
gas.TPX = {t, OneAtm, 'CH4:0.01, O2:0.21, N2:0.78'};

% The surface reaction mechanism describes catalytic combustion of
% methane on platinum, and is from Deutschman et al., 26th
% methane on platinum, and is from Deutschmann et al., 26th
% Symp. (Intl.) on Combustion,1996, pp. 1747-1754
surf = Interface('ptcombust.yaml', 'Pt_surf', gas);
surf.TP = {t, surf.P};
Expand Down

0 comments on commit 700bf42

Please sign in to comment.