Re: [Yade-users] [Question #655521]: using TriAxialstressController obtain volume origin and size

2017-08-18 Thread Luc Scholtès
Question #655521 on Yade changed:
https://answers.launchpad.net/yade/+question/655521

Luc Scholtès posted a new comment:
Hey,

You might also use this function:

https://yade-
dem.org/doc/yade.utils.html?highlight=aabbextrema#yade._utils.aabbExtrema

Then you can get the coordinates of the min and max corners of your
simulation (it works with or without walls)

dim=utils.aabbExtrema()
xinf=dim[0][0]
xsup=dim[1][0]
yinf=dim[0][1]
ysup=dim[1][1]
...

Cheers

Luc

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #655521]: using TriAxialstressController obtain volume origin and size

2017-08-10 Thread Robert Caulk
Question #655521 on Yade changed:
https://answers.launchpad.net/yade/+question/655521

Robert Caulk posted a new comment:
Hello Jesse,

They will always be 0,1,2,3,4,5 if the are the first bodies appended to
the simulation :-).

Cheers,

Robert

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #655521]: using TriAxialstressController obtain volume origin and size

2017-08-10 Thread rhaven
Question #655521 on Yade changed:
https://answers.launchpad.net/yade/+question/655521

Status: Answered => Solved

rhaven confirmed that the question is solved:
Thanks Robert Caulk, that solved my question.

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #655521]: using TriAxialstressController obtain volume origin and size

2017-08-10 Thread rhaven
Question #655521 on Yade changed:
https://answers.launchpad.net/yade/+question/655521

rhaven posted a new comment:
Hi Robert,
thank you for your reply.
I was able to get the bottom corner of the volume using:
x = min(O.bodies[0].state.pos[0],O.bodies[1].state.pos[0])
y = min(O.bodies[2].state.pos[1],O.bodies[3].state.pos[1])
z = min(O.bodies[4].state.pos[2],O.bodies[5].state.pos[2])
in my case I know the wallIds because I generate walls in a previous step, but 
i guess ids 0,1,2,3,4,5 might not always be the walls.. 

thanks 
Jesse

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #655521]: using TriAxialstressController obtain volume origin and size

2017-08-09 Thread Robert Caulk
Question #655521 on Yade changed:
https://answers.launchpad.net/yade/+question/655521

Status: Open => Answered

Robert Caulk proposed the following answer:
Hello,

I think you are right, X/Y/Z  = width/height/depth [1]. height0 is the
reference height used for strain calculation [2].

>However, how do I get the origin or center of this volume?

So you want the center of the box defined by the locations of the
triaxial walls? The user defines the geometry and position of the walls
explicitly. In most triaxial loading conditions, the center should not
change. If for some reason you are expecting unsymmetric deformation or
specimen translation,  you can you use the position of the walls to
determine where the center is. O.bodies[1].state.pos provides access to
this information.

Cheers,

Robert

[1]https://github.com/yade/trunk/blob/e4e757f2e98a620e3177b7a36a1d10f69f6a6a28/pkg/dem/TriaxialStressController.cpp#L122
[2]https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.TriaxialStressController.height0

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #655521]: using TriAxialstressController obtain volume origin and size

2017-08-09 Thread rhaven
New question #655521 on Yade:
https://answers.launchpad.net/yade/+question/655521

Hi There,
I am using the TriAxialStressController to compress a packing of particles. 
Once the compression is complete id like to get the size and origin of the 
volume
I found compressor.width / height / depth which i believe corresponds to the 
X/Y/Z length of the volume? What is width0/height0 and depth0?

However, how do I get the origin or center of this volume? 

many thanks in advance
Jesse


Code shown below:


%%%
O.engines = [
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
   InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom_FrictPhys_CundallStrack()]
   ),
   TriaxialStressController(
  thickness = 0,
  stressMask = 7,
  internalCompaction = False,
  label = 'compressor',
   ),
   NewtonIntegrator(damping=.6),
]
factor = .5
O.dt = factor * PWaveTimeStep()


#print(compressor.height)
compressor.goal1 = compressor.goal2 = compressor.goal3 = -1e-3
#compressor.goal1 = compressor.goal2 = compressor.goal3 = -1e-5
O.run(5,True)
print compressor.goal1
print compressor.boxVolume

print('width_x: ',compressor.width)
print('height_y: ',compressor.height)
print('depth_z: ',compressor.depth)
print('width0_x: ',compressor.width0)
print('height0_y: ',compressor.height0)
print('depth0_z: ',compressor.depth0)

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp