Error: fpValueCheck:

47 views
Skip to first unread message

Aldo Moschetti

unread,
Jul 31, 2025, 1:23:11 AM7/31/25
to Cantera Users' Group
Hi,
I'm new at using cantera-matlab and I' am trying to define a fuel mixture in my "set" function through mass fractions, but it doesn't accept those variables:


Tt_i = 700;
Pt_i = 1930000;
f = 0.0141;
f_st = 0.0683;
phi_c = f/f_st;

yo2 = 1/(4.76*(1+f));
yf = f/(1+f);
yn2 = (1/(1+f))/(1+(1/3.76));

c5_gas = Solution('Z79_C5.yaml');
set(c5_gas, 'T', Tt_i, 'P', Pt_i, 'Y', 'O2: yo2 POSF12345: yf N2: yn2');
equilibrate(c5_gas, 'UV');
c5_gas()


It returns the error:
CanteraError thrown by fpValueCheck:
Trouble processing string 'yo2'

Do you know why? Because I'm trying to learn all by myself, but I'm having hard times because I'm a fkn noob.
Thank you for your precious time.

Aldo

francesco_sm64

unread,
Aug 1, 2025, 4:24:41 AM8/1/25
to Cantera Users' Group
Dear Aldo,

if you are using the current version of Cantera, maybe you can try to have a look at the following example:
It should show you how to fix your code.
I suppose the error comes from mixing numbers (yo2) within the string 'O2:yo2 ...'

All the best,
Francesco

Aldo Moschetti

unread,
Aug 5, 2025, 12:30:39 PM8/5/25
to Cantera Users' Group
Hi Francesco,
thank you so much, it was very usefull.
Reply all
Reply to author
Forward
0 new messages