-
Notifications
You must be signed in to change notification settings - Fork 91
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
Fixing the affect of custom isotopics on material density #1822
Changes from 12 commits
7b258d4
d7f2f91
1290e14
fd831ca
895e61b
db06fd4
55d8c13
3965082
d978533
6a06967
befd6a7
d59e8ab
c1270df
53ff4d3
4fc8012
2cfe89b
e483fef
7da315a
c33c893
2f27761
d85cc1e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -394,6 +394,7 @@ def apply(self, material): | |
material.massFrac = dict(self.massFracs) | ||
if self.density is not None: | ||
if not isinstance(material, materials.Custom): | ||
# TODO I think this warning should go away? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would like a second set of eyes on the runLog statement below. I am 99% sure that that print should be removed completely, because we are now allowing for non- There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The runlog appears to still be correct and applicable, as the density is not applied to Related: I believe this was intended to explicitly call out that setting a custom density for a library material using custom isotopics is not allowed. Presumably a library material would have known, vetted properties that should not be overwritten by users in a passive way. From recollection, using custom isotopics on a library material allows the density to be set on a component specifically using the custom isotopics, but using custom isotopics to set the density for the reference material is no bueno. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you're right. The thing that keeps tripping me up is the last sentence: "Only custom materials may have a density specified." I feel like that can be reworded to make the intention more clear. Right now I read that and think that its saying "the density that you specified is doing nothing". I'll try to rejigger a bit. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I vaguely remember struggling how to phrase this without being very wordy. Some ideas: "Only custom materials may have a density specified using custom isotopics, though components using custom materials may have their densities changed." "The reference density of materials in the materials library will not be changed by custom isotopics, but components with custom isotopics using a library material will use the density implied by the custom isotopics." There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alright, I updated the wording. Thanks for helping here. |
||
runLog.important( | ||
"A custom density or number densities has been specified for non-custom " | ||
"material {}. The material object's density will not be updated to prevent unintentional " | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, so the variable name here is strange. Because "input heights" makes sense if this Component is part of an
Assembly
in some way, sure.But
Components
are a very general idea of the leaf of the data model. They don't have to be in a pin-type reactor.What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, maybe this new parameter should have a default value? What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This parameter and its name are directly copied from the case setting of the same name. I tried to reflect that intention in the docstring, but maybe I could be more clear there.
When Jake put up the draft PR, he was originally passing an entire case settings object down to this level. I did away with that because I find it frustrating when I have to whip up an entire
cs
just for a single boolean.So I made the name for this parameter exactly the same as the case setting whose value should be passed down here. I thought that made things simpler, but if you think it'd be more clear either (1) with a different name, or (2) if we passed the entire
cs
, then I am open to those options.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With respect to a default value...
I'm not sure how I feel there.
On the one hand, we could potentially make the default be the same as the default for the
inputHeightsConsideredHot
case setting (True
). On the other hand, I really don't like that because the default on that case setting is the opposite of our typical workflow at this point in time (i.e. having axial expansion turned on).I think my ideal solution would be if there were a way to not have to pass the value via method calls. But the only way I could conceive to do that is to store a
cs
on theComponentBlueprint
, and that is something I really don't want to do.Maybe you see a clean way to get around all this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is definitely better to pass one value instead of the entire settings object. For sure. Nice.
I suppose "input dimensions considered hot" would have been a more accurate name for that setting. But the people who created it were definitely thinking of pin-type reactors.