|
Mechanics of Defect Evolution Library
|
Functions | |
| plotMobility (m, mat, singleCrystal, slipSystem, ax1, ax2) | |
| selectMobility (materialFile, Temps, slipSystemID, theta_deg, phi_deg) | |
| plotGammaSurface (mat, gammaSurface, lab, pts, nc, nR, C) | |
Variables | |
| int | slipSystemID = 0 |
| main | |
| Temps = np.array([100,300,1000]) | |
| float | phi_deg = 0.0 |
| int | theta_deg = 45 |
| materialFile = str(file) | |
| Main. | |
| Tm = getValueInFile(materialFile,"Tm") | |
| materialName = getStringInFile(materialFile,"materialName") | |
| float | absoluteTemperature = 0.0 |
| mat = pyMoDELib.PolycrystallineMaterialBase(materialFile,absoluteTemperature) | |
| energyDensityScaling = mat.mu_SI*mat.b_SI | |
| C2G = np.array([[1,0,0],[0,1,0],[0,0,1]]) | |
| singleCrystal = pyMoDELib.SingleCrystalBase(mat,C2G) | |
| int | nR = 4 |
| int | pts = 50 |
| int | nc = 100 |
| C | |
| XiYi = np.random.rand(6, 2) | |
| dX = np.max(XiYi[:,0])-np.min(XiYi[:,0]) | |
| extrapolation = pyMoDELib.ExtrapolationMethod(2,1.1*dX) | |
| lagrangeInterp = pyMoDELib.LagrangeInterpolant(XiYi,extrapolation) | |
| linearInterp = pyMoDELib.LinearInterpolant(XiYi,extrapolation) | |
| X = np.linspace(np.min(XiYi[:,0])-2, np.max(XiYi[:,0])+2, num=10000, endpoint=True) | |
| Y1 = np.zeros(len(X)) | |
| Y2 = np.zeros(len(X)) | |
| fig1 = plt.figure() | |
| ax1 = plt.subplot(1,1,1) | |
| label | |
| linestyle | |
| bool | compute = True |
| periodicImageMatrix = np.array([[0,0,0],[1,1,1],[2,2,2],[4,4,4]]) | |
| int | EwaldLengthDivisions = 2 |
| curDir = os.getcwd() | |
| microstrucureFile = getStringInFile('inputFiles/initialMicrostructure.txt','microstructureFile') | |
| str | microstrucureFileName = curDir+'/inputFiles/'+microstrucureFile |
| str | ddFileName = curDir+'/inputFiles/DD.txt' |
| periodicImageSize = periodicImageMatrix[k] | |
| EwaldLengthFactors = np.linspace(0.0, 1.0, num=EwaldLengthDivisions) | |
| EwaldLengthFactor = EwaldLengthFactors[c]; | |
| float | E = X*0.0; |
| float | S11 = X*0.0; |
| float | S12 = X*0.0; |
| float | S13 = X*0.0; |
| float | S22 = X*0.0; |
| float | S23 = X*0.0; |
| float | S33 = X*0.0; |
| x = X[k] | |
| F | |
| Flabels | |
| aux = readAUXtxt('config/ddAux_0') | |
| data = np.empty([np.size(X),8]) | |
| str | outFileName = 'data'+'_'+str(periodicImageSize[0])+'_'+str(periodicImageSize[1])+'_'+str(periodicImageSize[2])+'_'+str(EwaldLengthFactor)+'.txt' |
| dataDict = dict() | |
| Load data into dictionary for plotting. | |
| str | key = str(periodicImageSize[0])+'_'+str(periodicImageSize[1])+'_'+str(periodicImageSize[2])+'_'+str(EwaldLengthFactor) |
| str | FileName = 'data_'+key+'.txt' |
| list | fields = ['energy','sigma11','sigma22','sigma33','sigma23','sigma13','sigma12'] |
| list | fieldLabels = ['elastic energy $[\mu b^3]$','$\sigma_{11}$ $[\mu]$','$\sigma_{22}$ $[\mu]$','$\sigma_{33}$ $[\mu]$','$\sigma_{23}$ $[\mu]$','$\sigma_{13}$ $[\mu]$','$\sigma_{12}$ $[\mu]$'] |
| bbox_inches | |
| periodicImageCases = np.array([[4,4,4,2]]) | |
| list | folders = ['config','F','inputFiles'] |
| Preparing input files. | |
| str | DDfile = 'DD.txt' |
| str | DDfileTemplate = '../../Library/DislocationDynamics/'+DDfile |
| str | materialFileTemplate = '../../Library/Materials/'+materialFile; |
| b_SI = getValueInFile('inputFiles/'+materialFile,'b_SI') | |
| str | meshFile = 'unitCube24.msh'; |
| str | meshFileTemplate = '../../Library/Meshes/'+meshFile; |
| pf = PolyCrystalFile(materialFile); | |
| alignToSlipSystem0 | |
| boxScaling | |
| periodicFaceIDs | |
| simulationDir = os.path.abspath(".") | |
| Iterate over configurations and run one step. | |
| str | fFile = "F/F_0.txt" |
| str | fLabes = "F/F_labels.txt" |
| ddBase = pyMoDELib.DefectiveCrystalBase(simulationDir) | |
| mesh = ddBase.mesh | |
| xMax = mesh.xMax() | |
| xMin = mesh.xMin() | |
| xCenter = mesh.xCenter() | |
| defectiveCrystal = pyMoDELib.DefectiveCrystal(ddBase) | |
| spec = pyMoDELib.PeriodicDipoleIndividualSpecification() | |
| slipSystemIDs | |
| exitFaceIDs | |
| dipoleCenters | |
| dipoleHeights | |
| nodesPerLine | |
| int | j = 0 |
| glideSteps | |
| microstructureGenerator = pyMoDELib.MicrostructureGenerator(ddBase) | |
| P0 = np.array([0.0,0.0,0.0]) | |
| P1 = np.array([1.0,0.0,0.0]) | |
| b = np.array([1.0,0.0,0.0]) | |
| ss = pyMoDELib.StressStraight(mat,P0,P1,b,0.0) | |
| start_time = time.perf_counter() | |
| sigma = ss.stress(x) | |
| end_time = time.perf_counter() | |
| execution_time = end_time - start_time | |
| test.plotGammaSurface | ( | mat, | |
| gammaSurface, | |||
| lab, | |||
| pts, | |||
| nc, | |||
| nR, | |||
| C ) |
Definition at line 12 of file gammaSurface/test.py.
| test.plotMobility | ( | m, | |
| mat, | |||
| singleCrystal, | |||
| slipSystem, | |||
| ax1, | |||
| ax2 ) |
Definition at line 14 of file dislocationMobility/test.py.
| test.selectMobility | ( | materialFile, | |
| Temps, | |||
| slipSystemID, | |||
| theta_deg, | |||
| phi_deg ) |
Definition at line 38 of file dislocationMobility/test.py.
| test.absoluteTemperature = 0.0 |
Definition at line 58 of file gammaSurface/test.py.
| test.alignToSlipSystem0 |
Definition at line 66 of file periodicFields/test.py.
| test.aux = readAUXtxt('config/ddAux_0') |
Definition at line 60 of file periodicEnergy/test.py.
| test.ax1 = plt.subplot(1,1,1) |
Definition at line 39 of file interpolation1D/test.py.
| test.b = np.array([1.0,0.0,0.0]) |
Definition at line 20 of file stressStraight/test.py.
| test.b_SI = getValueInFile('inputFiles/'+materialFile,'b_SI') |
Definition at line 56 of file periodicFields/test.py.
| test.bbox_inches |
Definition at line 122 of file periodicEnergy/test.py.
| test.boxScaling |
Definition at line 67 of file periodicFields/test.py.
| test.C |
Definition at line 69 of file gammaSurface/test.py.
| test.C2G = np.array([[1,0,0],[0,1,0],[0,0,1]]) |
Definition at line 61 of file gammaSurface/test.py.
| bool test.compute = True |
Definition at line 9 of file periodicEnergy/test.py.
| test.curDir = os.getcwd() |
Definition at line 17 of file periodicEnergy/test.py.
| test.data = np.empty([np.size(X),8]) |
Definition at line 70 of file periodicEnergy/test.py.
| test.dataDict = dict() |
Load data into dictionary for plotting.
Definition at line 89 of file periodicEnergy/test.py.
| test.ddBase = pyMoDELib.DefectiveCrystalBase(simulationDir) |
Definition at line 87 of file periodicFields/test.py.
| str test.DDfile = 'DD.txt' |
Definition at line 24 of file periodicFields/test.py.
| str test.ddFileName = curDir+'/inputFiles/DD.txt' |
Definition at line 20 of file periodicEnergy/test.py.
| str test.DDfileTemplate = '../../Library/DislocationDynamics/'+DDfile |
Definition at line 25 of file periodicFields/test.py.
| test.defectiveCrystal = pyMoDELib.DefectiveCrystal(ddBase) |
Definition at line 93 of file periodicFields/test.py.
| test.dipoleCenters |
Definition at line 100 of file periodicFields/test.py.
| test.dipoleHeights |
Definition at line 101 of file periodicFields/test.py.
Definition at line 22 of file interpolation1D/test.py.
| test.E = X*0.0; |
Definition at line 44 of file periodicEnergy/test.py.
| test.end_time = time.perf_counter() |
Definition at line 26 of file stressStraight/test.py.
| test.energyDensityScaling = mat.mu_SI*mat.b_SI |
Definition at line 60 of file gammaSurface/test.py.
| int test.EwaldLengthDivisions = 2 |
Definition at line 11 of file periodicEnergy/test.py.
| test.EwaldLengthFactor = EwaldLengthFactors[c]; |
Definition at line 34 of file periodicEnergy/test.py.
| test.EwaldLengthFactors = np.linspace(0.0, 1.0, num=EwaldLengthDivisions) |
Definition at line 27 of file periodicEnergy/test.py.
| test.execution_time = end_time - start_time |
Definition at line 27 of file stressStraight/test.py.
| test.exitFaceIDs |
Definition at line 99 of file periodicFields/test.py.
| test.extrapolation = pyMoDELib.ExtrapolationMethod(2,1.1*dX) |
Definition at line 24 of file interpolation1D/test.py.
| test.F |
Definition at line 58 of file periodicEnergy/test.py.
| str test.fFile = "F/F_0.txt" |
Definition at line 76 of file periodicFields/test.py.
| list test.fieldLabels = ['elastic energy $[\mu b^3]$','$\sigma_{11}$ $[\mu]$','$\sigma_{22}$ $[\mu]$','$\sigma_{33}$ $[\mu]$','$\sigma_{23}$ $[\mu]$','$\sigma_{13}$ $[\mu]$','$\sigma_{12}$ $[\mu]$'] |
Definition at line 110 of file periodicEnergy/test.py.
| list test.fields = ['energy','sigma11','sigma22','sigma33','sigma23','sigma13','sigma12'] |
Definition at line 109 of file periodicEnergy/test.py.
| test.fig1 = plt.figure() |
Definition at line 38 of file interpolation1D/test.py.
| str test.FileName = 'data_'+key+'.txt' |
Definition at line 103 of file periodicEnergy/test.py.
| test.Flabels |
Definition at line 58 of file periodicEnergy/test.py.
| str test.fLabes = "F/F_labels.txt" |
Definition at line 79 of file periodicFields/test.py.
| list test.folders = ['config','F','inputFiles'] |
Preparing input files.
Definition at line 18 of file periodicFields/test.py.
| test.glideSteps |
Definition at line 114 of file periodicFields/test.py.
| int test.j = 0 |
Definition at line 111 of file periodicFields/test.py.
| str test.key = str(periodicImageSize[0])+'_'+str(periodicImageSize[1])+'_'+str(periodicImageSize[2])+'_'+str(EwaldLengthFactor) |
Definition at line 101 of file periodicEnergy/test.py.
| test.label |
Definition at line 42 of file interpolation1D/test.py.
| test.lagrangeInterp = pyMoDELib.LagrangeInterpolant(XiYi,extrapolation) |
Definition at line 25 of file interpolation1D/test.py.
| test.linearInterp = pyMoDELib.LinearInterpolant(XiYi,extrapolation) |
Definition at line 26 of file interpolation1D/test.py.
| test.linestyle |
Definition at line 42 of file interpolation1D/test.py.
| test.mat = pyMoDELib.PolycrystallineMaterialBase(materialFile,absoluteTemperature) |
Definition at line 59 of file gammaSurface/test.py.
| str test.materialFile = str(file) |
| str test.materialFileTemplate = '../../Library/Materials/'+materialFile; |
Definition at line 51 of file periodicFields/test.py.
| test.materialName = getStringInFile(materialFile,"materialName") |
Definition at line 74 of file dislocationMobility/test.py.
| test.mesh = ddBase.mesh |
Definition at line 88 of file periodicFields/test.py.
| test.meshFile = 'unitCube24.msh'; |
Definition at line 59 of file periodicFields/test.py.
| str test.meshFileTemplate = '../../Library/Meshes/'+meshFile; |
Definition at line 60 of file periodicFields/test.py.
| test.microstructureGenerator = pyMoDELib.MicrostructureGenerator(ddBase) |
Definition at line 116 of file periodicFields/test.py.
| test.microstrucureFile = getStringInFile('inputFiles/initialMicrostructure.txt','microstructureFile') |
Definition at line 18 of file periodicEnergy/test.py.
| str test.microstrucureFileName = curDir+'/inputFiles/'+microstrucureFile |
Definition at line 19 of file periodicEnergy/test.py.
| int test.nc = 100 |
Definition at line 67 of file gammaSurface/test.py.
| test.nodesPerLine |
Definition at line 102 of file periodicFields/test.py.
| int test.nR = 4 |
Definition at line 65 of file gammaSurface/test.py.
| str test.outFileName = 'data'+'_'+str(periodicImageSize[0])+'_'+str(periodicImageSize[1])+'_'+str(periodicImageSize[2])+'_'+str(EwaldLengthFactor)+'.txt' |
Definition at line 86 of file periodicEnergy/test.py.
| test.P0 = np.array([0.0,0.0,0.0]) |
Definition at line 18 of file stressStraight/test.py.
| test.P1 = np.array([1.0,0.0,0.0]) |
Definition at line 19 of file stressStraight/test.py.
| test.periodicFaceIDs |
Definition at line 68 of file periodicFields/test.py.
| test.periodicImageCases = np.array([[4,4,4,2]]) |
Definition at line 13 of file periodicFields/test.py.
| test.periodicImageMatrix = np.array([[0,0,0],[1,1,1],[2,2,2],[4,4,4]]) |
Definition at line 10 of file periodicEnergy/test.py.
| test.periodicImageSize = periodicImageMatrix[k] |
Definition at line 23 of file periodicEnergy/test.py.
| test.pf = PolyCrystalFile(materialFile); |
Definition at line 63 of file periodicFields/test.py.
| float test.phi_deg = 0.0 |
Definition at line 64 of file dislocationMobility/test.py.
| int test.pts = 50 |
Definition at line 66 of file gammaSurface/test.py.
| float test.S11 = X*0.0; |
Definition at line 45 of file periodicEnergy/test.py.
| float test.S12 = X*0.0; |
Definition at line 46 of file periodicEnergy/test.py.
| float test.S13 = X*0.0; |
Definition at line 47 of file periodicEnergy/test.py.
| float test.S22 = X*0.0; |
Definition at line 48 of file periodicEnergy/test.py.
| float test.S23 = X*0.0; |
Definition at line 49 of file periodicEnergy/test.py.
| float test.S33 = X*0.0; |
Definition at line 50 of file periodicEnergy/test.py.
| test.sigma = ss.stress(x) |
Definition at line 25 of file stressStraight/test.py.
| test.simulationDir = os.path.abspath(".") |
Iterate over configurations and run one step.
Definition at line 73 of file periodicFields/test.py.
Definition at line 62 of file gammaSurface/test.py.
| int test.slipSystemID = 0 |
main
Definition at line 62 of file dislocationMobility/test.py.
| test.slipSystemIDs |
Definition at line 98 of file periodicFields/test.py.
| test.spec = pyMoDELib.PeriodicDipoleIndividualSpecification() |
Definition at line 97 of file periodicFields/test.py.
Definition at line 22 of file stressStraight/test.py.
| test.start_time = time.perf_counter() |
Definition at line 23 of file stressStraight/test.py.
| test.Temps = np.array([100,300,1000]) |
Definition at line 63 of file dislocationMobility/test.py.
| int test.theta_deg = 45 |
Definition at line 65 of file dislocationMobility/test.py.
| test.Tm = getValueInFile(materialFile,"Tm") |
Definition at line 73 of file dislocationMobility/test.py.
Definition at line 28 of file interpolation1D/test.py.
Definition at line 52 of file periodicEnergy/test.py.
| test.xCenter = mesh.xCenter() |
Definition at line 91 of file periodicFields/test.py.
| test.XiYi = np.random.rand(6, 2) |
Definition at line 21 of file interpolation1D/test.py.
| test.xMax = mesh.xMax() |
Definition at line 89 of file periodicFields/test.py.
| test.xMin = mesh.xMin() |
Definition at line 90 of file periodicFields/test.py.
| test.Y1 = np.zeros(len(X)) |
Definition at line 29 of file interpolation1D/test.py.
| test.Y2 = np.zeros(len(X)) |
Definition at line 30 of file interpolation1D/test.py.