minor cleanup

This commit is contained in:
Dave Goodwin 2004-10-09 15:19:57 +00:00
parent 4a006587d8
commit ad858b2e11

View file

@ -11,12 +11,15 @@ class SurfacePhase(ThermoPhase):
ThermoPhase.__init__(self, xml_phase=xml_phase, index=index)
def setSiteDensity(self, n0):
"""Set the site density."""
_cantera.surf_setsitedensity(self._phase_id, n0)
def siteDensity(self):
"""Site density [kmol/m2]"""
return _cantera.surf_sitedensity(self._phase_id)
def setCoverages(self, theta):
"""Set the surface coverages to the values in array 'theta'."""
nt = len(theta)
if nt == self.nSpecies():
_cantera.surf_setcoverages(self._phase_id,
@ -26,12 +29,16 @@ class SurfacePhase(ThermoPhase):
' coverage values, but got '+`nt`)
def coverages(self):
"""Return the array of surface coverages."""
return _cantera.surf_getcoverages(self._phase_id)
def setConcentrations(self, theta):
_cantera.surf_setconcentrations(self._phase_id, theta)
def setConcentrations(self, conc):
"""Set the surface concentrations to the values in
array 'conc'."""
_cantera.surf_setconcentrations(self._phase_id, conc)
def concentrations(self):
"""Return the array of surface concentrations [kmol/m2]."""
return _cantera.surf_getconcentrations(self._phase_id)