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 currrently looking for FEM packages to help me solve a system of
beams and columns, basically a collection of 1D bernoulli/timoshenko
line elements.
I started reading SfePy docs and i am getting the idea that doing the
above is not really possible here, am i right?
Are only 2D area elements permitted in SfePy?
Or is there any direct support for solving 1D line elements too..
Cheers
Nimish

I am pleased to announce release 2014.4 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 (preliminary support). It is distributed under the new
BSD license.
Home page: http://sfepy.org
Mailing list: http://groups.google.com/group/sfepy-devel
Git (source) repository, issue tracker, wiki: http://github.com/sfepy
Highlights of this release
--------------------------
- preliminary support for 1D problems
- data probes using pyVTK library
For full release notes see http://docs.sfepy.org/doc/release_notes.html#id1
(rather long and technical).
Best regards,
Robert Cimrman and Contributors (*)
(*) Contributors to this release (alphabetical order):
Lubos Kejzlar, Vladimir Lukes

Dear sfepy users and developers,
I am using sfepy for solving an 2D inclusion elastic problem. So, I
implemented based on "linear_elasticity/prestress_fibres" example in
interactive way. However, the prestress in my problem is not constant, so I
manually assign values.
I have two questions:
1. why when the integral order is 3, the array shape of prestress.datas[(
'Omega', 'i')][0]['val'] is (nx*ny,4,3,1), so when I assign by
prestress_value, I have to make it the same shape. If change integral order
to 1, the shape changes to (nx*ny,8,3,1), why?
2. When I use mesh smaller than 70*70, no problem. When 90*90 very slow.
When 120*120 "MemoryError" comes out.
Thanks a lot.
My codes and errors are as follow:
field = Field.from_args('displacement', np.float64, 'vector', omega, 1)
u = FieldVariable('u', 'unknown', field)
v = FieldVariable('v', 'test', field, primary_var_name='u')
prestress_value = np.zeros((nx*ny,3,1))
m = Material('m', lam=lambda_, mu=mu)
prestress = Material('prestress', val=prestress_value)
integral = Integral('i', order=3)
t1 = Term.new('dw_lin_elastic_iso(m.lam, m.mu, v, u )', integral, omega, m=m
, v=v, u=u)
t2 = Term.new('dw_lin_prestress(prestress.val, v )',integral, omega,
prestress=prestress, v=v)
eq = Equation('balance', t1-t2 )
eqs = Equations([eq])
ls = ScipyDirect({})
nls_status = IndexedStruct()
nls = Newton({'i_max' : 1,'eps_a' : 1e-6,'problem' : 'nonlinear'},
lin_solver=ls, status=nls_status)
pb = Problem('elasticity', equations=eqs, nls=nls, ls=ls)
pb.update_materials()
prestress_value = np.zeros((nx*ny,4,3,1))
#######################################################################
this is how I assign values to prestress, eta is a known scalar field.
#######################################################################
for i in range(nx*ny):
for j in range(4):
prestress_value[i][j] = np.array([[stress00_11], [stress00_22], [
stress00_12]]) * eta.value[i]
prestress.datas[('Omega', 'i')][0]['val'] = prestress_value
pb.update_materials()
########################################################################
following is error:
sfepy: updating materials...
sfepy: m
sfepy: prestress
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/usr/local/lib/python2.7/dist-packages/spyderlib/widgets/externalshell/sitecustomize.py"
, line 580, in runfile
execfile(filename, namespace)
File "/home/ronghaiwu/temporary/test.py", line 304, in <module>
main()
File "/home/ronghaiwu/temporary/test.py", line 179, in main
pb.update_materials()
File
"/home/ronghaiwu/mypylibs/lib/python2.7/site-packages/sfepy/discrete/problem.py"
, line 522, in update_materials
problem=self, verbose=verbose)
File
"/home/ronghaiwu/mypylibs/lib/python2.7/site-packages/sfepy/discrete/equations.py"
, line 313, in time_update_materials
verbose=verbose)
File
"/home/ronghaiwu/mypylibs/lib/python2.7/site-packages/sfepy/discrete/materials.py"
, line 70, in time_update
mat.time_update(ts, equations, mode=mode, problem=problem)
File
"/home/ronghaiwu/mypylibs/lib/python2.7/site-packages/sfepy/discrete/materials.py"
, line 339, in time_update
self.update_data(key, ts, equations, term, problem=problem)
File
"/home/ronghaiwu/mypylibs/lib/python2.7/site-packages/sfepy/discrete/materials.py"
, line 251, in update_data
**self.extra_args)
File
"/home/ronghaiwu/mypylibs/lib/python2.7/site-packages/sfepy/discrete/functions.py"
, line 34, in __call__
return self.function(*args, **_kwargs)
File
"/home/ronghaiwu/mypylibs/lib/python2.7/site-packages/sfepy/discrete/functions.py"
, line 66, in get_constants
out[key] = nm.tile(val, (coors.shape[0], 1, 1))
File "/usr/local/lib/python2.7/dist-packages/numpy/lib/shape_base.py",
line 860, in tile
c = c.reshape(-1, n).repeat(nrep, 0)
MemoryError
Regards
Ronghai

Hi!
I am trying to simulate a hyperelastic 3D cylinder with hexahedral
elements. I did the mesh with gmsh and save it as a .mesh file. When I do
it with tetrahedral elments everything works perfect, but when I try to
simulate the mesh with hexahredal elemnts, SfePy can not read well the mesh
and give me this error:
sfepy: warning: bad element orientation, trying to correct...
sfepy: warning: bad element orientation, trying to correct...
RuntimeError: elements cannot be oriented! (0, 3_4)
I've attached the .mesh file with hexahedral elements
Thanks a lot for the help!

Hi Ronghai,
On 11/05/2014 09:42 PM, Ronghai Wu wrote:
> Dear Sfepy developers and users,
>
> I am wondering if it is possible to solve a non-constant prestress problem
> with sfepy, as show
>
>
>
> where all fields exist in the whole domain(no subdomain is considered).
> is a constant stress field, however is a non-constant scale field(having
> different values at different nodes, but values are known). So, therefore
> prestress is also non-constant.
> I know the "linear_elasticity/prestress_fibres" example in Sfepy
> documentation. But the prestress in that example is constant(having same
> values at different nodes). So, I am wondering if it is possible to
> implement non-constant prestress problem. Thanks.
It should work out of the box. Look at [1] to see how to define a non-constant
material parameter (the prestress here) by using functions.
r.
[1] http://sfepy.org/doc-devel/users_guide.html#defining-material-parameters