Closed keckler closed 1 month ago
Okay, so the problem appears to be that the cold=True
parameter isn't how we drive DerivedShape
s:
The idea is that the DerivedShape
is just the liquid left over to fill all the other solid shapes around. So, you can not change the area/volume of a DerivedShape
by driving the temperature of the component. You would have to drive the temperature of the parent component.
So, I suppose I would normally like to totally remove the cold=True
parameter from that method. But that would break a lot of code, so we can't break the subclass paradigm. It would likewise be hard to have this parameter raise an error, since... which way would raise the error True
or False
?
Okay, what you prefer would happen?
In my understanding, cold=True
effectively means "give me the area as it was defined in the blueprints", or "give me the area at the temperature corresponding to Tinput
". This is based on the docstring in the abstract base class:
https://github.com/terrapower/armi/blob/9dc6760de7da3800cbe98e83066cf5f343e81a6a/armi/reactor/components/component.py#L609-L618
Since the area of a DerivedShape
is determined based on the areas of other components in the block, I would therefore expect the area of a cold DerivedShape
component to be calculated using the areas of other components in the block when they are at their cold temperatures. So basically, I would expect that we would first have to loop over all of the other components in the block and determine their cold areas, and then subtract them from the block's area to get the cold area of the DerivedShape
.
Also, kind of a sidebar, but I noticed that the various instances of getComponentArea()
are all over the place with respect to actually using the cold
argument or not, or properly documenting if it is used or not.
This particular instance of getComponentArea()
says cold
is "Ignored for this component", but that is untrue. cold=True
is checked and used:
https://github.com/terrapower/armi/blob/9dc6760de7da3800cbe98e83066cf5f343e81a6a/armi/reactor/components/__init__.py#L154-L167
This one does not use the cold
argument at all, but does not say so in the docstring:
https://github.com/terrapower/armi/blob/9dc6760de7da3800cbe98e83066cf5f343e81a6a/armi/reactor/components/__init__.py#L240-L241
Here is a very simple blueprints file that will run with just the framework:
Run this and then load up the resulting DB to interrogate the component areas:
Notice that the
DerivedShape
component has the same area no matter ifcold=True
orcold=False
.This means that the sum of the component areas changes, even though the
op
of the intercoolant region doesn't change.In reality, the area of the
DerivedShape
should change as the areas of the other components change.