Create Texture for a Dual-Phase Microstructure#

[1]:
import damask
import numpy as np
[2]:
rnd = damask.Rotation.from_random(7)
fbr = damask.Rotation.from_fiber_component(alpha=[1,0],beta=[1,0],
                                           sigma=5.0,N=5,degrees=True)
sph = damask.Rotation.from_spherical_component(center=damask.Rotation(),
                                               sigma=7.5,N=3,degrees=True)
[3]:
config = damask.ConfigMaterial()\
               .material_add(O=rnd,phase='phase_A',homogenization='SX')\
               .material_add(O=fbr,phase='phase_A',homogenization='SX')\
               .material_add(O=sph,phase='phase_B',homogenization='SX')
[4]:
print(f'configuration is{" " if config.is_valid else " not "}valid\n')

config.save()
config
configuration is valid

[4]:
material:
  - constituents:
      - O: [0.47540206444386257, -0.755772762003569, 0.38051188065036495, 0.24085497300228725]
        phase: phase_A
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.09685466834809778, -0.3515005664527781, -0.8551534799702376, -0.36848209006320604]
        phase: phase_A
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.2484031911083276, -0.6380062206907329, -0.7287169440258603, -0.014681025057498952]
        phase: phase_A
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.3258068450217014, 0.47447601583157856, -0.5017220768447993, -0.6457533335137636]
        phase: phase_A
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.17700001052817102, -0.646247404669348, 0.6483071472254212, 0.36157036809948245]
        phase: phase_A
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.26028585032726714, -0.3418548051532744, 0.8970505952627056, 0.10337696963953748]
        phase: phase_A
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.7342287461712224, -0.24590670296601072, 0.6322683880484985, 0.025975511674925435]
        phase: phase_A
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.8900533179066344, -0.008108636339747382, 0.00016647952157991799, -0.45578428404747573]
        phase: phase_A
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.9433505964660531, 0.032849969519985166, -0.009890188605943484, 0.33001926583006774]
        phase: phase_A
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.26718735713741765, -0.019182264026505785, 0.008006083229345937, -0.9634203960702017]
        phase: phase_A
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.7369348709554535, 0.03427202193713886, -0.007650757561359566, 0.6750510279904376]
        phase: phase_A
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.5318840023041514, -0.058792182362536534, -0.036753395330132776, -0.8439739778676085]
        phase: phase_A
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.9919859110133598, -0.056274616005574825, -0.06037527299495327, -0.09566580556920355]
        phase: phase_B
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.9994026734782582, 0.006149478812082798, 0.006271365721509309, 0.03342379581730592]
        phase: phase_B
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.9999253374887633, -0.008309023736418533, -0.003946589108992651, 0.008043880092043126]
        phase: phase_B
        v: 1.0
    homogenization: SX

homogenization: {}

phase: {}