Hello!
It's a great tool you built there! I'd like to use it for some kind of
topology optimisation.
Is there an "idiomatic" way to set the material parameters of individual
nodes?
Thank you very much!
JonnyB
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 …
[View More]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),
}
[View Less]
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 …
[View More]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.
[View Less]
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
I am pleased to announce release 2017.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: http://groups.google.com/group/sfepy-devel
Git (source) repository, issue tracker: https://github.com/sfepy/sfepy
Highlights of this …
[View More]release
--------------------------
- spline-box parametrization of an arbitrary field
- conda-forge recipe (thanks to Daniel Wheeler)
- fixes for Python 3.6
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:
Siwei Chen
Robert Cimrman
Jan Heczko
Vladimir Lukes
Matyas Novak
[View Less]
I am getting the following error while trying to run 'its2d_interactive.py'.
C:\Python36\Lib\site-packages\sfepy\linalg>python
C:\Python36\Lib\site-packages\sfepy\examples\linear_elasticity\its2D_interactive.py
Traceback (most recent call last):
File
"C:\Python36\Lib\site-packages\sfepy\examples\linear_elasticity\its2D_interactive.py",
line 51, in <module>
from examples.linear_elasticity.its2D_2 import stress_strain
ModuleNotFoundError: No module named 'examples'
I have been …
[View More]getting this error when ever I try to run examples.
I tried changing the forward slashes to back slashes with no effect. I
installed most of the dependencies from PIP, and installed a pre-built
binary from Gohlke's LFD python libs page.
I've tried running from the console as seen in the above error. I've also
tried running from IDLE, for python 3.6. ANd I get no error messages from
the IDLE console but also, I get no output file. I'm running IDLE with
elevated privelage and I created the output directory inside the sfepy
install directory, i.e.
C:\Python36\Lib\site-packages\sfepy\examples\results...
Ok, I see this error. I was not in the sfepy base directory. I changed this
and got output in the console with the following error:
C:\Python36\Lib\site-packages\sfepy>python
C:\Python36\Lib\site-packages\sfepy\examples\linear_elasticity\its2D_interactive.py
sfepy: using values:
sfepy: Young's modulus: 2000.0
sfepy: Poisson's ratio: 0.4
sfepy: vertical load: -1000.0
sfepy: uniform mesh refinement level: 0
sfepy: reading mesh [line2, tri3, quad4, tetra4, hexa8]
(C:\Python36\lib\site-packages\sfepy/meshes/2d/its2D.mesh)...
sfepy: ...done in 0.00 s
Traceback (most recent call last):
File
"C:\Python36\Lib\site-packages\sfepy\examples\linear_elasticity\its2D_interactive.py",
line 293, in <module>
main()
File
"C:\Python36\Lib\site-packages\sfepy\examples\linear_elasticity\its2D_interactive.py",
line 175, in main
domain = FEDomain('domain', mesh)
File "C:\Python36\lib\site-packages\sfepy\discrete\fem\domain.py", line
50, in __init__
gel.poly_space = PolySpace.any_from_args(key, gel, 1)
File "C:\Python36\lib\site-packages\sfepy\discrete\fem\poly_spaces.py",
line 272, in any_from_args
return table[key](name, geometry, order)
File "C:\Python36\lib\site-packages\sfepy\discrete\fem\poly_spaces.py",
line 444, in __init__
self.nodes, self.nts, node_coors = self._define_nodes()
File "C:\Python36\lib\site-packages\sfepy\discrete\fem\poly_spaces.py",
line 465, in _define_nodes
nodes = nm.zeros((n_nod, n_v), nm.int32)
TypeError: 'float' object cannot be interpreted as an integer
Any ideas?
Thanks,
Chris
[View Less]