How to select the BCs in the uniax example

Asked by Mahmoud Ashour

Hello,

I know that in the uniax example he applied strain on both side of the specimen. My question is how he selected both faces of the specimen? If I have another geometry with other dimensions, how could i select the faces to apple the strain?

Best regards,

Mahmoud

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello,

> the uniax example

please be specific.
For the rest, I assume it is [1]

> how he selected both faces of the specimen?

using uniaxialTestFeatures function [2,3]

> If I have another geometry with other dimensions

again, please be specific

> how could i select the faces to apple the strain?

I see two main options:
- using uniaxialTestFeatures
- your custom condition (e.g. z coordinate > some limit)

Cheers
Jan

[1] https://gitlab.com/yade-dev/trunk/-/blob/master/examples/concrete/uniax.py
[2] https://gitlab.com/yade-dev/trunk/-/blob/master/examples/concrete/uniax.py#L83
[3] https://yade-dem.org/doc/yade.utils.html#yade.utils.uniaxialTestFeatures

Revision history for this message
Mahmoud Ashour (mahmoud-94) said :
#2

Hello,
 thanks for your response. it is actually one question. I mean in the concrete uniax example. I can't understand the following code when he selected the specimen faces

bb=uniaxialTestFeatures()
negIds,posIds,axis,crossSectionArea=bb['negIds'],bb['posIds'],bb['axis'],bb['area']

mm,mx=[pt[axis] for pt in aabbExtrema()]
coord_25,coord_50,coord_75=mm+.25*(mx-mm),mm+.5*(mx-mm),mm+.75*(mx-mm)
area_25,area_50,area_75=approxSectionArea(coord_25,axis),approxSectionArea(coord_50,axis),approxSectionArea(coord_75,axis)

can you explain how to use uniaxialTestFeatures with an more simple example if it is possible?

Best regards,
Mahmoud

Revision history for this message
Jan Stránský (honzik) said :
#3

> I can't understand the following code

please be more specific, what you do not understand, what is not clear, ...
Also, you ask help concerning "faces", but most of the code concerns cross section area..

> can you explain how to use uniaxialTestFeatures with an more simple example if it is possible?

no, nothing simpler than
###
bb=uniaxialTestFeatures()
negIds,posIds=bb['negIds'],bb['posIds']
###
is possible.

"bb" is the result of uniaxialTestFeatures, so it is a dictionary of computed features [3].
Then you extract "negIds" and "posIds" values as the "faces" and store them in negIds and posIds variables

You can make it more verbose (and perhaps more clear) as:
###
bb = uniaxialTestFeatures()
negIds = bb['negIds']
posIds = bb['posIds']
###

Once more, note, that you can define the "face" particles (negIds, posIds) completely yourself, without uniaxialTestFeatures, based on your own condition

Also, you can experiment a bit yourself, e.g.
###
# create your packing
features = uniaxialTestFeatures()
negIds,posIds=features['negIds'],features['posIds']
for b in O.bodies: b.shape.color = (0,0,1)
for id in negIds: O.bodies[id].shape.color = (1,0,0)
for id in posIds: O.bodies[id].shape.color = (0,1,0)
# 3D view
###

Cheers
Jan

Can you help with this problem?

Provide an answer of your own, or ask Mahmoud Ashour for more information if necessary.

To post a message you must log in.