예제 #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()
예제 #2
0
파일: periodic.py 프로젝트: CrazyHeex/woo
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()
예제 #3
0
파일: uniax.py 프로젝트: yankang84/woodem
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()
예제 #4
0
파일: uniax.py 프로젝트: Azeko2xo/woodem
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()