Create Texture for a Dual-Phase Microstructure

[1]:
import damask
import numpy as np
[2]:
rnf = damask.Rotation.from_random(7).append(
      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=rnf,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.7417541735473804, -0.5311072297829124, -0.3493803492058879, -0.21368020050097156]
        phase: phase_A
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.28970357786866374, -0.7136698297907518, -0.16927219306882302, 0.6148935970313933]
        phase: phase_A
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.41217575406934914, -0.09260299766562653, 0.1913794295851766, 0.8859513228797369]
        phase: phase_A
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.182860482870869, -0.6240713388573009, 0.3833928342894541, 0.6558253902042736]
        phase: phase_A
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.6347426359801154, -0.7480295323304369, -0.027020697797789785, -0.1918944676665874]
        phase: phase_A
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.0597998095620135, 0.9947482534393841, -0.07822377717664028, -0.027945227497035086]
        phase: phase_A
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.7490655257454321, 0.10798285193359831, 0.3615985329932363, 0.5445062375814859]
        phase: phase_A
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.8916567804482294, -0.009352379097387457, -0.016472084838849703, -0.4523155859651296]
        phase: phase_A
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.9864716084818088, 0.026371185017628373, 0.012991972240260538, 0.16127471877943939]
        phase: phase_A
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.19716759505229683, 0.0004012908300142972, -0.009198295868602532, -0.9803265628248972]
        phase: phase_A
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.9747031189892033, 0.004302629365620145, 0.0003556681811255544, 0.22346183278897147]
        phase: phase_A
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.294789044475682, -0.0044724956666205625, 0.010815504738247089, -0.9554906806959885]
        phase: phase_A
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.9994893562436067, -0.006089292389647405, 0.030926937475738336, -0.005241355960617801]
        phase: phase_B
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.9944956547219659, -0.04499999703887323, 0.05748876220710918, 0.07515607244610632]
        phase: phase_B
        v: 1.0
    homogenization: SX
  - constituents:
      - O: [0.994420264138156, -0.045467263533885166, 0.07183539473242595, -0.06245592271175585]
        phase: phase_B
        v: 1.0
    homogenization: SX

homogenization: {}

phase: {}