Exemple #1
0
def initTest():
    global mode
    print "init"
    if O.iter > 0:
        O.wait()
        O.loadTmp('initial')
        print "Reversing plot data"
        plot.reverseData()
    else:
        plot.plot(subPlots=False)
    strainer.strainRate = abs(
        strainRateTension
    ) if mode == 'tension' else -abs(strainRateCompression)
    try:
        from yade import qt
        renderer = qt.Renderer()
        renderer.dispScale = (1000, 1000,
                              1000) if mode == 'tension' else (100, 100, 100)
    except ImportError:
        pass
    print "init done, will now run."
    O.step()
    # to create initial contacts
    # now reset the interaction radius and go ahead
    ss2sc.interactionDetectionFactor = 1.
    is2aabb.aabbEnlargeFactor = 1.

    O.run()
Exemple #2
0
def initTest():
	global mode
	print "init"
	if O.iter>0:
		O.wait();
		O.loadTmp('initial')
		print "Reversing plot data"; plot.reverseData()
	maxStrainRate=Vector3(1,1,1);
	goal=Vector3(1,1,1);
	if not biaxial: # uniaxial
		maxStrainRate[axis]=abs(strainRateTension) if mode=='tension' else abs(strainRateCompression)
		maxStrainRate[ax1]=maxStrainRate[ax2]=1000*maxStrainRate[axis]
		goal[axis]=1 if mode=='tension' else -1;
	else:
		maxStrainRate[axis]=abs(strainRateTension) if mode=='tension' else abs(strainRateCompression)
		maxStrainRate[ax1]=maxStrainRate[axis]
		maxStrainRate[ax2]=1000*maxStrainRate[axis]
		goal[axis]=1 if mode=='tension' else -1;
		goal[ax1]=goal[axis]
	strainer.maxStrainRate=maxStrainRate
	strainer.goal=goal
	try:
		from yade import qt
		renderer=qt.Renderer()
		renderer.scaleDisplacements=True
		renderer.displacementScale=(1000,1000,1000) if mode=='tension' else (100,100,100)
	except ImportError: pass
	print "init done, will now run."
	O.step(); O.step(); # to create initial contacts
	# now reset the interaction radius and go ahead
	ss2d3dg.interactionDetectionFactor=-1.
	is2aabb.aabbEnlargeFactor=-1.
	O.run()
Exemple #3
0
def initTest(mode):
    print "init"
    O.loadTmp('initial')
    if mode == "compression":
        print "Reversing plot data"
        plot.reverseData()
    strainer.strainRate = abs(
        strainRateTension
    ) if mode == 'tension' else -abs(strainRateCompression)
    O.step()
    ss2sc.interactionDetectionFactor = 1.
    is2aabb.aabbEnlargeFactor = 1.
Exemple #4
0
def initTest():
    global mode
    print "init"
    if O.iter > 0:
        O.wait()
        O.loadTmp('initial')
        print "Reversing plot data"
        plot.reverseData()
    maxStrainRate = Vector3(1, 1, 1)
    goal = Vector3(1, 1, 1)
    if not biaxial:  # uniaxial
        maxStrainRate[axis] = abs(
            strainRateTension) if mode == 'tension' else abs(
                strainRateCompression)
        maxStrainRate[ax1] = maxStrainRate[ax2] = 1000 * maxStrainRate[axis]
        goal[axis] = 1 if mode == 'tension' else -1
    else:
        maxStrainRate[axis] = abs(
            strainRateTension) if mode == 'tension' else abs(
                strainRateCompression)
        maxStrainRate[ax1] = maxStrainRate[axis]
        maxStrainRate[ax2] = 1000 * maxStrainRate[axis]
        goal[axis] = 1 if mode == 'tension' else -1
        goal[ax1] = goal[axis]
    strainer.maxStrainRate = maxStrainRate
    strainer.goal = goal
    try:
        from yade import qt
        renderer = qt.Renderer()
        renderer.scaleDisplacements = True
        renderer.displacementScale = (1000, 1000,
                                      1000) if mode == 'tension' else (100,
                                                                       100,
                                                                       100)
    except ImportError:
        pass
    print "init done, will now run."
    O.step()
    O.step()
    # to create initial contacts
    # now reset the interaction radius and go ahead
    ss2d3dg.distFactor = -1.
    is2aabb.aabbEnlargeFactor = -1.
    O.run()
Exemple #5
0
def initTest():
	global mode
	print "init"
	if O.iter>0:
		O.wait();
		O.loadTmp('initial')
		print "Reversing plot data"; plot.reverseData()
	else: plot.plot(subPlots=False)
	strainer.strainRate=abs(strainRateTension) if mode=='tension' else -abs(strainRateCompression)
	try:
		from yade import qt
		renderer=qt.Renderer()
		renderer.dispScale=(1000,1000,1000) if mode=='tension' else (100,100,100)
	except ImportError: pass
	print "init done, will now run."
	O.step(); # to create initial contacts
	# now reset the interaction radius and go ahead
	ss2sc.interactionDetectionFactor=1.
	is2aabb.aabbEnlargeFactor=1.

	O.run()
Exemple #6
0
def initTest(mode):
    print "init"
    O.loadTmp('initial')
    if mode == "compression":
        print "Reversing plot data"
        plot.reverseData()
    strainer.strainRate = abs(
        strainRateTension
    ) if mode == 'tension' else -abs(strainRateCompression)
    spfile = "/tmp/heterogeom_{}_{:03d}_{}.sp".format(experiment, gradingCurve,
                                                      hGeomIndex)
    heterogenize(specimenSize, spfile, physCoeffs)
    ss2sc.interactionDetectionFactor = 1.
    is2aabb.aabbEnlargeFactor = 1.
    if mode == 'tension':
        vtkExport()
    if 0:
        print set(i.phys.epsCrackOnset for i in O.interactions)
        print set(i.phys.epsFracture for i in O.interactions)
        print set(i.phys.epsCrackOnset for i in O.interactions)
        print set(i.phys.undamagedCohesion for i in O.interactions)
        print set(i.phys.E for i in O.interactions)
        print set(i.phys.G for i in O.interactions)