예제 #1
0
                     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,
                                                  dxmax=0.05,
                                                  xmid=xmidpos)
        if converged:  #try smaller increment
            xneg, xpos, converged = sim.xinsertnegpos(dx0=dxinit,
                                                      dxfactor=dxfactor2,
                                                      dxmin=dxmin,
                                                      poszonly=True,
                                                      xmid=xmidpos)
            if converged:
                break
        xmidpos = (xneg + xpos) / 2.0
        sim.adddislo(Dislocation(xpos, float(i + 1) * d, 0.0, b))
        sim.adddislo(Dislocation(xneg, float(i + 1) * d, pi, b))
        sim.plotsig(plotdim,
                    disloscale=disloscale,
예제 #2
0
    Dislocation(-gbwidth / 2., 0.0, pi, b, 'gb')
]
sim = Simulation(tb,
                 mgProps,
                 tau=tauexternal,
                 rwall=gbwidth / 2.,
                 lwall=-gbwidth / 2.)

#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)
    if converged:  #try smaller increment
        xneg, xpos, converged = sim.xinsertnegpos(dx0=dxinit,
                                                  dxfactor=dxfactor2,
                                                  dxmin=dxmin,
                                                  poszonly=True)
        if converged:
            break
    sim.adddislo(Dislocation(xpos, float(i + 1) * d, 0.0, b))
    sim.adddislo(Dislocation(xneg, float(i + 1) * d, pi, b))
    sim.plotsig(plotdim,
                disloscale=disloscale,
                res=plotres,
                pmax=maxstressplot,
                fname=destfolder + 'step' + str(i + 1) + 'a.png')