Apply constant stress on aabb walls

Asked by Anqi H

Hi everyone,

I was trying to apply constant stress to a flat surface using setPermF and aabb walls parallel to the xz plane. However, I'm getting this error message: AttributeError: 'ForceContainer' object has no attribute 'setPermF'. Does anyone know what I am missing here?

wall = O.bodies.append(utils.aabbWalls(material=wall,thickness=0.000,color=(1,1,1)))
# delete other walls only save walls in y axis
O.bodies.erase(wall[0])
O.bodies.erase(wall[1])
O.bodies.erase(wall[4])
O.bodies.erase(wall[5])

bottom_wall = O.bodies[wall[2]]
bottom_wall.state.blockedDOFs = 'xzXYZ'
bottom_wall.state.mass = 1

upper_wall = O.bodies[wall[3]]
upper_wall.state.blockedDOFs = 'xzXYZ'
upper_wall.state.mass = 1

#set force
force = 40e6*0.02*0.02 #stress*area
O.forces.setPermF(bottom_wall.id, (0,force,0)) #bottom_wall.id
O.forces.setPermF(upper_wall.id, (0,-force,0))

Question information

Language:
English Edit question
Status:
Expired
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jérôme Duriez (jduriez) said :
#1

Hi,

Which version of YADE are you using ? (yourYadeExecutableName -v in the terminal ; and maybe your procedure to install it)

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

Please, as suggested by Jerome, next time give more info of Yade installation.

Here it seems your Yade version does not support setPrtmF yet, try
O.forces.addF(bottom_wall.id, (0,force,0), permanent=True)
instead

cheers
Jan

Revision history for this message
Anqi H (analoq) said :
#3

Thank you for your responses! I've tries setF(bottom_wall.is, (0,force,0),permanent=True) but it gave the same error msg "ForceContainer has no attribute setF". Also tried changing the blockedDOFs to 'xyzXYZ' and got the same result as well.

My yade version is 1.07.0, I installed with "sudo apt-get install yade".

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

> O.forces.addF(bottom_wall.id, (0,force,0), permanent=True)
> I've tries setF(bottom_wall.is, (0,force,0),permanent=True) but it gave the same error msg

addF, not setF

Jan

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

By the way, yade 1.07.0 is old... (its release was announced in January 2014).
Look at the right green part of https://launchpad.net/yade to see how many "release" versions we had since.

It probably means your Linux version is old as well here. You will have to update one day... (the sooner the better in my opinion)

Revision history for this message
Anqi H (analoq) said :
#6

Hi Jerome and Jan,

I have recently installed the latest version of Yade on a ubuntu 18.04 machine. The yade version is 2019-07022.git-585c6c1. However, the same code that could on the old machine seems to have a problem with the new installation. I've changed O.forces.addF(upper_wall.id, (0,-force,0), permanent = True) to O.forces.setPermF(upper_wall.id, (0,-force,0)), but the wall position doesn't change during the simulation. I've also tried to use the old code addF, other than getting the warning: method deprecated, the wall position still didn't change.

Would you know what's causing this issue? Thank you!

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

Hi,

Without a minimal working code showing the behavior, it's impossible to tell. Is your initial code (in the question text) still valid ?

Note that it is not working for us, because of your use of wall.

- wall is a YADE function [*], it's a bad idea to use if for your own variables
- furthermore, you're using both wall for a material instance and a list returned by O.bodies.append(). It may work but it requires you're 100% sure about what you're doing.

[*] https://yade-dem.org/doc/yade.utils.html?highlight=wall#yade.utils.wall

Revision history for this message
Launchpad Janitor (janitor) said :
#8

This question was expired because it remained in the 'Needs information' state without activity for the last 15 days.