2 problems using SolutionArray.read_csv()

23 views
Skip to first unread message

Stijn Verlaak

unread,
Jul 15, 2021, 9:21:19 AM7/15/21
to Cantera Users' Group
Hi,

I'm new to Cantera, and not as experienced in Python (yet). First of all: many thanks for making this library available, documenting and supporting it. Great job! I'm very grateful to have found this!!

I'm trying to store pre-calculated flame solutions in a SolutionArray database saved as a csv-file, to avoid redundancy and speed up later use of those solutions. 

I face two problems using the read_csv statement:
1. read_csv throws an IndexError if there is only one data-entry in the file. Although inconvenient, I could still work my way around this problem. (To see this error, uncomment the first read_csv statement.)
2. read_csv throws a ValueError if there are more data-entries in the file. I don't understand why it's doing that, or what else would be the proper way to do what I would like to do... Any clue, anyone?

Minimal code to show the problem is attached.

I hope this question is not too basic. Many thanks in advance for your comments.

Kind regards, Stijn
minimalProblem.py

Stijn Verlaak

unread,
Jul 15, 2021, 1:37:13 PM7/15/21
to Cantera Users' Group
Hi,

Further digging into it and trying to decipher the source code, I believe there might be a slight imperfection in composite.py. I've tried to address it in a bug report.

After correction, it works better. Unfortunately, in combination with the 'gri30.yaml' scheme, it throws another compatible species error related to CH2S specifically (in gri30 refered to as CH2(S) ) when running the minimalProblem.py code with the corrected composite.py code.

Best regards,

Stijn

Ingmar Schoegl

unread,
Jul 15, 2021, 5:29:30 PM7/15/21
to Cantera Users' Group
Hi Stijn,

I confirmed that there appears to be a bug and responded on GitHub (https://github.com/Cantera/cantera/pull/687#issuecomment-881022672). Please go ahead and submit a new issue report.

-ingmar-
Reply all
Reply to author
Forward
0 new messages