Skip to content

Commit

Permalink
Addressed reviewer comments including subclass definitions and docstr…
Browse files Browse the repository at this point in the history
…ings.
  • Loading branch information
ssun30 authored and speth committed May 11, 2023
1 parent 3c822e4 commit d92474e
Show file tree
Hide file tree
Showing 41 changed files with 594 additions and 506 deletions.
27 changes: 19 additions & 8 deletions interfaces/matlab_experimental/1D/AxisymmetricFlow.m
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
function m = AxisymmetricFlow(gas, id)
classdef AxisymmetricFlow < Domain1D
% Create an axisymmetric flow domain.
%
% m = AxisymmetricFlow(gas, id)
%
% :param gas:
% Instance of class :mat:func:`Solution`
% Instance of class :mat:class:`Solution`
% :param id:
% String, ID of the flow
% :return:
% Domain1D instance representing an axisymmetric flow.
% Instance of class :mat:class:`AxisymmetricFlow`.
%
m = Domain1D('StagnationFlow', gas);

if nargin == 1
m.setID('flow');
else
m.setID(id);
methods

% Constructor
function m = AxisymmetricFlow(gas, id)

m = m@Domain1D('StagnationFlow', gas);

if nargin == 1
m.setID('flow');
else
m.setID(id);
end

end

end

end
12 changes: 6 additions & 6 deletions interfaces/matlab_experimental/1D/CounterFlowDiffusionFlame.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@
%
% :param left:
% Object representing the left inlet, which must be
% created using function :mat:func:`Inlet`.
% created using function :mat:class:`Inlet`.
% :param flow:
% Object representing the flow, created with
% function :mat:func:`AxisymmetricFlow`.
% function :mat:class:`AxisymmetricFlow`.
% :param right:
% Object representing the right inlet, which must be
% created using function :mat:func:`Inlet`.
% created using function :mat:class:`Inlet`.
% :param tp_f:
% Object representing the fuel inlet gas, instance of class
% :mat:func:`Solution`, and an ideal gas.
% :mat:class:`Solution`, and an ideal gas.
% :param tp_o:
% Object representing the oxidizer inlet gas, instance of class
% :mat:func:`Solution`, and an ideal gas.
% :mat:class:`Solution`, and an ideal gas.
% :param oxidizer:
% String representing the oxidizer species. Most commonly O2.
% :return:
% Instance of :mat:func:`Sim1D` object representing the left
% Instance of :mat:class:`Sim1D` object representing the left
% inlet, flow, and right inlet.
%

Expand Down
50 changes: 25 additions & 25 deletions interfaces/matlab_experimental/1D/Domain1D.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
% `OutletRes`
%
% :param b:
% Instance of class :mat:func:`Solution` (for ``a == 1``)
% or :mat:func:`Interface` (for ``a == 6``). Not used for
% Instance of class :mat:class:`Solution` (for ``a == 1``)
% or :mat:class:`Interface` (for ``a == 6``). Not used for
% all other valid values of ``a``.
%

