← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2665: update scripts for the WireMatPM

 

------------------------------------------------------------
revno: 2665
committer: Klaus Thoeni <klaus.thoeni@xxxxxxxxx>
branch nick: yade
timestamp: Thu 2011-01-20 14:45:32 +1100
message:
  update scripts for the WireMatPM
renamed:
  scripts/test/WIreMatPM/ => scripts/test/WireMatPM/
modified:
  scripts/test/WireMatPM/net-2part-displ-unloading.py
  scripts/test/WireMatPM/net-2part-displ.py
  scripts/test/WireMatPM/net-2part-strain.py


--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== renamed directory 'scripts/test/WIreMatPM' => 'scripts/test/WireMatPM'
=== modified file 'scripts/test/WireMatPM/net-2part-displ-unloading.py'
--- scripts/test/WIreMatPM/net-2part-displ-unloading.py	2010-12-10 02:42:10 +0000
+++ scripts/test/WireMatPM/net-2part-displ-unloading.py	2011-01-20 03:45:32 +0000
@@ -53,12 +53,12 @@
 def addPlotData():
 	if O.iter < 1:
 		plot.addData( Fn=0., un=0. )
-		plot.saveGnuplot('net-2part-displ-unloading')
+		#plot.saveGnuplot('net-2part-displ-unloading')
 	else:
 		try:
 			i=O.interactions[FixedSphere.id,MovingSphere.id]
 			plot.addData( Fn=i.phys.normalForce.norm(), un=(O.bodies[1].state.pos[1]-O.bodies[0].state.pos[1])-a )
-			plot.saveGnuplot('net-2part-displ-unloading')
+			#plot.saveGnuplot('net-2part-displ-unloading')
 		except:
 			print "No interaction!"
 			O.pause()
@@ -74,13 +74,14 @@
 	[Ip2_WireMat_WireMat_WirePhys(linkThresholdIteration=1,label='interactionPhys')],
 	[Law2_ScGeom_WirePhys_WirePM(linkThresholdIteration=1,label='interactionLaw')]
 	),
+	NewtonIntegrator(damping=0.),
 	PyRunner(initRun=True,iterPeriod=1,command='addPlotData()')
 ]
 
 
 #### plot some results
 plot.plots={'un':('Fn',)}
-plot.plot()
+plot.plot(noShow=False, subPlots=False)
 
 
 #### create link (no time step needed since loading is involved in this step)

=== modified file 'scripts/test/WireMatPM/net-2part-displ.py'
--- scripts/test/WIreMatPM/net-2part-displ.py	2010-12-10 02:42:10 +0000
+++ scripts/test/WireMatPM/net-2part-displ.py	2011-01-20 03:45:32 +0000
@@ -35,7 +35,7 @@
 
 
 #### create boddies, default: dynamic=True
-O.bodies.append( utils.sphere([0,0,0], radius, wire=False, color=[1,0,0], highlight=False, material=netMat) )
+O.bodies.append( utils.sphere([0,0,0], radius, wire=False, color=[1,0,0], highlight=False, material=netMat, fixed=True) )
 O.bodies.append( utils.sphere([0,a,0], radius, wire=False, color=[0,1,0], highlight=False, material=netMat) )
 
 FixedSphere=O.bodies[0]
@@ -49,18 +49,18 @@
 def addPlotData():
 	if O.iter < 1:
 		plot.addData( Fn=0., un=0. )
-		plot.saveGnuplot('net-2part-displ')
+		#plot.saveGnuplot('net-2part-displ')
 	else:
 		try:
 			i=O.interactions[FixedSphere.id,MovingSphere.id]
 			plot.addData( Fn=i.phys.normalForce.norm(), un=(O.bodies[1].state.pos[1]-O.bodies[0].state.pos[1])-a )
-			plot.saveGnuplot('net-2part-displ')
+			#plot.saveGnuplot('net-2part-displ')
 		except:
 			print "No interaction!"
 			O.pause()
 
 
-#### define simulation to create cohesive link
+#### define simulation to create link
 interactionRadius=2.
 O.engines = [
 	ForceResetter(),
@@ -71,17 +71,18 @@
 	[Ip2_WireMat_WireMat_WirePhys(linkThresholdIteration=1,label='interactionPhys')],
 	[Law2_ScGeom_WirePhys_WirePM(linkThresholdIteration=1,label='interactionLaw')]
 	),
+	NewtonIntegrator(damping=0.),
 	PyRunner(initRun=True,iterPeriod=1,command='addPlotData()')
 ]
 
 
 #### plot some results
 plot.plots={'un':('Fn',)}
-plot.plot()
+plot.plot(noShow=False, subPlots=False)
 
 
 #### create link (no time step needed since loading is involved in this step)
-O.step() # create cohesive link (cohesiveTresholdIteration=1)
+O.step() # create link (cohesiveTresholdIteration=1)
 
 
 #### initializes now the interaction detection factor

=== modified file 'scripts/test/WireMatPM/net-2part-strain.py'
--- scripts/test/WIreMatPM/net-2part-strain.py	2010-12-10 02:42:10 +0000
+++ scripts/test/WireMatPM/net-2part-strain.py	2011-01-20 03:45:32 +0000
@@ -58,7 +58,7 @@
 setSpeeds = True
 
 
-#### define simulation to create cohesive link
+#### define simulation to create link
 interactionRadius=2.
 O.engines = [
 	ForceResetter(),
@@ -69,6 +69,7 @@
 	[Ip2_WireMat_WireMat_WirePhys(linkThresholdIteration=1,label='interactionPhys')],
 	[Law2_ScGeom_WirePhys_WirePM(linkThresholdIteration=1,label='interactionLaw')]
 	),
+	NewtonIntegrator(damping=0.)
 ]
 
 
@@ -90,20 +91,20 @@
 from yade import plot
 
 plot.plots={'un':('Fn',)}
-plot.plot()
+plot.plot(noShow=False, subPlots=False)
 
 def addPlotData():
 	try:
 		i=O.interactions[FixedSphere.id,MovingSphere.id]
 		plot.addData( Fn=i.phys.normalForce.norm(), un=(O.bodies[1].state.pos[1]-O.bodies[0].state.pos[1])-a )
-		plot.saveGnuplot('net-2part-strain')
+		#plot.saveGnuplot('net-2part-strain')
 	except:
 		print "No interaction!"
 		O.pause()
 
 
 #### define simulation
-O.engines += [UniaxialStrainer(strainRate=strainRateTension,axis=axis,asymmetry=1,posIds=posIds,negIds=negIds,crossSectionArea=crossSectionArea,blockDisplacements=True,blockRotations=True,setSpeeds=setSpeeds,label='strainer')] + [NewtonIntegrator(damping=0.0)] + [PyRunner(initRun=True,iterPeriod=1,command='addPlotData()')]
+O.engines += [UniaxialStrainer(strainRate=strainRateTension,axis=axis,asymmetry=1,posIds=posIds,negIds=negIds,crossSectionArea=crossSectionArea,blockDisplacements=True,blockRotations=True,setSpeeds=setSpeeds,label='strainer')] + [PyRunner(initRun=True,iterPeriod=1,command='addPlotData()')]
 
 
 #### to see it