Beispiel #1
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 woo 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()
Beispiel #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 woo 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()
Beispiel #3
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()
    strainer.strainRate = abs(
        strainRateTension
    ) if mode == 'tension' else -abs(strainRateCompression)
    try:
        from woo 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
    if not scGeom: ss2d3dg.distFactor = -1.
    else: ss2sc.interactionDetectionFactor = 1.
    is2aabb.aabbEnlargeFactor = -1.

    O.run()
Beispiel #4
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()
	strainer.strainRate=abs(strainRateTension) if mode=='tension' else -abs(strainRateCompression)
	try:
		from woo 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
	if not scGeom: ss2d3dg.distFactor=-1.
	else: ss2sc.interactionDetectionFactor=1.
	is2aabb.aabbEnlargeFactor=-1.

	O.run()