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
Hello,
I am trying to solve a poiseuille flow example. I want to make use of the
ls.scipy_iterative sovler. I am using the cg method. The problem definition
file, mesh and the vtk output are attached. Also attached is a plot of the
pressure and axial flow velocity along the axis of the pipe. As you can
see, the solution is completely non-physical. The same case runs fine with
the scipy_direct solver. What am I doing wrong?
Best regards,
Nikhil
Hello!
I am solving for steady laminar flow through a pipe. The issue I am facing
is the following:
I have given a velocity boundary condition at the pipe inlet. For the
outlet, I examined the following two cases:
1) Pressure boundary condition at outlet.
2) No boundary condition prescribed at outlet.
For both cases, I get a strange jump in the velocity at the pipe outlet. In
the attached files you can see the velocity and pressure plotted along the
axis(from inlet to outlet) of the pipe. Why do I see a jump in the velocity
for both cases? How do I specify outlet conditions in sfepy?
Another observation that I have made is that for case 1, there is a jump in
the pressure value at the outlet. In case 2, this pressure-jumps goes away.
Best regards,
Nikhil
I am pleased to announce release 2016.3 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: http://github.com/sfepy/sfepy
Highlights of this release
--------------------------
- Python 3 support
- testing with Travis CI
- new classes for homogenized coefficients
- using argparse instead of optparse
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
Thomas Kluyver
Vladimir Lukes
Hi,
I am trying to run a 2d laminar pipe flow simulation. I get the following
error when I run simple.py:
sfepy: left over: ['verbose', '__builtins__', '__file__',
'absolute_import', '__name__', '__package__', '_filename', '__doc__']
Traceback (most recent call last):
File "/scratch/sfepy/simple.py", line 170, in <module>
main()
File "/scratch/sfepy/simple.py", line 155, in main
define_args=options.define_args)
File "/scratch/sfepy/sfepy/base/conf.py", line 383, in
from_file_and_options
override=override, setup=setup)
File "/scratch/sfepy/sfepy/base/conf.py", line 369, in from_file
override=override, setup=setup)
File "/scratch/sfepy/sfepy/base/conf.py", line 415, in __init__
required=required, other=other)
File "/scratch/sfepy/sfepy/base/conf.py", line 433, in setup
self.transform_input()
File "/scratch/sfepy/sfepy/base/conf.py", line 506, in transform_input
self.__dict__[key] = transform(self.__dict__[key])
File "/scratch/sfepy/sfepy/base/conf.py", line 187, in transform_fields
if c2.dtype in dtypes:
TypeError: unhashable type: 'dict'
the problem setup file and mesh are attached. Could you tell me where I am
going wrong?
Best regards,
Nikhil
Hello!
Does sfepy support a tetrahedral mesh with a prism layer adjacent to
selected boundaries of the geometry? If yes, what should the medit mesh
file containing two different sorts of elements look like?
Best regards,
Nikhil
Hello!
I want to set a user defined function as a boundary condition. For example,
ebc_1 = {
'ebc_inlet' : ('inlet', {'u.[0,2]' : 0, 'u.1' : myfunc},
}
myfunc(ts, coors, **kwargs):
...
what type of an object is coors? how can I write the x, y and z coordinates
in terms of the variable coors?
Best regards,
Nikhil
Is there an example of problem definition that can be used to test
shaper.py?
I tried to grep for its requirements (equations_direct, equations_adjoint)
but couldn't find anything.
Thanks in advance
Jan