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),
}

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.

Hi,
I have just updated the time stepping solvers in sfepy for interactive use, as
demonstrated in the new example [1]. For basic use, ignore the probing code -
the time stepper can be used as simply as:
tss = SimpleTimeSteppingSolver({'t0' : 0.0, 't1' : 100.0, 'n_step' : 11},
problem=problem)
tss.init_time()
for step, time, state in tss():
pass
r.
[1] http://sfepy.org/doc-devel/examples/diffusion/time_poisson_interactive.html

Dear Developers,
I have a request.
Could you enable us to install sfepy by "pip install sfepy"?
This is very simple and helps increasing number of users.
Best regards,
Takuo Fujita

Hello,
I need to use a surface traction term, because I want to apply a pressure
dirichlet boundary condition at the inlet for channel flow. In the SfePy
term overview page, I can see the term dw_surface_ltr. In my weak form for
the Navier Stokes equations, I will need two such terms. One for the stress
tensor and one for the pressure. I got the pressure term using the
dw_surface_ndot term. I do not understand how to represent the
viscosity*vel_test_func.grad(velocity).n term.
Best regards,
Nikhil

Hello,
I am interested in using SfePy for analyzing the resonance modes of a
piezoelectric element. I've run an eigenmode analysis according to the
given linear elastic example on my mesh with the stiffness matrix applied,
and the results seem to agree with measured data, but I'm not certain how
to extend this analysis to the multiphysics problem. I've tried driving the
element with a periodic boundary condition, but I couldn't see any
variation in the response vs. frequency--at least when looking at the
maximum stress/strain at each frequency.
Here are the equations--a slight modification of the given multiphysics
example:
equations = {
'1' : """dw_volume_dot.i.volume(resonator.density, vv, dv/dt)
+ dw_lin_elastic.i.volume(resonator.D, w, u)
- dw_piezo_coupling.i.volume(resonator.coupling, w, phi)
= 0""",
'2' : """dw_piezo_coupling.i.volume(resonator.coupling, u, psi)
+ dw_diffusion.i.volume(resonator.dielectric, psi, phi)
= 0""",
'3' : """dw_volume_dot.i.volume(resonator.density, w, du/dt) =
dw_volume_dot.i.volume(resonator.density, vv, v)"""
}
I thought that perhaps the problem was the lack of a second order time
derivative term, which is the reason for the third equation, but adding it
didn't seem to help.
I've noticed that the linear elastic terms don't seem to oscillate when
stretched and released, perhaps this is at the root of the problem? or
perhaps I'm mistaken in what I expect to see...
Any help regarding piezoelectric modelling or harmonic oscillation would be
appreciated.
Thanks!
Nolan