Skip to content
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

Fixed dummy element entry in elements.xml. #363

Closed
wants to merge 2 commits into from

Conversation

dsondak
Copy link

@dsondak dsondak commented Aug 30, 2016

elements.xml allowed for the creation of a dummy element but the dummy element tag was incomplete. Trying to use the dummy element caused cantera to throw an exception:

CanteraError thrown by LookupWtElements:
element not found

I updated the dummy element tag and the exception is no longer thrown.

Another strange behavior is that if the user sets atomicWt = "0.0" in the dummy element, then cantera throws the same exception as before. Right now, I set atomicWt = "1.0E-16" which works. Maybe cantera is trying to require positive atomic weights in which case a different error message may be more informative.

@speth
Copy link
Member

speth commented Aug 30, 2016

I'm actually unclear on what the purpose of having a dummy element defined in elements.xml is. If you want to define your own element, for whatever purpose, that can be done in any user-created CTI/XML file. My inclination would just be to remove this entry, since it obviously can't be used as-is.

The reason that setting the atomic weight to zero is because zero is currently (unfortunately) being used as the default value to trigger lookup from the list of real elements. It will take a little thought to figure out how to fix this without breaking any existing input files.

@dsondak
Copy link
Author

dsondak commented Aug 30, 2016

The dummy element has been completely removed from elements.xml now.

I am also not sure why the dummy element was there in the first place. We found it convenient for our purposes and so decided to use it. Of course, it is not a big deal to define our own element in the XML input file.

Thanks for the quick reply!

@speth speth closed this in 6138a39 Aug 31, 2016
@speth speth mentioned this pull request Nov 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants