Пример #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
Пример #2
0
    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:
            dxmin = False

        #positive z dislocation dipole
        xneg, xpos, converged = sim.xinsertnegpos(dx0=dxinit,
                                                  dxfactor=dxfactor,
                                                  dxmin=dxmin,
                                                  poszonly=True,
Пример #3
0
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)
    if converged:  #try smaller increment
        xpos, converged = sim.xinsertpos(dx0=dxinit,
                                         dxfactor=dxfactor2,
                                         dxmin=dxmin)
    #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)

    sim = Simulation.load('/runs/1um/tau50-taucrit100-xfer-cg-0/zlog22.p')
    sim.reset()

    #run simulation
    for i in xrange(22, ndisloiter):
        if i > nstepsusingdxmin:
            dxmin = False

        #positive z dislocation dipole
        xneg, xpos, converged = sim.xinsertnegpos(dx0=dxinit,
                                                  dxfactor=dxfactor,
                                                  dxmin=dxmin,
                                                  poszonly=True,
                                                  dxmax=0.05,
                                                  xmid=xmidpos)
        if converged:  #try smaller increment