Open lewisgross1296 opened 1 week ago
Oh a note about my python code. I define my heights a little differently than the AdvancedExtruderGenerator
, but converting between them isn't too bad.
E.g., where I specify (0.1, 3)
for the first (height, num_layers)
pair in my list of heights and layers in the mesh generation script, the python would actually want (0.1/3, 3)
Motivation
I'm currently experimenting with non-uniform z-layering in my mesh, and I want to be able to make plots of my VPPs as a function of z. Here's an example of my z-layering scheme using the
AdvancedExtruderGenerator
I'm currently trying to use an AuxVariable + ParsedAux to compute the z of each element with an
ElementValueSampler
VPP to generate a CSV of z-heights, but it's kind of clunky -- and requiring me to do more post processing to delete the duplicates from each element.It would be nice to have a way to take the information from the mesh generator and generate a layering scheme (in my case in the z-direction), but it could be arbitrary for the
direction
parameter for the x,y, and z unit vectors.Design
Here's the python code I wrote to do this, which accepts
heights
andnum_layers
(just as is used inAdvancedExtruderGenerator
)Impact
While I'm pretty sure my python code works, it would be great from a QC standpoint to have MOOSE output the z corresponding to each VPP value in a way that doesn't require removing duplicates (like w ElementValueSampler)