-
-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Couldn't read phase node from XML file when loading NASA cti and xml files packaged with Cantera #910
Comments
Hi and thank you for posting this! This is as-designed. There are no |
While I know that this is by design, I also agree that this is not an intuitive behavior. Thus, I am wondering whether it may not make sense to allow for a more flexible loading approach in future versions of the YAML format (CTI and XML are presumably phased out after 2.5 is released). Similarly, I believe it would make sense to allow for loading of Kinetics without phase or species definitions? Regardless, as this is not a bug, it may make sense to close this issue here and create a feature request over at Cantera/enhancements? |
@ischoegl I agree the behavior is different from some of the other files we distribute, but I don't see it as non-intuitive. This is simply another (less common) use case for input files in Cantera. What do you mean by a more flexible loading approach? If you mean to include one or several phase definitions, I don't see the point of doing so. I don't think anyone would actually want all of the species in the file involved in their phase, since the types of molecules are so disparate. If we want to define several phases, then we have to get into the question of which species should be included in which phases, how many phases to include, what should their names be, etc. I think it is best to leave it flexible without a phase definition. What would be the use of a Kinetics object without a ThermoPhase or species? I don't see the similarity to this issue... Let's continue discussion here for now, rather than splitting the conversation. Feature requests are not forbidden in this repo, particularly if they come out of other issues. |
@bryanwweber ...
I think my comments here draw on observations from a range of prior discussions and are about the 'big picture'. It ultimately boils down to the current implementation where there is no clear separation of This boils down to having 4 main components of a
An immediate result of this separation would be that YAML files like Another result would be that handling of model switches would become more flexible/consistent. I.e. on-the-fly switches of thermo models would be straight-forward and could be done the same way as a switch from mixture-averaged to multi-component |
@ischoegl I will take some time to consider what you've got here more thoroughly, but I have a few specific questions/thoughts on first reading. I'm focusing on the end-user perspective, since that's where you end up in your second-to-last paragraph. I haven't thought about how this might affect/simplify Cantera's internals, but that is another worthwhile discussion to have.
I guess this was the use case which was originally intended in the
I'm not sure how this would look different than the current situation from the perspective of an end user. Moreover, considering that
Leaving aside the changes to Cantera internals, I don't think this would necessarily be simpler from a user perspective. In this scenario, there is only one type of object that the user creates, and they have to keep track of whether or not it is able to calculate reaction rates, or only species thermo information, or whether it can do the whole simulation. In addition, the name Finally,
This would indeed be convenient, but as I said, I haven't thought about how these changes will affect the internals, so I don't have a comment here 😄 |
Hi, thanks for getting back to me on this. The link above redirects me to: https://groups.google.com/forum/m/#!overview I also tried: https://groups.google.com/forum/m/#!searchin/cantera-users/Nasa.xml/cantera-users All of which also redirect me to: https://groups.google.com/forum/m/#!overview |
I think most of the changes would be ‘under the hood’; there are only a handful of situations where the end user would see a difference (
I am aware of the intended meaning of Regarding purist vs pragmatic usage, I think there are arguments for and against either way. I believe using PS: my own interpretation of |
@mcgeochd ... I believe the link is https://groups.google.com/forum/#!topic/cantera-users/NxwemTuK_RI @bryanwweber lists some examples for how to import species in the first response. |
Thank you, that works now |
@ischoegl thanks, I had some trouble with the link from my phone! |
Now back at a computer, to respond to your comments 😄
Indeed, in the current implementation this is somewhat confusing. Obviously this issue is not the first time this question has been asked. However, I think that using
Without wanting to descend too far down this rabbit hole (language is hard!), Phase (at least when I teach thermo 1) is a single substance + a single state of matter. Even if we relax the single substance part of the definition, we still have the PureFluid class which (although transparent to the user) derives from I'd be happy to discuss further, but I think we're sufficiently far afield of this issue (which seems to be resolved for the OP). Since you have somewhat more mature thoughts on the bigger picture here, I'd suggest we move the discussion to Enhancements to talk about the bigger picture. @mcgeochd Did that post on the Google Group resolve your issue? |
@bryanwweber ... yup, I forgot about the |
@bryanwweber yep, the link solved this issue, thanks for the help and the insightful discussion @ischoegl |
Thanks @mcgeochd! |
Problem description
Creating a Solution using any of the NASA cti or xml files, nasa, nasa_gas, nasa_condensed, raises:
Steps to reproduce
Behavior
Running
works as expected according to the Python tutorial (https://cantera.org/tutorials/python-tutorial.html). Similarly, using KOH, silane, or water also works, so I would expect to be able to do the same with any of the nasa files that come prepackaged with Cantera on install. I haven't altered any of the files in any way since installing Cantera.
System information
The text was updated successfully, but these errors were encountered: