cantera/interfaces/matlab/toolbox/@Mixture/addPhase.m
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

21 lines
502 B
Matlab

function addPhase(self, phase, moles)
% ADDPHASE - Add a phase to the mixture.
%
% carbon = importPhase('graphite.cti');
% addPhase(mix, carbon, 1.0);
%
if ~isa(phase,'ThermoPhase')
error('phase object of wrong type.');
end
if ~isa(moles,'numeric')
error('number of moles must be numeric.');
end
if moles < 0.0
error('negative moles!');
end
iphase = thermo_hndl(phase);
iok = mixturemethods(4, mix_hndl(self), iphase, moles);
if iok < 0
error('error adding phase');
end