Skip to content

Renamed GrainMisorientation to CrystalMisorientation; options for writing values relative to x,y,z#433

Open
MattRolchigo wants to merge 3 commits into
llnl:masterfrom
MattRolchigo:misorientation_xyz
Open

Renamed GrainMisorientation to CrystalMisorientation; options for writing values relative to x,y,z#433
MattRolchigo wants to merge 3 commits into
llnl:masterfrom
MattRolchigo:misorientation_xyz

Conversation

@MattRolchigo

@MattRolchigo MattRolchigo commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

GrainOrientation and GrainMisorientation were poor descriptors for grain <100> orientations with respect to the cardinal directions - these were renamed CrystalOrientation and CrystalMisorientation in several filenames, functions, example file inputs, and variables. Also added the option to write misorientation data with respect to x and y directions as ExaCA output (previously, only <100> misorientation with respect to z was available)

@MattRolchigo MattRolchigo requested a review from streeve June 5, 2026 20:55

@streeve streeve left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; only typos to fix

Comment thread README.md
| LayerID | All layers | The final (or most recent) layer in which a given cell undergoes/underwent melting and solidification. Layer numbers start at 0, with -1 used for cells that have not undergone melting/solidification.
| PhaseID | All layers | The solid phase associated with the most recent solidification in a cell. For single phase solidification problems, this will always be 0, while for two phase solidification problems, this will be 0 for cells that solidified as the primary phase and 1 for cells that solidified as the second phase
| GrainMisorientation | All layers | The orientation (in degrees) of the grain's nearest <100> direction to the Z axis (the thermal gradient direction for directional solidification problems, the build/layer offset direction for other problems). Epitaxial grains (from the initial grain structure or powder layer) are assigned (rounded) integer values between 0 and 55, while nucleated grains (not present in the initial grain structure) are assigned values between 100 and 155 (the offset of 100 is simply used to ensure the two types of grains are differentiated, but a nucleated grain with a value of 135 actually has <100> misoriented with Z by 35 degrees). All cells belonging to the same grain (same GrainID value) will have the same GrainMisorientation, as no intra-granular misorientations are currently simulated. Also of note is that for intermediate output files where liquid cells are present, these cells are assigned a value of -1, and that unmelted material (or non-existent material in a powder layer) is assigned a value of 200.
| CrystalMisorientationZ | All layers | The orientation (in degrees) of the grain's nearest <100> direction to the Z axis (the thermal gradient direction for directional solidification problems, the build/layer offset direction for other problems). Epitaxial grains (from the initial grain structure or powder layer) are assigned (rounded) integer values between 0 and 55, while nucleated grains (not present in the initial grain structure) are assigned values between 100 and 155 (the offset of 100 is simply used to ensure the two types of grains are differentiated, but a nucleated grain with a value of 135 actually has <100> misoriented with Z by 35 degrees). All cells belonging to the same grain (same GrainID value) will have the same GrainMisorientation, as no intra-granular misorientations are currently simulated. Also of note is that for intermediate output files where liquid cells are present, these cells are assigned a value of -1, and that unmelted material (or non-existent material in a powder layer) is assigned a value of 200.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| CrystalMisorientationZ | All layers | The orientation (in degrees) of the grain's nearest <100> direction to the Z axis (the thermal gradient direction for directional solidification problems, the build/layer offset direction for other problems). Epitaxial grains (from the initial grain structure or powder layer) are assigned (rounded) integer values between 0 and 55, while nucleated grains (not present in the initial grain structure) are assigned values between 100 and 155 (the offset of 100 is simply used to ensure the two types of grains are differentiated, but a nucleated grain with a value of 135 actually has <100> misoriented with Z by 35 degrees). All cells belonging to the same grain (same GrainID value) will have the same GrainMisorientation, as no intra-granular misorientations are currently simulated. Also of note is that for intermediate output files where liquid cells are present, these cells are assigned a value of -1, and that unmelted material (or non-existent material in a powder layer) is assigned a value of 200.
| CrystalMisorientationZ | All layers | The orientation (in degrees) of the grain's nearest <100> direction to the Z axis (the thermal gradient direction for directional solidification problems, the build/layer offset direction for other problems). Epitaxial grains (from the initial grain structure or powder layer) are assigned (rounded) integer values between 0 and 55, while nucleated grains (not present in the initial grain structure) are assigned values between 100 and 155 (the offset of 100 is simply used to ensure the two types of grains are differentiated, but a nucleated grain with a value of 135 actually has <100> misoriented with Z by 35 degrees). All cells belonging to the same grain (same GrainID value) will have the same CrystalMisorientation, as no intra-granular misorientations are currently simulated. Also of note is that for intermediate output files where liquid cells are present, these cells are assigned a value of -1, and that unmelted material (or non-existent material in a powder layer) is assigned a value of 200.
Previously named GrainMisorientation.

Comment thread src/CAprint.hpp

// Print grain orientations to file - either all layers (print_region = 2), or if in an intermediate state, the
// layers up to the current one (print_region = 1) z_end will equal grid.nz if this is the final layer
// Print crustal orientations to file - either all layers (print_region = 2), or if in an intermediate state,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol

Comment thread src/CAinputs.hpp
(print.interlayer_undercooling_solidification_start))
print.interlayer_full = true;
// First 7 inputs are full domain inputs - check if any of the others were toggled
// First 9 inputs are full domain inputs - check if any of the others were toggled

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(future improvement: this should be an unordered map or something)

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