Beispiel #1
0
    def thickConstHard(self, width, tau, nmax=10000):
        tb = [
            Dislocation(width / 2., 0.0, 0.0, self.b, False),
            Dislocation(-width / 2., 0.0, np.pi, self.b, False)
        ]
        tbsim = Simulation(tb, self.isomatprops, tau=tau, vertsym=True)

        jprev = 0
        for j in xrange(jprev, nmax):
            ycur = self.h * (j + 1)
            tbsim.adddislo(Dislocation(width / 2, ycur, 0.0, self.b))
            tbsim.adddislo(Dislocation(-width / 2, ycur, np.pi, self.b))
            sigxx, sigzz, sigxz = tbsim.calc_stresses_point(0.0, ycur)
            if sigxz < 0.0:
                break
        return 2.0 * ycur
Beispiel #2
0
    maxstressplot = 150.0  ##
    yplot = 100.0e-3
    plotdim = [-1 * gbwidth / 2. - 0.1, 1 * gbwidth / 2. + 0.1, -yplot, yplot]
    plotres = 200
    disloscale = 2.0

    #make destination, copy source file to destination
    if not os.path.exists(destfolder):
        os.makedirs(destfolder)
    srcscript = os.path.basename(__file__)
    shutil.copy(srcscript, destfolder + srcscript)
    logfile = open(destfolder + 'logfile.txt', 'w')

    #make initial twin, set up
    tb = [
        Dislocation(gbwidth / 2., 0.0, 0.0, b, 'gb'),
        Dislocation(-gbwidth / 2., 0.0, pi, b, 'gb')
    ]
    sim = Simulation(tb,
                     mgProps,
                     tau=tauexternal,
                     rwall=gbwidth / 2.,
                     lwall=-gbwidth / 2.,
                     rang=rang,
                     lang=lang,
                     tauxfer=tauxfer,
                     dxxfer=dxxfer)

    #run simulation
    for i in xrange(ndisloiter):
        if i > nstepsusingdxmin:
Beispiel #3
0
destfolder = 'runs/1um/tau50-cg5/'  ##
maxstressplot = 150.0  ##
yplot = 20.0e-3
plotdim = [-gbwidth / 2. - 0.1, gbwidth / 2. + 0.1, -yplot, yplot]
plotres = 200
disloscale = 2.0

#make destination, copy source file to destination
if not os.path.exists(destfolder):
    os.makedirs(destfolder)
srcscript = os.path.basename(__file__)
shutil.copy(srcscript, destfolder + srcscript)
logfile = open(destfolder + 'logfile.txt', 'w')

#make initial twin, set up, quarter symmetry
tb = [Dislocation(gbwidth / 2., 0.0, 0.0, b, 'gb')]
sim = Simulation(tb,
                 mgProps,
                 tau=tauexternal,
                 vertsym=True,
                 horsym=True,
                 rwall=gbwidth / 2.,
                 lwall=None)

#run simulation
for i in xrange(ndisloiter):
    if i > nstepsusingdxmin:
        dxmin = False
    xpos, converged = sim.xinsertpos(dx0=dxinit,
                                     dxfactor=dxfactor,
                                     dxmin=dxmin)