Dear Robert,
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)
stress = ev('dw_tl_fib_a.1.Omega(f1.fmax, f1.eps_opt, f1.s, f1.fdir,
f1.act, v, u )',mode='qp', term_mode= 'stress');
F = ev('ev_def_grad.1.Omega(u)',mode='el_avg');
transform = StressTransform(F)
Cstress = transform.get_cauchy_from_2pk(stress)
T = Cstress*n;
Force = ev('ev_surface_integrate.2.Gamma(T)')
And here it is part of the problem configuration file.
fields = {
'displacement': ('real', 'vector', 'Omega', 1),
}
materials = {
'solid' : (None, 'get_elastic_pars'),
'load' : (None, 'linear_tension'),
'f1' : 'get_pars_fibres1',
}
variables = {
'u': ('unknown field', 'displacement', 0),
'v': ('test field', 'displacement', 'u'),
}
regions = {
'Omega' : 'all',
'Fix1' : ('vertices in x < %.10f' % (fix_point + eps2), 'facet'),
'Fix2' : ('vertices in x > %.10f' % (fix_point - eps2), 'facet'),
'Fix' : ('r.Fix1 *v r.Fix2', 'facet'),
'Gamma' : ('vertices of surface','edge'),
}
ebcs = {
'fixb' : ('Fix', {'u.all' : 0.0}),
}
integrals = {
'i1' : ('v', 1),
'i2' : ('s', 2),
}

Hi-
What is the best way to save data created in different time steps for plotting after the program has run? This is especially applicable for models with time dependent material properties as discussed in the "linear and power law viscous flow" question. I have tried to extract this data:
viscosity = pb.evaluate('ev_integrate_mat.2.Omega(nonlinear.mu, u)',mode='el_avg', copy_materials=False, verbose=False)
out['viscosity'] = Struct(name='vis', mode='cell', data=vis, dofs=None)
or even:
for i in range (0,pb.ts.n_step-1):
out_test['vis %s' % pb.ts.step] = Struct(name='vis', mode='cell', data=vis, dofs=None)
but it is overwritten in each time step. I am attempting to plot the mean viscosity over the entire model for each time step. An alternative question might be, can we create a time sensitive probe plot?
A secondary question: I notice that the values on the legend in each plot vary through different time steps. Is it possible to hold the legend values fixed and only change the colors of the corresponding figures?
Thanks

Hi SfePy community,
I am attempting model stress and strain rate variations over a region (Omega) that contains sub-regions (Omega1 and Omega2) with different viscosities.
I have a general understanding of this mathematically, but i am still unsure the exact equations used by SfePy to calculate this. So far my model is largely based on the Navies-Stokes example provided in SfePy with the circle_in_square mesh (example here: https://pastebin.com/VZrEKVFZ). Ultimately I would like to be able to model linear and power law viscous flow, is this possible with the existing equations in SfePy?
More specific questions:
What are default units for pressure (p) the values range from ~ -50 to 50?
How can I change or specify units if i need to?
How do you calculate strain rate? Can I use the GradTerm class to do this?:
sr = problem.evaluate('ev_grad.i.Omega(u)', mode='el_avg')
When I try to calculate Cauchy stress i get error:
ValueError: wrong arguments shapes for "+1.00e+00 * ev_cauchy_stress.4.Omega(fluid.viscosity, u)" term!
I think this is because ev_cauchy_stress requires a 3x3 matrix material and I have input a single viscosity value? What is the best way to solve this?
Thank you!

In examples/large_deformation/hyperelastic.py a rotation by displacements is applied. By using a similar function the vectors defining the force couples could be defined for dw_surface_ltr (IMHO). Does it make sense?
r.
----- Reply message -----
From: "Andre Smit" <freev...(a)gmail.com>
To: <sfepy...(a)googlegroups.com>
Subject: Torque
Date: Sat, Dec 18, 2010 05:10
What is the best way to apply a torque load to a model?
--
Andre
--
You received this message because you are subscribed to the Google Groups "sfepy-devel" group.
To post to this group, send email to sfepy...(a)googlegroups.com.
To unsubscribe from this group, send email to sfepy-devel...(a)googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sfepy-devel?hl=en.

I am pleased to announce release 2018.1 of SfePy.
Description
-----------
SfePy (simple finite elements in Python) is a software for solving systems of
coupled partial differential equations by the finite element method or by the
isogeometric analysis (limited support). It is distributed under the new BSD
license.
Home page: http://sfepy.org
Mailing list: https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/
Git (source) repository, issue tracker: https://github.com/sfepy/sfepy
Highlights of this release
--------------------------
- major update of time-stepping solvers and solver handling
- Newmark and Bathe elastodynamics solvers
- interface to MUMPS linear solver
- new examples:
- iron plate impact problem (elastodynamics)
- incompressible Mooney-Rivlin material model (hyperelasticity) as a script
For full release notes see http://docs.sfepy.org/doc/release_notes.html#id1
(rather long and technical).
Cheers,
Robert Cimrman
---
Contributors to this release in alphabetical order:
Robert Cimrman
Jan Heczko
Jan Kopacka
Vladimir Lukes