Expand All @@ -41,7 +41,7 @@
% i = d.domainIndex
%
% :param d:
% Instance of class :mat:func:`Domain1D`
% Instance of class :mat:class:`Domain1D`
% :return:
% Integer flag denoting the location of the domain,
% beginning with 1 at the left.
Expand All @@ -52,7 +52,7 @@
% i = d.domainType
%
% :param d:
% Instance of class :mat:func:`Domain1D`
% Instance of class :mat:class:`Domain1D`
% :return:
% Integer flag denoting the domain type.
domainType
Expand All @@ -62,7 +62,7 @@
% a = d.isFlow
%
% :param d:
% Instance of class :mat:func:`Domain1D`
% Instance of class :mat:class:`Domain1D`
% :return:
% 1 if the domain is a flow domain, and 0 otherwise.
isFlow
Expand All @@ -72,7 +72,7 @@
% a = d.isInlet
%
% :param d:
% Instance of class :mat:func:`Domain1D`
% Instance of class :mat:class:`Domain1D`
% :return:
% 1 if the domain is an inlet, and 0 otherwise.
isInlet
Expand All @@ -82,7 +82,7 @@
% a = d.isSurface
%
% :param d:
% Instance of class :mat:func:`Domain1D`
% Instance of class :mat:class:`Domain1D`
% :return:
% 1 if the domain is a surface, and 0 otherwise.
isSurface
Expand All @@ -92,7 +92,7 @@
% mdot = d.massFlux
%
% :param d:
% Instance of class :mat:func:`Domain1D`
% Instance of class :mat:class:`Domain1D`
% :return:
% The mass flux in the domain.
massFlux
Expand All @@ -102,7 +102,7 @@
% n = d.nComponents
%
% :param d:
% Instance of class :mat:func:`Domain1D`
% Instance of class :mat:class:`Domain1D`
% :return:
% Number of variables at each grid point
nComponents
Expand All @@ -112,7 +112,7 @@
% n = d.nPoints
%
% :param d:
% Instance of class :mat:func:`Domain1D`
% Instance of class :mat:class:`Domain1D`
% :return:
% Integer number of grid points.
nPoints
Expand Down Expand Up @@ -196,7 +196,7 @@ function delete(d)
% d.disableEnergy
%
% :param d:
% Instance of class :mat:func:`Domain1D`
% Instance of class :mat:class:`Domain1D`
%
disp(' ');
disp('Disabling the energy equation...');
Expand All @@ -209,7 +209,7 @@ function delete(d)
% d.enableEnergy
%
% :param d:
% Instance of class :mat:func:`Domain1D`
% Instance of class :mat:class:`Domain1D`
%
disp(' ');
disp('Enabling the energy equation...');
Expand All @@ -222,7 +222,7 @@ function delete(d)
% d.disableSoret
%
% :param d:
% Instance of class :mat:func:`Domain1D`
% Instance of class :mat:class:`Domain1D`
%
disp(' ');
disp('Disabling the Soret effect...');
Expand All @@ -235,7 +235,7 @@ function delete(d)
% d.enableSoret
%
% :param d:
% Instance of class :mat:func:`Domain1D`
% Instance of class :mat:class:`Domain1D`
%
disp(' ');
disp('Disabling the Soret effect...');
Expand Down Expand Up @@ -268,7 +268,7 @@ function delete(d)
% n = d.componentIndex(name)
%
% :param d:
% Instance of class :mat:func:`Domain1D`
% Instance of class :mat:class:`Domain1D`
% :param name:
% String name of the component to look up. If a numeric value
% is passed, it will be returned.
Expand Down Expand Up @@ -300,7 +300,7 @@ function delete(d)
% n = d.componentName(index)
%
% :param d:
% Instance of class :mat:func:`Domain1D`
% Instance of class :mat:class:`Domain1D`
% :param index:
% Integer or vector of integers of component names
% to get.
Expand Down Expand Up @@ -413,7 +413,7 @@ function delete(d)
% to which the boundary domain is attached.
%
% :param d:
% Instance of class :mat:func:`Domain1D`
% Instance of class :mat:class:`Domain1D`
% :param k:
% Integer species index
% :return:
Expand Down Expand Up @@ -492,7 +492,7 @@ function setCoverageEqs(d, onoff)
% d.setBounds(component, lower, upper)
%
% :param d:
% Instance of class :mat:func:`Domain1D`
% Instance of class :mat:class:`Domain1D`
% :param component:
% String, component to set the bounds on
% :param lower:
Expand Down Expand Up @@ -534,7 +534,7 @@ function setFixedTempProfile(d, profile)
% columns.
%
% :param d:
% Instance of class :mat:func:`Domain1D`
% Instance of class :mat:class:`Domain1D`
% :param profile:
% n x 2 or 2 x n array of ``n`` points at which the temperature
% is specified.
Expand All @@ -560,7 +560,7 @@ function setID(d, id)
% d.setID(id)
%
% :param d:
% Instance of class :mat:func:`Domain1D`
% Instance of class :mat:class:`Domain1D`
% :param id:
% String ID to assign
%
Expand All @@ -573,7 +573,7 @@ function setMassFlowRate(d, mdot)
% d.setMassFlowRate(mdot)
%
% :param d:
% Instance of class :mat:func:`Domain1D`
% Instance of class :mat:class:`Domain1D`
% :param mdot:
% Mass flow rate
%
Expand All @@ -586,7 +586,7 @@ function setMoleFractions(d, x)
% d.setMoleFractions(x)
%
% :param d:
% Instance of class :mat:func:`Domain1D`
% Instance of class :mat:class:`Domain1D`
% :param x:
% String specifying the species and mole fractions in
% the format ``'SPEC:X,SPEC2:X2'``.
Expand All @@ -600,7 +600,7 @@ function setSteadyTolerances(d, component, rtol, atol)
% d.setSteadyTolerances(component, rtol, atol)
%
% :param d:
% Instance of class :mat:func:`Domain1D`
% Instance of class :mat:class:`Domain1D`
% :param component:
% String or cell array of strings of component values
% whose tolerances should be set. If ``'default'`` is
Expand Down Expand Up @@ -641,7 +641,7 @@ function setTransientTolerances(d, component, rtol, atol)
% d.setTransientTolerances(component, rtol, atol)
%
% :param d:
% Instance of class :mat:func:`Domain1D`
% Instance of class :mat:class:`Domain1D`
% :param component:
% String or cell array of strings of component values
% whose tolerances should be set. If ``'default'`` is
Expand Down Expand Up @@ -694,7 +694,7 @@ function setupGrid(d, grid)
% d.setupGrid(grid)
%
% :param d:
% Instance of class :mat:func:`Domain1D`
% Instance of class :mat:class:`Domain1D`
% :param grid:
%
callct('domain_setupGrid', d.domainID, numel(grid), grid);
Expand Down
28 changes: 19 additions & 9 deletions interfaces/matlab_experimental/1D/FreeFlame.m
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
function m = FreeFlame(gas, id)
classdef FreeFlame < Domain1D
% Create a freely-propagating flat flame.
%
% m = FreeFlame(gas, id)
%
% :param gas:
% Instance of class :mat:func:`Solution`
% Instance of class :mat:class:`Solution`
% :param id:
% String, ID of the flow
% :return:
% Domain1D instance representing a freely propagating,
% adiabatic flame
% Instance of class :mat:class:`FreeFlame` representing
% a freely propagating, adiabatic flame.
%
m = Domain1D('StagnationFlow', gas, 2);
methods

% Constructor
function m = FreeFlame(gas, id)

m = m@Domain1D('StagnationFlow', gas, 2);

if nargin == 1
m.setID('flame');
else
m.setID(id);
end

end

if nargin == 1
m.setID('flame');
else
m.setID(id);
end

end
26 changes: 19 additions & 7 deletions interfaces/matlab_experimental/1D/Inlet.m
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
function m = Inlet(id)
classdef Inlet < Domain1D
% Create an inlet domain.
%
% m = Inlet(id)
%
% Note that an inlet can only be a terminal domain - it must be
% either the leftmost or rightmost domain in a stack.
%
% :param id:
% String name of the inlet.
% :return:
% Instance of class :mat:func:`Domain1D` representing an inlet.
% Instance of class :mat:class:`Inlet`.
%
m = Domain1D('Inlet1D');

if nargin == 0
m.setID('inlet');
else
m.setID(id);
methods

% Constructor
function m = Inlet(id)

m = m@Domain1D('Inlet1D');

if nargin == 0
m.setID('inlet');
else
m.setID(id);
end

end

end

end

0 comments on commit d92474e

Please sign in to comment.