cantera/interfaces/python/Cantera/SolidTransport.py
Ray Speth 2528df0f75 Reorganized source tree structure
These changes make it unnecessary to copy header files around during
the build process, which tends to confuse IDEs and debuggers. The
headers which comprise Cantera's external C++ interface are now in
the 'include' directory.

All of the samples and demos are now in the 'samples' subdirectory.
2012-02-12 02:27:14 +00:00

34 lines
1.1 KiB
Python

"""
Transport properties for solids.
This class implements a simple model for the diffusion coefficients and
the thermal conductivity of a solid. The diffusion coefficients have
modified Arrhenius form, and the thermal conductivity is constant.
All parameters are user-specified, not computed from a physical model.
Examples:
>>> tr = SolidTransport(solid_phase)
>>> tr.setThermalConductivity(0.5) # W/m/K
>>> tr.setDiffCoeff(species = "OxygenIon", A = 2.0, n = 0.0, E = 700.0)
Note that the diffusion coefficient is computed from D = A * T^n *
exp(-E/t) in m^2/s. Diffusion coefficients for unspecified species are
set to zero.
"""
from Cantera.Transport import Transport
class SolidTransport(Transport):
def __init__(self, phase = None):
Transport.__init__(self, model = "Solid", phase = phase)
def setThermalConductivity(self, lamb):
self.setParameters(1, 0, [lamb, 0.0])
def setDiffCoeff(self, species = "", A = 0.0, n = 0.0, E = 0.0):
k = self._phase.speciesIndex(species)
self.setParameters(0, k, [A, n, E])