setting initial velocity
hi i still need your help. Sorry for the time i will take.
i'm trying to move my surface (is built by facets). i tried with translation engine but i saw that this engine gives a costant velocity for all the simulation lenght. I would like to set only the initial velocity. I try to build a function to reach this goal :
def inizio():
if O.iter < 2:
for i in range(1,27459) :
#######
i set O.iter < 2 in way to have this velocity (18 m/s) only for the first two iteractions, but even at 200 iters i still have the same velocity. I try to explain better: this surface must hit a soil and be stopped after some seconds (friction and dissipation). What happened is: the surface pass through the soil without changing his velocity. I see the soil's spheres moving due to the impact, but the surface doesn't "feel" it. I already set the contact sphere-sphere and Facet-sphere, so i think Yade is setting at each iteraction the same velocity.
IS it a problem with contacts? or is it a problem with the velocity definition?
i post my script :
#######
#######
from yade import pack, plot
from yade import export, ymport
from yade import utils
#######
#### LOAD FACETS ###
#######
def readFacet(
nums = [float(w) for w in line.split()] # convert line to 9 numbers
v1,v2,v3 = nums[0:3], nums[3:6], nums[6:9] # split them to 3 vertices
return facet((
def loadFacets(fName): # load facets from a file
with open(fName) as f:
lines = f.readlines()
return [readFacet(line) for line in lines] # convert lines to facets
#######
#### SALVA POSIZIONE FACETS ####
#######
def saveFacet(f,facet): # save one facet as 9 coordinates (3 vertices)
vs = facet.shape.
vs = [facet.state.pos + facet.state.ori*v for v in vs] # vertices in global coord system
line = " ".join(" ".join(str(e) for e in v) for v in vs)
f.write(
def saveFacets(fName): # save all facets
facets = [b for b in O.bodies if isinstance(
with open(fName,"w") as f: # save them to a file
for facet in facets:
#######
#######
#######
facets = loadFacets(
lista=O.
################
##box material#####
################
idCA=FrictMat(
O.materials.
#######
cassone = loadFacets(
O.bodies.
#######
#################
##soil material##
#################
idSoil=
O.materials.
#######
spheres = ymport.
O.bodies.
###################
###################
###################
O.engines=[
ForceResetter(),
InsertionSor
InteractionLoop(
[
[
[
),
#TranslationEn
NewtonIntegrat
PyRunner(
]
################
####funzioni####
################
def inizio():
if O.iter < 2:
for i in range(1,27459) :
O.dt=0.
O.run()
#######
#######
thanks for your time.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Jan Stránský
- Solved:
- Last query:
- Last reply: