#####################
# $Id$
#####################

#-------------------#
<homogenization>
#-------------------#
#/echo/                        # uncomment to output homogenization part
[SX]
type	isostrain
Ngrains	1

[Grain_Cluster]
type	RGC
ngrains			8
clustersize		2	2	2        # product of these numbers must be equal to ngrains(!)
clusterorientation	0.0	0.0	0.0      # orientation of cluster in terms of 313 Euler-angles in degree (random if not present)
# clusterorientation	0.0	26.57	0.0      # [012]
# clusterorientation	0.0	45.00	0.0      # [011]
# clusterorientation	0.0	26.57	24.10    # [112]
# clusterorientation	0.0	45.00	19.47    # [122]
# clusterorientation	0.0	45.00	35.26    # [111]
grainsize		4.0e-6	4.0e-6	2.0e-6   # in [m]
overproportionality	2.0e+0                   # typical range between 0.001 to 1000
scalingparameter	1.0e+1                   # typical range between 0.001 to 1000
(output)		constitutivework
(output)		magnitudemismatch
(output)		penaltyenergy
(output)		volumediscrepancy
(output)		averagerelaxrate
(output)		maximumrelaxrate

[Taylor2]
type	isostrain
Ngrains	2

#-------------------#
<microstructure>
#-------------------#
#/echo/                        # uncomment to output microstructure part

[Aluminum_j2]
crystallite	2
(constituent)	phase 1	texture	2	fraction	1.0

[Aluminum_pheno_Poly]
/elementhomogeneous/       # put this flag to set ips identical in one element (something like reduced integration)
crystallite	2
(constituent)	phase 2	texture	2	fraction	1.0

[Aluminum_nonlocal_001]
crystallite	2
(constituent)	phase 3	texture	3	fraction	1.0

[DP_Steel]
/elementhomogeneous/
crystallite 2
(constituent)	phase	4	texture	1 fraction	0.82
(constituent)	phase	5	texture	1	fraction	0.18 

#-------------------#
<crystallite>
#-------------------#
#/echo/                        # uncomment to output crystallite part

[none]

[aLittleSomething]
(output) f
(output) p

[all]
(output) phase
(output) texture
(output) volume
(output) orientation    # quaternion
(output) eulerangles    # orientation as Bunge triple
(output) grainrotation  # deviation from initial orientation as axis (1-3) and angle in degree (4) in crystal reference coordinates
(output) grainrotationx # deviation from initial orientation as angle in degrees around sample reference x axis
(output) grainrotationy # deviation from initial orientation as angle in degrees around sample reference y axis
(output) grainrotationz # deviation from initial orientation as angle in degrees around sample reference z axis
(output) f              # deformation gradient tensor; synonyms: "defgrad"
(output) fe             # elastic deformation gradient tensor
(output) fp             # plastic deformation gradient tensor
(output) e              # total strain as Green-Lagrange tensor 
(output) ee             # elastic strain as Green-Lagrange tensor 
(output) p              # first Piola-Kichhoff stress tensor; synonyms: "firstpiola", "1stpiola"
(output) s              # second Piola-Kichhoff stress tensor; synonyms: "tstar", "secondpiola", "2ndpiola"
(output) lp             # plastic velocity gradient tensor
(output) elasmatrix     # elastic stiffness matrix

#-------------------#
<phase>
#-------------------#
#/echo/                        # uncomment to output phase part

[Aluminium_elastic_only]

elasticity              hooke
plasticity              none

lattice_structure       orthorhombic
c11                     106.75e9
c22                     106.75e9
c33                     106.75e9
c12                     60.41e9
c13                     60.41e9
c23                     60.41e9
c44                     28.34e9
c55                     28.34e9
c66                     28.34e9

[Aluminum_J2isotropic]

elasticity              hooke
plasticity              j2

(output)                flowstress
(output)                strainrate

lattice_structure       isotropic
c11                     110.9e9
c12                     58.34e9
taylorfactor            3
tau0                    31e6
gdot0                   0.001
n                       20
h0                      75e6
tausat                  63e6
#---- if tausat == 0.0 --------!!!VALUES HERE ARE NOT FOR ALUMINUM!!!
tausat_SinhFitA         2.4175e-7         
tausat_SinhFitB         5.9804e-8
tausat_SinhFitC         1.0
tausat_SinhFitD         3.9
# h0_slope    
#---------------------------#
a                       2.25
atol_resistance         1


[Aluminum_phenopowerlaw]
# slip only
elasticity              hooke
plasticity              phenopowerlaw

(output)                resistance_slip
(output)                shearrate_slip
(output)                resolvedstress_slip
(output)                totalshear
(output)                resistance_twin
(output)                shearrate_twin
(output)                resolvedstress_twin
(output)                totalvolfrac

lattice_structure       fcc
Nslip                   12  0  0  0              # per family
Ntwin                    0  0  0  0              # per family

c11                     106.75e9
c12                     60.41e9
c44                     28.34e9

gdot0_slip              0.001
n_slip                  20
tau0_slip                 31e6                # per family
tausat_slip               63e6               # per family
a_slip                  2.25
gdot0_twin              0.001
n_twin                  20
tau0_twin                 31e6               # per family
s_pr                    0                        # push-up factor for slip saturation due to twinning
twin_b                  0
twin_c                  0
twin_d                  0
twin_e                  0
h0_slipslip             75e6
#h0_sliptwin            0 no effect
h0_twinslip             0
h0_twintwin             0
interaction_slipslip    1 1 1.4 1.4 1.4 1.4
interaction_sliptwin    1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
interaction_twinslip    1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
interaction_twintwin    1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
atol_resistance         1


[Aluminum_nonlocal]

elasticity              hooke
plasticity              nonlocal
/nonlocal/

(output)                rho
(output)                rho_edge
(output)                rho_screw
(output)                rho_sgl
(output)                rho_sgl_edge
(output)                rho_sgl_edge_pos
(output)                rho_sgl_edge_neg
(output)                rho_sgl_screw
(output)                rho_sgl_screw_pos
(output)                rho_sgl_screw_neg
(output)                rho_sgl_mobile
(output)                rho_sgl_edge_mobile
(output)                rho_sgl_edge_pos_mobile
(output)                rho_sgl_edge_neg_mobile
(output)                rho_sgl_screw_mobile
(output)                rho_sgl_screw_pos_mobile
(output)                rho_sgl_screw_neg_mobile
(output)                rho_sgl_immobile
(output)                rho_sgl_edge_immobile
(output)                rho_sgl_edge_pos_immobile
(output)                rho_sgl_edge_neg_immobile
(output)                rho_sgl_screw_immobile
(output)                rho_sgl_screw_pos_immobile
(output)                rho_sgl_screw_neg_immobile
(output)                rho_dip
(output)                rho_dip_edge
(output)                rho_dip_screw
(output)                excess_rho
(output)                excess_rho_edge
(output)                excess_rho_screw
(output)                rho_forest
(output)                delta
(output)                delta_sgl
(output)                delta_dip
(output)                shearrate
(output)                resolvedstress
(output)                resolvedstress_back
(output)                resolvedstress_external
(output)                resistance
(output)                rho_dot
(output)                rho_dot_sgl
(output)                rho_dot_dip
(output)                rho_dot_gen
(output)                rho_dot_gen_edge
(output)                rho_dot_gen_screw
(output)                rho_dot_sgl2dip
(output)                rho_dot_sgl2dip_edge
(output)                rho_dot_sgl2dip_screw
(output)                rho_dot_ann_ath
(output)                rho_dot_ann_the
(output)                rho_dot_ann_the_edge
(output)                rho_dot_ann_the_screw
(output)                rho_dot_edgejogs
(output)                rho_dot_flux
(output)                rho_dot_flux_edge
(output)                rho_dot_flux_screw
(output)                velocity_edge_pos
(output)                velocity_edge_neg
(output)                velocity_screw_pos
(output)                velocity_screw_neg
(output)                fluxDensity_edge_pos_x
(output)                fluxDensity_edge_pos_y
(output)                fluxDensity_edge_pos_z
(output)                fluxDensity_edge_neg_x
(output)                fluxDensity_edge_neg_y
(output)                fluxDensity_edge_neg_z
(output)                fluxDensity_screw_pos_x
(output)                fluxDensity_screw_pos_y
(output)                fluxDensity_screw_pos_z
(output)                fluxDensity_screw_neg_x
(output)                fluxDensity_screw_neg_y
(output)                fluxDensity_screw_neg_z
(output)                maximumDipoleHeight_edge
(output)                maximumDipoleHeight_screw
(output)                accumulatedshear
(output)                dislocationstress
(output)                boundarylayer

lattice_structure       fcc
Nslip                   12                       # number of slip systems

c11                     106.75e9                 # elastic constants
c12                     60.41e9
c44                     28.34e9

