diff --git a/Cantera/matlab/cantera/@ThermoPhase/electricPotential.m b/Cantera/matlab/cantera/@ThermoPhase/electricPotential.m new file mode 100644 index 000000000..4d9d67df9 --- /dev/null +++ b/Cantera/matlab/cantera/@ThermoPhase/electricPotential.m @@ -0,0 +1,4 @@ +function v = electricPotential(a) +% ELECTRICPOTENTIAL - the electric potential of the phase +% +v = thermo_get(a.tp_id,25); diff --git a/Cantera/matlab/cantera/@ThermoPhase/setElectricPotential.m b/Cantera/matlab/cantera/@ThermoPhase/setElectricPotential.m new file mode 100644 index 000000000..83a4ef6da --- /dev/null +++ b/Cantera/matlab/cantera/@ThermoPhase/setElectricPotential.m @@ -0,0 +1,4 @@ +function a = setElectricPotential(a,phi) +% SETELECTRICPOTENTIAL Set the electric potential [V]. +% +thermo_set(a.tp_id,2,phi); \ No newline at end of file diff --git a/Cantera/matlab/cantera/importEdge.m b/Cantera/matlab/cantera/importEdge.m new file mode 100644 index 000000000..487978350 --- /dev/null +++ b/Cantera/matlab/cantera/importEdge.m @@ -0,0 +1,14 @@ +function s = importEdge(file, name, phase1, phase2, phase3, phase4) +% IMPORTINTERFACE - import an interface +% +if nargin == 3 + s = Interface(file, name, phase1); +elseif nargin == 4 + s = Interface(file, name, phase1, phase2); +elseif nargin == 5 + s = Interface(file, name, phase1, phase2, phase3); +elseif nargin == 6 + s = Interface(file, name, phase1, phase2, phase3, phase4); +else + error('importEdge only supports 4 neighbor phases'); +end