should not be part of the repository
This commit is contained in:
parent
452da977b0
commit
eddb65d796
2
PRIVATE
2
PRIVATE
|
@ -1 +1 @@
|
||||||
Subproject commit c6536a004dcd9bd883e1dbd38a3a1265b0eda53d
|
Subproject commit f76f92caa726a625b052c998325e0595c5bc5b22
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 375 KiB |
|
@ -1,22 +0,0 @@
|
||||||
epsilon sigma
|
|
||||||
0.0 0.0
|
|
||||||
0.0031774515415435856 1.3241572946800098
|
|
||||||
0.007632690314496565 1.8769627028448532
|
|
||||||
0.012710579645127867 2.398519561282736
|
|
||||||
0.01965255325402597 2.7954689602895897
|
|
||||||
0.02846634593072725 3.1295345203656986
|
|
||||||
0.03852543972278516 3.4011029809878863
|
|
||||||
0.05046408737218261 3.671511223179614
|
|
||||||
0.062387265442507306 3.8184722243707725
|
|
||||||
0.0730612750027072 3.9970685147657115
|
|
||||||
0.08749052488281794 4.142482558049593
|
|
||||||
0.10065900406849931 4.226946459786829
|
|
||||||
0.11382748325418066 4.311410361524061
|
|
||||||
0.12824899834475503 4.395100784307658
|
|
||||||
0.14705227170768684 4.4452222205033785
|
|
||||||
0.16774283371749454 4.555907058768929
|
|
||||||
0.1834173847129619 4.638824002598888
|
|
||||||
0.19846541775598284 4.722127685905665
|
|
||||||
0.21288693284655721 4.805818108689262
|
|
||||||
0.23107142304657893 4.918049904862087
|
|
||||||
0.24674984143681447 5.031828658942189
|
|
|
@ -1,21 +0,0 @@
|
||||||
epsilon sigma
|
|
||||||
0.0 0.0
|
|
||||||
0.0014874000278452676 2.8375462153674764
|
|
||||||
0.004705072474977964 3.514572343486533
|
|
||||||
0.008549262874557206 4.191211732128767
|
|
||||||
0.013023838621351133 4.898326191544326
|
|
||||||
0.016871896415698542 5.605827390436705
|
|
||||||
0.022599508067385504 6.312168370898625
|
|
||||||
0.028327119719072452 7.018509351360548
|
|
||||||
0.036556935785777275 7.692441563665051
|
|
||||||
0.0454171371996968 8.396848846742879
|
|
||||||
0.0555187723342048 9.00789722011664
|
|
||||||
0.06562040746871278 9.6189455934904
|
|
||||||
0.07697894590288198 10.260082298160665
|
|
||||||
0.08831814736321025 10.746909951580216
|
|
||||||
0.09964187924446577 11.110290363999194
|
|
||||||
0.112849032377829 11.503372368237859
|
|
||||||
0.12291199356465513 11.805802639110189
|
|
||||||
0.13548489395603547 12.137547762325386
|
|
||||||
0.1461666383057717 12.37786767322061
|
|
||||||
0.15810141856040097 12.617414105162197
|
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 364 KiB |
|
@ -1,20 +0,0 @@
|
||||||
epsilon sigma
|
|
||||||
0.0 0.0
|
|
||||||
0.7843137254901968 12.379237409249356
|
|
||||||
1.5686274509803937 24.900436365022188
|
|
||||||
2.1568627450980387 35.38463004249314
|
|
||||||
2.9411764705882355 46.15655786123972
|
|
||||||
3.5294117647058805 55.766115970197575
|
|
||||||
4.313725490196077 66.8295889784485
|
|
||||||
5.196078431372548 77.30806608357625
|
|
||||||
5.980392156862745 86.03917757579222
|
|
||||||
6.862745098039216 94.47683835438937
|
|
||||||
8.235294117647054 105.23733302844946
|
|
||||||
9.411764705882355 113.6692772347034
|
|
||||||
10.686274509803923 121.22468034832983
|
|
||||||
12.352941176470587 127.89782579698544
|
|
||||||
14.215686274509803 134.2756150079079
|
|
||||||
16.176470588235293 140.65149869471597
|
|
||||||
18.235294117647054 145.2762057203834
|
|
||||||
20.392156862745093 148.4412812744145
|
|
||||||
22.843137254901958 150.72600468758932
|
|
|
@ -1,22 +0,0 @@
|
||||||
epsilon sigma
|
|
||||||
0.0 0.0
|
|
||||||
0.39215686274509665 11.803769126698228
|
|
||||||
0.6862745098039191 24.33449570304316
|
|
||||||
1.2745098039215677 38.02568646506222
|
|
||||||
1.6666666666666679 50.262962327788216
|
|
||||||
2.0588235294117645 62.50023819051427
|
|
||||||
2.5490196078431353 77.35951523466525
|
|
||||||
3.0392156862745097 91.92724708931189
|
|
||||||
3.6274509803921546 109.11698012538346
|
|
||||||
4.313725490196077 128.34562396387125
|
|
||||||
5 144.65881590731527
|
|
||||||
5.882352941176471 160.09356123401741
|
|
||||||
6.666666666666664 174.94712170582517
|
|
||||||
7.6470588235294095 191.8376874559347
|
|
||||||
8.627450980392155 208.14516282703556
|
|
||||||
9.6078431372549 222.70336706111016
|
|
||||||
10.784313725490193 236.0915794889384
|
|
||||||
12.549019607843139 251.21762990910648
|
|
||||||
14.803921568627448 265.4595171401894
|
|
||||||
16.862745098039216 276.498218334953
|
|
||||||
20.098039215686274 284.01551096629123
|
|
|
@ -1,68 +0,0 @@
|
||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
from pathlib import Path
|
|
||||||
import os
|
|
||||||
|
|
||||||
import numpy as np
|
|
||||||
from scipy import interpolate
|
|
||||||
from matplotlib import pyplot as plt
|
|
||||||
|
|
||||||
import damask
|
|
||||||
|
|
||||||
|
|
||||||
# material.yaml
|
|
||||||
example_dir = Path.home()/'DAMASK/examples/config/phase'
|
|
||||||
|
|
||||||
phase = damask.ConfigMaterial.load(example_dir/'Al.yaml')
|
|
||||||
phase['mechanical'] = {'output': ['F','P']}
|
|
||||||
phase['mechanical']['elastic'] = damask.ConfigMaterial.load(example_dir/'mechanical/elastic/Hooke_Al.yaml')
|
|
||||||
phase['mechanical']['plastic'] = damask.ConfigMaterial.load(example_dir/'mechanical/plastic/phenopowerlaw_Al.yaml')
|
|
||||||
|
|
||||||
mat = damask.ConfigMaterial()
|
|
||||||
mat['phase']['Al'] = phase
|
|
||||||
mat['homogenization']['SX'] = {'N_constituents': 1,'mechanical': {'type': 'pass'}}
|
|
||||||
|
|
||||||
# load
|
|
||||||
load = damask.Config()
|
|
||||||
load['solver'] = {'mechanical': 'spectral_basic'}
|
|
||||||
load['loadstep'] = [{'boundary_conditions': {'mechanical': {'dot_F': [[4.5e-3,'x','x'],[0,'x','x'],[0,0,'x']],
|
|
||||||
'P': [['x',0,0],['x',0,0],['x','x',0]]}},
|
|
||||||
'discretization': {'t': 65, 'N': 100}}]
|
|
||||||
|
|
||||||
# grid
|
|
||||||
grid = damask.Grid(np.zeros([2,2,2],int),np.ones(3)*1e-5)
|
|
||||||
|
|
||||||
# crystallographic directions
|
|
||||||
samples = {'001':[[0,0,1],[0,1,0]],'111':[[1,1,1],[0,1,-1]]}
|
|
||||||
|
|
||||||
# reference results
|
|
||||||
reference = {}
|
|
||||||
for label,directions in samples.items():
|
|
||||||
ref_data = damask.Table.load('HosfordEtAl1960_Fig5_'+label+'.txt')
|
|
||||||
reference[label] = [ref_data.get('epsilon')[:,0],ref_data.get('sigma')[:,0]*6894.76e3] # kpsi to Pa
|
|
||||||
|
|
||||||
results = {}
|
|
||||||
for label,directions in samples.items():
|
|
||||||
|
|
||||||
os.makedirs(label, exist_ok=True)
|
|
||||||
|
|
||||||
grid.save('/'.join([label,'2x2x2.vti']))
|
|
||||||
load.save('/'.join([label,'tensionX.yaml']))
|
|
||||||
|
|
||||||
ori = damask.Orientation.from_directions(directions[0],directions[1],lattice='cF')
|
|
||||||
mat_c = mat.material_add(O=ori,phase='Al',homogenization='SX')
|
|
||||||
mat_c.save('/'.join([label,'material.yaml']))
|
|
||||||
|
|
||||||
damask.util.execute(f'DAMASK_grid -l tensionX.yaml -g 2x2x2.vti --wd {label}')
|
|
||||||
|
|
||||||
r = damask.Result('/'.join([label,'2x2x2_tensionX.hdf5']))
|
|
||||||
r.add_strain()
|
|
||||||
r.add_stress_Cauchy()
|
|
||||||
results[label] = [np.array([np.average(epsilon[:,0,0]) for epsilon in r.get('epsilon_V^0.0(F)').values()]),
|
|
||||||
np.array([np.average(sigma[:,0,0]) for sigma in r.get('sigma').values()])]
|
|
||||||
|
|
||||||
|
|
||||||
color = 'tab:blue' if label == '111' else 'tab:orange'
|
|
||||||
plt.plot(results[label][0],results[label][1],label=label+'_sim',color=color,linestyle=':')
|
|
||||||
plt.plot(reference[label][0],reference[label][1],label=label+'_exp',color=color,linestyle='-')
|
|
||||||
plt.savefig('HosfordEtAl1960_Fig5.pdf')
|
|
|
@ -1,65 +0,0 @@
|
||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
from pathlib import Path
|
|
||||||
import os
|
|
||||||
|
|
||||||
import numpy as np
|
|
||||||
from scipy import interpolate
|
|
||||||
from matplotlib import pyplot as plt
|
|
||||||
|
|
||||||
import damask
|
|
||||||
|
|
||||||
|
|
||||||
# material.yaml
|
|
||||||
example_dir = Path.home()/'DAMASK/examples/config/phase'
|
|
||||||
|
|
||||||
phase = damask.ConfigMaterial.load(example_dir/'Cu.yaml')
|
|
||||||
phase['mechanical'] = {'output': ['F','P']}
|
|
||||||
phase['mechanical']['elastic'] = damask.ConfigMaterial.load(example_dir/'mechanical/elastic/Hooke_Cu.yaml')
|
|
||||||
phase['mechanical']['plastic'] = damask.ConfigMaterial.load(example_dir/'mechanical/plastic/phenopowerlaw_Cu.yaml')
|
|
||||||
|
|
||||||
mat = damask.ConfigMaterial()
|
|
||||||
mat['phase']['Cu'] = phase
|
|
||||||
mat['homogenization']['SX'] = {'N_constituents': 1,'mechanical': {'type': 'pass'}}
|
|
||||||
|
|
||||||
# load
|
|
||||||
load = damask.Config()
|
|
||||||
load['solver'] = {'mechanical': 'spectral_basic'}
|
|
||||||
load['loadstep'] = [{'boundary_conditions': {'mechanical': {'dot_F': [[3e-3,'x','x'],[0,'x','x'],[0,0,'x']],
|
|
||||||
'P': [['x',0,0],['x',0,0],['x','x',0]]}},
|
|
||||||
'discretization': {'t': 100, 'N': 100}}]
|
|
||||||
|
|
||||||
# grid
|
|
||||||
grid = damask.Grid(np.zeros([2,2,2],int),np.ones(3)*1e-5)
|
|
||||||
|
|
||||||
|
|
||||||
# crystallographic directions
|
|
||||||
samples = {'001':[[0,0,1],[0,1,0]],'111':[[1,1,1],[0,1,-1]]}
|
|
||||||
|
|
||||||
# reference results
|
|
||||||
reference = {}
|
|
||||||
for label,directions in samples.items():
|
|
||||||
ref_data = damask.Table.load('Takeuchi1975_Fig3b_'+label+'.txt')
|
|
||||||
reference[label] = [ref_data.get('epsilon')[:,0]*.01,ref_data.get('sigma')[:,0]*1e6]
|
|
||||||
|
|
||||||
results = {}
|
|
||||||
for label,directions in samples.items():
|
|
||||||
os.makedirs(label, exist_ok=True)
|
|
||||||
|
|
||||||
grid.save('/'.join([label,'2x2x2.vti']))
|
|
||||||
load.save('/'.join([label,'tensionX.yaml']))
|
|
||||||
|
|
||||||
ori = damask.Orientation.from_directions(directions[0],directions[1],lattice='cF')
|
|
||||||
mat_c = mat.material_add(O=ori,phase='Cu',homogenization='SX')
|
|
||||||
mat_c.save('/'.join([label,'material.yaml']))
|
|
||||||
|
|
||||||
damask.util.execute(f'DAMASK_grid -l tensionX.yaml -g 2x2x2.vti --wd {label}')
|
|
||||||
|
|
||||||
r = damask.Result('/'.join([label,'2x2x2_tensionX.hdf5']))
|
|
||||||
results[label] = [np.array([np.average(F[:,0,0]-1) for F in r.get('F').values()]),
|
|
||||||
np.array([np.average(P[:,0,0]) for P in r.get('P').values()])]
|
|
||||||
|
|
||||||
color = 'tab:blue' if label == '111' else 'tab:orange'
|
|
||||||
plt.plot(results[label][0],results[label][1],label=label+'_sim',color=color,linestyle=':')
|
|
||||||
plt.plot(reference[label][0],reference[label][1],label=label+'_exp',color=color,linestyle='-')
|
|
||||||
plt.savefig('Takeuchi1975_Fig3b.pdf')
|
|
Loading…
Reference in New Issue