← Back to team overview

yade-users team mailing list archive

Re: [Question #632670]: a problem about approxSectionArea

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
> If the sample is cube, does it use coord_100?

what does "it" mean?
If the sample is cubic, the choice of coord should not matter (as long as the coord belongs to the cube), see the example below

> Can you explain the specific meaning of (float)arg1? How can I choose
the value?

You choose the value such that it corresponds to the point where you
want to compute the cross section :-)

you can experiment with the following script
###############
from yade import pack
r=.2
sp = pack.regularHexa(pack.inAlignedBox((0,0,0),(10,10,10)),r,0) # cubic sample
sp = [s for s in sp if pow(5-s.state.pos[0],2)+pow(5-s.state.pos[1],2)<=pow(.5*10-.5*s.state.pos[2]-r,2)] # make it a cone
O.bodies.append(sp)
# -r in the <= condition assumes that the spheres are almost entirely (not only their centers) inside the cone
#
print -10, approxSectionArea(-10,2), 'should be 0'
print 20, approxSectionArea(20,2), 'should be 0'
for z in (0,2,4,6,8,10):
   print z, approxSectionArea(z,2), 'theoretically',pi*.25*pow(10-z,2)
###############

cheers
Jan

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