Skip to content
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

Add option to visualise IPF colour in .VTK output files #16

Open
Gbowker opened this issue May 19, 2021 · 0 comments
Open

Add option to visualise IPF colour in .VTK output files #16

Gbowker opened this issue May 19, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request new-task-schema For suggesting new task schemas

Comments

@Gbowker
Copy link
Contributor

Gbowker commented May 19, 2021

Option to include IPF colour in .vtk output exists in the damask python library. This should be implemented as an option in matflow via the 'visualise' output_map_option within the simulate_volume_element_loading task.

  • simulate_volume_element_loading
  • CP_FFT
  • DAMASK
output_map_options:
  operations:        
    - name: add_IPF_color               # Add RGB colour for each material point corresponding to IPF colourmap
      args: {'q': 'O', 'l': [0, 0, 1]}.       # e.g: quaternions: dataset 'O' for orientations, display 001 poles.
...
      visualise:
        increments: [0, -1]                  # Generate a VTK file for the initial and final increments
        labels: ['IPFcolor_[0\ 0\ 1]']    # load IPF colour quantity in VTK.

Inputs

  • 'q': 'O'
  • 'I': [h, k, l] (possibly h,k,i,l if HCP)
  • Default 'q' to 'O', default h,k,l to 001

Output
task_#_simulate_volume_element_loading/(element##)/viz/geom_load_inc###.vtr

Implementation

  • Requires function mapper 'add_IPF_color' as option within 'simulate_volume_element_loading' task.

@aplowman previously tried:

output_map_options:
  operations:        
    - name: add_IPF_color               
      args: {'q': 'O', 'l': [0, 0, 1]}

...since the add_IPF_color method in the currently-installed version of DAMASK looks like:

    def add_IPF_color(self,q,l):
        """
        Add RGB color tuple of inverse pole figure (IPF) color.
        Parameters
        ----------
        q : str
            Label of the dataset containing the crystallographic orientation as quaternions.
        l : numpy.array of shape (3)
            Lab frame direction for inverse pole figure.
        """
        self._add_generic_pointwise(self._add_IPF_color,{'q':q},{'l':l})

However, this didn't work (Error during calculation: module 'numpy' has no attribute 'gcd'. from DAMASK).This could be MatFlow or DAMASK.
"Since we will be moving to a more recent version of DAMASK soon, I think it makes sense to wait, and check it works once we are on the new version!" - Adam

@Gbowker Gbowker added enhancement New feature or request new-task-schema For suggesting new task schemas labels May 19, 2021
@Gbowker Gbowker self-assigned this May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new-task-schema For suggesting new task schemas
Projects
None yet
Development

No branches or pull requests

1 participant