burgers                 2.86e-10                 # Burgers vector in m
rhoSglEdgePos0          0.25e10                  # Initial positive edge single dislocation density in m/m**3 (per slip family)
rhoSglEdgeNeg0          0.25e10                  # Initial negative edge single dislocation density in m/m**3 (per slip family)
rhoSglScrewPos0         0.25e10                  # Initial positive screw single dislocation density in m/m**3 (per slip family)
rhoSglScrewNeg0         0.25e10                  # Initial negative screw single dislocation density in m/m**3 (per slip family)
rhoDipEdge0             1e8                      # Initial edge dipole dislocation density in m/m**3 (per slip family)
rhoDipScrew0            1e8                      # Initial screw dipole dislocation density in m/m**3 (per slip family)
rhoSglScatter           0                        # standard deviation of scatter in initial single dislocation density
#rhoSglRandom           1e12                     # randomly distributed total dislocation density (sum over all slip systems and types) in m/m**3
#rhoSglRandomBinning    1                        # binning size of randomly distributed dislocations (number of dislocations per ip volume)
minimumDipoleHeightEdge  2e-9                    # minimum distance for stable edge dipoles in m (per slip family)
minimumDipoleHeightScrew 2e-9                    # minimum distance for stable screw dipoles in m (per slip family)
lambda0                 80                       # prefactor for mean free path 
edgeMultiplication      0.1                      # factor to which edges contribute to multiplication
atomicVolume            1.7e-29                  # atomic volume in m**3
selfdiffusionPrefactor  1e-4                     # prefactor for self-diffusion coefficient in m**2/s
selfdiffusionEnergy     2.3e-19                  # activation enthalpy for seld-diffusion in J
solidSolutionEnergy     2e-19                    # activation energy of solid solution particles in J
solidSolutionConcentration 1e-5                  # concentration of solid solution in parts per b^3
solidSolutionSize       2                        # size of solid solution obstacles in multiples of burgers vector length
peierlsStressEdge       1e5                      # Peierls stress for edges in Pa (per slip family)
peierlsStressScrew      1e5                      # Peierls stress for screws in Pa (per slip family)
doublekinkWidth         10                       # width of double kinks in multiples of burgers vector length b
viscosity               1e-4                     # viscosity for dislocation glide in Pa s
p                       1                        # exponent for thermal barrier profile
q                       1                        # exponent for thermal barrier profile
attackFrequency         50e9                     # attack frequency in Hz
maximumVelocity         3600                     # maximum allowed velocity
surfaceTransmissivity   1.0                      # transmissivity of free surfaces for dislocation flux
grainboundaryTransmissivity   0.0                # transmissivity of grain boundaries for dislocation flux (grain bundaries are identified as interfaces with different textures on both sides); if not set or set to negative number, the subroutine automatically determines the transmissivity at the grain boundary
interaction_SlipSlip    0  0  0.625  0.07  0.137  0.122  # Dislocation interaction coefficient
linetension             0.8                      # constant indicating the effect of the line tension on the hardening coefficients (0 to 1)
edgejog                 1.0                      # fraction of annihilated screw dipoles that forms edge jogs (0 to 1)
shortRangeStressCorrection 0                     # switch for use of short range correction stress
cutoffRadius            1e-3                     # cutoff radius for dislocation stress in m
CFLfactor               2.0                      # safety factor for CFL flux check (numerical parameter)
significantRho          1e6                      # minimum dislocation density considered relevant in m/m**3
#significantN           0.1                      # minimum dislocation number per ip considered relevant
absoluteToleranceRho    1e4                      # absolute tolerance for dislocation density in m/m**3
deadZone                0                        # switch for the modification of the shearrate in presence of dead dislocations
randomMultiplication    0                        # switch for probabilistic extension of multiplication rate


[BCC_Ferrite]
elasticity              hooke
plasticity              phenopowerlaw
lattice_structure       bcc
Nslip                   12  0  0  0              # per family
Ntwin                    0  0  0  0              # per family
c11                     233.3e9
c12                     135.5e9
c44                     118.0e9
gdot0_slip              0.001
n_slip                  20
tau0_slip               88.0e6 0 0 0             # per family
tausat_slip             205.0e6 0 0 0            # per family
gdot0_twin              0.001
n_twin                  20
tau0_twin               31.0e6 0 0 0             # per family
s_pr                    0                        # push-up factor for slip saturation due to twinning
twin_b                  0
twin_c                  0
twin_d                  0
twin_e                  0
h0_slipslip             495.0e6
h0_sliptwin             0
h0_twinslip             0
h0_twintwin             0
interaction_slipslip    1 1 1.4 1.4 1.4 1.4
interaction_sliptwin    1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
interaction_twinslip    1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
interaction_twintwin    1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
a_slip                 1.0
atol_resistance         1

[BCC_Martensite]
plasticity              phenopowerlaw
lattice_structure       bcc
Nslip                   12  0  0  0              # per family
Ntwin                    0  0  0  0              # per family
c11                     417.4e9
c12                     242.4e9
c44                     211.1e9
gdot0_slip              0.001
n_slip                  20
tau0_slip               575.00e6 0 0 0 # 460.0e6           # per family
tausat_slip             1280.0e6 0 0 0 # 1020.0e6          # per family
gdot0_twin              0.001
n_twin                  20
tau0_twin               31.0e6 0 0 0             # per family
s_pr                    0                        # push-up factor for slip saturation due to twinning
twin_b                  0
twin_c                  0
twin_d                  0
twin_e                  0
h0_slipslip             53500.0e6     # 35000.0e6
h0_sliptwin             0
h0_twinslip             0
h0_twintwin             0
interaction_slipslip    1 1 1.4 1.4 1.4 1.4
interaction_sliptwin    1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
interaction_twinslip    1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
interaction_twintwin    1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
a_slip                  2.0
atol_resistance         1


