dbirch997 / cantera

Automatically exported from code.google.com/p/cantera
1 stars 0 forks source link

Matlab toolbox functions do not type check arguments #181

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Some functions in the Matlab toolbox which are meant to only work with 
numerical inputs will apparently accept inputs of other types, silently giving 
erroneous results. A few examples:

mfc = MassFlowController();
mdot = gaussian(1, 0.2, 0.1);
setMassFlowRate(mfc, mdot); % should use 'setFunction' instead.

mdot2 = polynom([mdot]); % should fail - function composition like this is not 
implemented

gas = Solution('gri30.xml')
set(gas, 'X', mdot) % not even sure what this means

Original issue reported on code.google.com by yarmond on 20 Oct 2013 at 8:26

GoogleCodeExporter commented 9 years ago
Another example:

inlet_f = Inlet('fuel');
massFraction(inlet_f, 'CH4')

Ends up interpreting the first character of 'CH4' as an int. This is despite 
the fact that other functions in the 1D module accept species names in the 
argument list.

Original comment by yarmond on 22 Oct 2013 at 1:26