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),
}
I am pleased to announce release 2018.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 (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
--------------------------
- better support for eigenvalue problems
- improved MUMPS solver interface
- support for logging and plotting of complex values
For full release notes see [1].
Cheers,
Robert Cimrman
[1] http://docs.sfepy.org/doc/release_notes.html#id1
---
Contributors to this release in alphabetical order:
Robert Cimrman
Vladimir Lukes
Matyas Novak
Jan Heczko
Lubos Kejzlar
Hi,
I just downloaded and tried to install Sfepy on my machine (I have Linux
Mint, Anaconda, python 3.6) but there's a weird (and probably silly)
error I'm getting when I tried to build the C modules. Before pasting
the output of that I wonder if this email is the correct one to contact
you for this type of errors in the installation. I've searched on the
web for the error but I haven't found anything. I hope you can help me
with this, I really look forward to start to use Sfepy.
Thanks in advance,
Francisco
Hi, everyone!
I am solving a planar problem using quad elements and the number of quadrature points bothers me a little.
A minimal [interactive] working example would be like this:
In [1]: from sfepy.discrete import Integral
In [2]: i = Integral('i', 1)
In [3]: i.get_qp('2_4')
Out[3]:
(array([[0.90824829, 0.5 ],
[0.29587585, 0.85355339],
[0.29587585, 0.14644661]]),
array([0.33333333, 0.33333333, 0.33333333]))
In [4]: i = Integral('i', 2)
In [5]: i.get_qp('2_4')
Out[5]:
(array([[0.84156503, 0.5 ],
[0.15843497, 0.5 ],
[0.5 , 0.84156503],
[0.5 , 0.15843497],
[0.94095855, 0.94095855],
[0.94095855, 0.05904145],
[0.05904145, 0.94095855],
[0.05904145, 0.05904145]]),
array([0.20408163, 0.20408163, 0.20408163, 0.20408163, 0.04591837,
0.04591837, 0.04591837, 0.04591837]))
In [6]: i = Integral('i', 3)
In [7]: i.get_qp('2_4')
Out[7]:
(array([[0.21132487, 0.21132487],
[0.78867513, 0.21132487],
[0.21132487, 0.78867513],
[0.78867513, 0.78867513]]), array([0.25, 0.25, 0.25, 0.25]))
Why do I get 8 QPs for order 2 and 4 QPs for order 3? How does the order of the integral relate to the keys in `quadrature_tables` [1]?
Best regards, Jan
[1] http://sfepy.org/doc-devel/_modules/sfepy/discrete/quadratures.html