← Back to team overview

yade-users team mailing list archive

Re: [Question #670852]: remote interaction, net&wire mats attribution by sphere's material

 

Question #670852 on Yade changed:
https://answers.launchpad.net/yade/+question/670852

    Status: Needs information => Open

Ali Rafiee gave more information on the question:
Hello Jan,

in below simple example you can see my question in the model.
I tried to have all of possible cases.

I created my interactions before O.engines by createInteraction command,
and I suppose this command works for this type of interaction creation.

thanks a lot
Ali


=====================================
# -*- coding: utf-8 -*-

from yade import plot, qt

tolerance=0.01
errors=0

#### define parameters for the net
# wire diameter
d = 2.7/1000.
# particle radius
radius = d*4.
# define piecewise lineare stress-strain curve
strainStressValues=[(0.0019230769,2.5e8),(0.0192,3.2195e8),(0.05,3.8292e8),(0.15,5.1219e8),(0.25,5.5854e8),(0.3,5.6585e8),(0.35,5.6585e8)]
# elastic material properties
particleVolume = 4./3.*pow(radius,3)*pi
particleMass = 3.9/1000.
density = particleMass/particleVolume
young = strainStressValues[0][1] / strainStressValues[0][0]
poisson = 0.3


#### material definition
netMat = O.materials.append( WireMat( young=young,poisson=poisson,frictionAngle=radians(30),density=density,isDoubleTwist=True,diameter=d,strainStressValues=strainStressValues,lambdaEps=0.4,lambdak=0.66) )

wireMat = O.materials.append( WireMat(
young=young,poisson=poisson,frictionAngle=radians(30),density=density,isDoubleTwist=False,diameter=3.4/1000,strainStressValues=strainStressValues
) )


#### get net 
s1=O.bodies.append(sphere([-0.04,0.075,0],radius=0.01,wire=False,highlight=False,fixed=False, color=[0,1,0],material=netMat))
s2=O.bodies.append(sphere([-0.04,0.025,0],radius=0.01,wire=False,highlight=False,fixed=False, color=[0,1,0],material=netMat))
s3=O.bodies.append(sphere([0.04,0.075,0],radius=0.01,wire=False,highlight=False,fixed=False, color=[0,1,0],material=netMat))
s4=O.bodies.append(sphere([0.04,0.025,0],radius=0.01,wire=False,highlight=False,fixed=False, color=[0,1,0],material=netMat))
s5=O.bodies.append(sphere([0,0.15,0],radius=0.01,wire=False,highlight=False,fixed=True, color=[1,0,0],material=wireMat))
s6=O.bodies.append(sphere([0,0.1,0],radius=0.01,wire=False,highlight=False,fixed=False, color=[0,0,1],material=wireMat))
s7=O.bodies.append(sphere([0,0,0],radius=0.01,wire=False,highlight=False,fixed=False, color=[0,0,1],material=wireMat))
s8=O.bodies.append(sphere([0,-0.05,0],radius=0.01,wire=False,highlight=False,fixed=False, color=[1,0,0],material=wireMat))
createInteraction( s3,s6 )
createInteraction( s1,s6 )
createInteraction( s2,s1 )
createInteraction( s7,s2 )
createInteraction( s7,s4 )
createInteraction( s4,s3 )
createInteraction( s6,s5 )
createInteraction( s8,s7 )
##############################

v = qt.Controller()
v = qt.View()
rr = qt.Renderer()
rr.intrAllWire = True

==========================================================

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.