[TWIP steel FeMnC]

elasticity          hooke
plasticity          dislotwin

#(output)           edge_density
#(output)           dipole_density
#(output)           shear_rate_slip
#(output)           mfp_slip
#(output)           resolved_stress_slip
#(output)           threshold_stress_slip
#(output)           twin_fraction
#(output)           shear_rate_twin
#(output)           mfp_twin
#(output)           resolved_stress_twin
#(output)           threshold_stress_twin
#(output)           shear_rate_shearband	
#(output)           resolved_stress_shearband	
#(output)           schmid_factor_shearband
#(output)           sb_eigenvalues
#(output)           sb_eigenvectors

### Material parameters ###
lattice_structure	fcc
C11                   175.0e9       # From Music et al. Applied Physics Letters 91, 191904 (2007)
C12                   115.0e9
C44                   135.0e9
grainsize             2.0e-5        # Average grain size [m]
SolidSolutionStrength 1.5e8         # Strength due to elements in solid solution

### Dislocation glide parameters ###
Nslip               12 0 0 0
slipburgers         2.56e-10 0 0 0  # Burgers vector of slip system [m]
rhoedge0            1.0e12 0 0 0    # Initial dislocation density [m/m**3]
rhoedgedip0         1.0 0 0 0       # Initial dislocation density [m/m**3]
Qedge               3.7e-19 0 0 0   # Activation energy for dislocation glide [J]
v0                  1.0e-4 0 0 0    # Initial glide velocity [m/s]
CLambdaSlip         10.0 0 0 0      # Adj. parameter controlling dislocation mean free path
D0                  4.0e-5          # Vacancy diffusion prefactor [m**2/s]
Qsd                 4.5e-19         # Activation energy for climb [J]
pexponent           1.0             # p-exponent in glide velocity
qexponent           1.0             # q-exponent in glide velocity
Catomicvolume       1.0             # Adj. parameter controlling the atomic volume [in b]
Cedgedipmindistance 1.0             # Adj. parameter controlling the minimum dipole distance [in b]
atol_rho            1.0e-200
interactionSlipSlip 0.122 0.122 0.625 0.07 0.137 0.122 # Interaction coefficients (Kubin et al. 2008)

### Shearband parameters ###
shearbandresistance 180e6
shearbandvelocity   1e-4
QedgePerSbSystem    3.7e-19     # Activation energy for shear banding [J]

### Twinning parameters ###
Ntwin               12
twinburgers         1.47e-10        # Burgers vector of twin system [m]
twinsize            5.0e-8          # Twin stack mean thickness [m]	
L0                  442.0           # Length of twin nuclei in Burgers vectors
maxtwinfraction     1.0             # Maximum admissible twin volume fraction
Ndot0               0.0             # Number of potential sources per volume per time [1/m**3.s] 
rexponent           10.0            # r-exponent in twin formation probability
Cmfptwin            1.0             # Adj. parameter controlling twin mean free path
Cthresholdtwin      1.0             # Adj. parameter controlling twin threshold stress
interactionSlipTwin 0.0 1.0         # Dislocation-Twin interaction coefficients
interactionTwinTwin 0.0 1.0         # Twin-Twin interaction coefficients
SFE_0K              -0.0396         # stacking fault energy at zero K; TWIP steel: -0.0526; Cu: -0.0396
dSFE_dT             0.0002          # temperature dependance of stacking fault energy

#-------------------#
<texture>
#-------------------#
#/echo/                        # uncomment to output texture part

[Rolling]
hybridIA	DP_EBSD.linearODF
symmetry    orthotropic # or monoclinic

[random]

[001]
(gauss)		phi1	0.000	Phi	0.000	phi2	0.000	scatter	0.000	fraction	1.000

[101]
(gauss)		phi1	0.000	Phi	45.000	phi2	90.000	scatter	0.000	fraction	1.000

[111]
(gauss)		phi1	0.000	Phi	54.7356	phi2	45.000	scatter	0.000	fraction	1.000

[123]
(gauss)		phi1	209.805	Phi	29.206	phi2	63.435	scatter	0.000	fraction	1.000

[fiber example]
#   fiber axis in spherical coordinates: alpha crystal system, beta sample system
(fiber)     alpha1 123 alpha2 123 beta1 12 beta2 45 scatter 15 fraction 0.333  

[random single crystals]
(random) scatter 0.000 fraction 1.000