Accessing Periodic Corner Volume Vectors for Porosity Calcs

Asked by Kevin Kuei

Hello,

I would like to use the utils.voxelPorosity function to calculate the porosity during shear with the periTriaxController.

I've looked at how the it's called in the voxelPorosityTriaxial function when using the TriaxialCompressionEngine (https://yade-dem.org/doc/_modules/yade/utils.html#voxelPorosityTriaxial). I would like to do something similar with constructing the start & end corner volume vectors, or better yet, if I can access those vectors directly for the periodic box.

Any suggestions for the best way to do this?

I've tried to search for in-built methods to get the corner volume vectors. However, I do not see any relevant methods for the periTriaxController engine, nor do I see any in the attributes list:

$ triax.dict()

{'dynCell': True,
 'goal': Vector3(-100000,-100000,-0.08500000000000000611),
 'stressMask': 3,
 'maxStrainRate': Vector3(1,1,0.01000000000000000021),
 'maxUnbalanced': 0.0001,
 'absStressTol': 1000.0,
 'relStressTol': 1e-05,
 'growDamping': 0.02,
 'globUpdate': 5,
 'doneHook': 'startShear()',
 'maxBodySpan': Vector3(0.3299479602263399869,0.3299479602263399869,0.3299479602263399869),
 'stressTensor': Matrix3(-99963.54100982047385,-416.9096773468117476,947.1616456979805889, -416.9059248743672583,-99926.43189555486606,1916.34198760193226, 947.1606227379483016,1916.34353571466886,-339235.7392003837158),
 'stress': Vector3(-99963.54100982047385,-99926.43189555486606,-339235.7392003837158),
 'strain': Vector3(0.0333987704360113255,0.03432776936677979507,-0.08500000000000008937),
 'strainRate': Vector3(0.001929208573328795211,0.001775921719427966819,0),
 'stiff': Vector3(0,0,0),
 'currUnbalanced': 2.9477521076913686e-06,
 'prevGrow': Vector3(0.001929208573328795211,0.001775921719427966819,0),
 'mass': 15380.193739519347,
 'externalWork': 413315.24427129014,
 'dead': False,
 'ompThreads': -1,
 'label': 'triax'}

With `O.cell`, I seem to at least be able to get the dimensions with the `size` attribute, but I feel like this is incomplete without at least one corner. There is also an `hSize` attribute, but as far as I can tell, it seems O.cell.hSize is just O.cell.trsf * O.cell.refHSize.

I think otherwise, I would need to estimate the box based on the strains and initial dimensions, or approximate it based on the min/max limits of the body centers--but wanted to check if there is an out of box solution first.

Cheers,
Kevin

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Kevin Kuei
Solved:
Last query:
Last reply:
Revision history for this message
Kevin Kuei (kckuei) said :
#1

Update: I found what I needed in the utils module. I missed this the first time around.

https://yade-dem.org/doc/yade.utils.html#yade._utils.porosity

Revision history for this message
Jérôme Duriez (jduriez) said :
#2

Regarding your initial question, you could have chosen the origin as one corner. (But just porosity() is way simpler obviously)

Revision history for this message
Kevin Kuei (kckuei) said :
#3

Hi Jerome,

Thanks for the suggestion. That makes sense. I wasn't sure at the time if the walls in the PeriTriaxController were fixed to one corner or if they moved relative to the center of the domain.

One alternative I also found was using:

porosvox=yade._utils.voxelPorosity(200,*yade._utils.aabbExtrema())

which is closer to what I wanted to do from the start. The aabbExtrema() apparently bounds the box based on the centroids of the particles.

I do get somewhat different answers between using this versus porosity() function, but will play around with it a bit more.

Cheers,
Kevin