Warning
This documentation is for an old version of Cantera. You can find docs for newer versions here.
Domain1D class constructor.
Parameters: |
|
---|
Get an axisymmetric stagnation flow domain.
Parameters: | gas – Instance of class Solution() |
---|---|
Returns: | Domain1D instance representing an axisymmetric stagnation flow. |
Create an axisymmetric flow domain.
Parameters: |
|
---|---|
Returns: | Domain1D instance representing an axisymmetric flow. |
Create an inlet domain.
Note that an inlet can only be a terminal domain - it must be either the leftmost or rightmost domain in a stack.
Parameters: | id – String name of the inlet. |
---|---|
Returns: | Instance of class Domain1D() representing an inlet. |
Create an outlet domain.
Parameters: | id – String ID of the outlet. |
---|---|
Returns: | Instance of Domain1D() representing an outlet. |
Create an outlet reservoir domain.
Returns: | Instance of Domain1D() representing an outlet reservoir. |
---|
Create a surface domain.
Parameters: |
|
---|---|
Returns: | Instance of class Domain1D() representing a non-reacting or reacting surface. |
Create a symmetry plane domain.
Parameters: | id – String ID of the symmetry plane. |
---|---|
Returns: | Instance of class Domain1D() representing a symmetry plane. |
Get the index of a component given its name.
Parameters: |
|
---|---|
Returns: | Index of the component, or input numeric value. |
Get the name of a component given its index.
Parameters: |
|
---|---|
Returns: | Cell array of component names. |
Disable the energy equation.
Parameters: | d – Instance of class Domain1D() |
---|
Get the domain index.
Parameters: | d – Instance of class Domain1D() |
---|---|
Returns: | This function returns an integer flag denoting the location of the domain, beginning with 1 at the left. |
Get the type of domain.
Parameters: | d – Instance of class Domain1D() |
---|---|
Returns: | This function returns an integer flag denoting the domain type. |
Enable the energy equation.
Parameters: | d – Instance of class Domain1D() |
---|
Get grid points from a domain.
Parameters: |
|
---|---|
Returns: | Vector of grid points. Length of n or nPoints(). |
Determine whether a domain is a flow.
Parameters: | d – Instance of class Domain1D() |
---|---|
Returns: | 1 if the domain is a flow domain, and 0 otherwise. |
Determine whether a domain is an inlet.
Parameters: | d – Instance of class Domain1D() |
---|---|
Returns: | 1 if the domain is an inlet, and 0 otherwise. |
Determine if a domain is a surface.
Parameters: | d – Instance of class Domain1D() |
---|---|
Returns: | 1 if the domain is a surface, and 0 otherwise. |
Get the mass flux.
Parameters: | d – Instance of class Domain1D() |
---|---|
Returns: | The mass flux in the domain. |
Get the mass fraction of a species given its integer index.
This method returns the mass fraction of species k, where k is the integer index of the species in the flow domain to which the boundary domain is attached.
Parameters: |
|
---|---|
Returns: | Mass fraction of species |
Get the number of components.
Parameters: | d – Instance of class Domain1D() |
---|---|
Returns: | Number of variables at each grid point |
Get the number of grid points.
Parameters: | d – Instance of class Domain1D() |
---|---|
Returns: | Integer number of grid points. |
Set properties of a Domain1D.
The properties that may be set are
Either the full property name or the symbol may be specified. Mole and mass fractions must be input as vectors (either row or column) with length equal to the number of species.
Examples:
>> set(gas,'Temperature',600.0);
>> set(gas,'T',600.0);
>> set(gas,'T',600.0,'P',2*oneatm,'Y',massfracs);
>> set(gas,'X',ones(nSpecies(gas),1));
Alternatively, individual methods to set properties may be called (setTemperature, setMoleFractions, etc.)
See also: setBounds(), setFixedTempProfile() setID(), setMdot(), setMoleFractions(), setPressure(), setProfile(), setSteadyTolerances(), setTemperature(), setTransientTolerances(), setupGrid()
Parameters: |
|
---|
Set bounds on the solution components.
Parameters: |
|
---|
Enable or disable solving the coverage equations.
Parameters: |
|
---|
Set a fixed temperature profile.
Set the temperature profile to use when the energy equation is not being solved. The profile must be entered as an array of positions / temperatures, which may be in rows or columns.
Parameters: |
|
---|
Set the ID tag for a domain.
Parameters: |
|
---|
Set the mass flow rate.
Parameters: |
|
---|
Set the mole fractions.
Parameters: |
|
---|
Set the pressure.
Parameters: |
|
---|
Set the profile of a component.
Convenience function to allow an instance of Domain1D() to have a profile of its components set when it is part of a Stack().
Parameters: |
|
---|
Set the steady-state tolerances.
Parameters: |
|
---|
Set the temperature.
Parameters: |
|
---|
Set the transient tolerances.
Parameters: |
|
---|
Set up the solution grid.
Parameters: |
|
---|
Get the boundary temperature.
Parameters: | d – Instance of class Domain1D() |
---|---|
Returns: | Temperature. Units: K |
Get the grid points.
Parameters: |
|
---|---|
Returns: | Vector of grid points. |
Stack class constructor.
A stack object is a container for one-dimensional domains, which are instances of class Domain1D. The domains are of two types - extended domains, and connector domains.
See also: Domain1D()
Parameters: | domains – Vector of domain instances |
---|---|
Returns: | Instance of class Stack() |
Create a freely-propagating flat flame.
Parameters: |
|
---|---|
Returns: | Domain1D instance representing a freely propagating, adiabatic flame |
Create a non-premixed flame stack.
Parameters: |
|
---|---|
Returns: | Instance of Stack() object representing the left inlet, flow, and right inlet. |
Get the index of a domain in a stack given its name.
Parameters: |
|
---|---|
Returns: | Index of domain |
Get the grid in one domain.
Parameters: |
|
---|---|
Returns: | The grid in domain name |
Plot a specified solution component.
Parameters: |
|
---|
Get the residuals.
Parameters: |
|
---|---|
Returns: |
Restore a previously-saved solution.
This method can be used to provide an initial guess for the solution.
See also: save()
Parameters: |
|
---|
Save a solution to a file.
The output file is in a format that can be used by restore()
Parameters: |
|
---|
Save a solution to a file.
The output file is in a format that can be used by restore()
Parameters: |
|
---|
Set a component to a value across the entire domain.
Parameters: |
|
---|
Set the number of times the Jacobian will be used before it is recomputed.
Parameters: |
|
---|
Specify a profile for one component.
The solution vector values for this component will be linearly interpolated from the discrete function defined by p(:,1) vs. p(:,2). Note that p(1,1) = 0.0 corresponds to the leftmost grid point in the specified domain, and p(1,n) = 1.0 corresponds to the rightmost grid point. This method can be called at any time, but is usually used to set the initial guess for the solution.
Example (assuming s is an instance of Stack()):
>> zr = [0 0.1 0.2 0.4 0.8 1];
>> v = [500 650 700 730 800 900];
>> setProfile(s, 1, 2, [zr, v]);
Parameters: |
|
---|
Set the criteria used to refine the grid.
Parameters: |
|
---|
Specify a sequence of time steps.
Parameters: |
|
---|
Set the value of a single entry in the solution vector.
Example (assuming s is an instance of Stack()):
setValue(s, 3, 5, 1, 5.6)
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, which depends on the location of this domain in the stack.
Parameters: |
|
---|
Get a solution component in one domain.
Parameters: |
|
---|---|
Returns: | Either an nPoints() x 1 vector, or nPoints() x nComponents() array. |