j: Next unread message
k: Previous unread message
j a: Jump to all threads
j l: Jump to MailingList overview
On 06/06/2016 03:27 PM, Patricia Garcia Cañadilla wrote:
I have a 2D body of hyperelastic material which contracts and I would like to compute the total force developed by the body from the cauchy stress. I am trying to follow some of your indications I found in this group, but I still couldn't make it works. Could you please help me to fix the problem? I am getting the following error:
key = (region.name, integral.order, integration) AttributeError: 'dict' object has no attribute 'name'
I am trying to do the following, inside stress_strain post-processing function:
def stress_strain(out, problem, state, extend = False ): from sfepy.base.base import Struct from sfepy.mechanics.tensors import StressTransform from sfepy.mechanics.tensors import transform_data from sfepy.discrete.common.mappings import get_normals
ev = problem.evaluate field = problem.fields['displacement'] region = problem.domain.regions['Gamma'] integral = problem.integrals['i2'] n = get_normals(field,integral,regions)
Here you probably meant using 'region' instead of 'regions', right? regions are the dict in the module name space of the problem description file, so the error is pretty easily overlooked :)
If that does not help, try sending a complete file that reproduces the problem.