terrapower / armi

An open-source nuclear reactor analysis automation framework that helps design teams increase efficiency and quality
https://terrapower.github.io/armi/
Apache License 2.0
224 stars 87 forks source link

Differentiate between scalar and vector parameter quantities #619

Open jeffbaylor opened 2 years ago

jeffbaylor commented 2 years ago

Rotations of parameter data could be generalized if there was a variable on the parameter that indicates the quantity type in a mathematical sense (not a number, scalar, planar vector, vector, tensor, etc). Data rotations are important when the assembly is shuffled and also when a partial core is grown to a full core with symmetry assumptions. This is distinct from the location, since each located data item could be a scalar, vector, etc. Using the existing flags system would be problematic since each value will have one and only quantity type from a mathematical sense.

This could be a variable with an enum value on the parameter object that defaults to scalar, but could be a planar vector (with orientation), 3D vector, tensor, etc. The mechanical group currently uses scalars and vectors in the plane normal to the assembly's elevation vector. The current method being developed for rotating these vectors is not general, so no other vector data would be rotated. Generalizing this would ensure that all vectors are managed correctly.

To support the current mechanical data, we would only need to add rotation support for the particular planar vector we use for displacement, but adding the other options to the enum and throwing exceptions if a block is rotated with data of their type will help us catch future rotation problems.

john-science commented 3 months ago

@jeffbaylor @alexhjames Somehow, I missed this ticket when it was opened 2 years ago. We can talk about it. I feel like there should be a reasonably easy and lightweight solution.