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 Prof. Cimrman
I just installed in Anaconda3 using conda forge, SfePy 2017.3 under windows 10. From the command line:python ./postproc.py cylider.vtk gave the following errors:
(C:\Users\vwij\Anaconda3.4.3) C:\Users\vwij\Anaconda3.4.3\Lib\site-packages\sfepy\script>python ./postproc.py cylinder.vtk
Traceback (most recent call last):
File "C:\Users\vwij\Anaconda3.4.3\lib\site-packages\sfepy\postprocess\viewer.py", line 10, in <module>
from enthought.traits.api \
ModuleNotFoundError: No module named 'enthought'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./postproc.py", line 53, in <module>
from sfepy.postprocess.viewer import (Viewer, get_data_ranges,
File "C:\Users\vwij\Anaconda3.4.3\lib\site-packages\sfepy\postprocess\viewer.py", line 21, in <module>
from traits.api \
ModuleNotFoundError: No module named 'traits'
I am a novice to this. Your guidance will be much appreciated.
vas
I am pleased to announce release 2017.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: https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/
Git (source) repository, issue tracker: https://github.com/sfepy/sfepy
Highlights of this release
--------------------------
- support preconditioning in SciPy and PyAMG based linear solvers
- user-defined preconditioners for PETSc linear solvers
- parallel multiscale (macro-micro) homogenization-based computations
- improved tutorial and installation instructions
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
Lubos Kejzlar
Vladimir Lukes
Matyas Novak
Hi Robert,
the linear elastic simulation with my large dataset is working, basically.
It was possible to run the simulation in the same way as with my test example mesh some weeks ago.
But I get an exception trying to use the build in sfepy Viewer:
....
.../VTK-6.3.0/VTK-6.3.0/Common/ExecutionModel/vtkAlgorithm.cxx, line 1421
vtkGlyph3D (0x4cd1fc0): Attempt to get connection index 0 for input port 0, which has 0 connections.
....
ICE default IO error handler doing an exit(), pid = 31572, errno = 32
The output .vtk file looks good. Did you see that exception before? If not I will just try to use vtk directly for the visualization.
Just for clarification: The output file contains the deformed mesh? Is this correct? So I can just display it in vtk. In my case it also contains TENSORS cauchy_stress from the post processing.
Thank you,
Kathrin
Hi Robert,
I just want to give feedback about the topic of loading mesh data from a
.bdf file:
The solution is currently to do a conversation into vtk and to load the
data from vtk:
I visualizated the mesh from the Nastran .bdf file with vtk. The internal
data structure in vtk is vtkunstructuredgrid. It is possible to export the
vtk grid into a file with the vtkunstructuredgridwriter as ascii file.
Afterwards it was possible to load the mesh from the .vtk file.
Just to share, this is a possible solution.
Thanks,
Kathrin
Regards,
>> Kathrin
>>
>> 2017-08-30 19:08 GMT+02:00 Robert Cimrman <cimrman3(a)ntc.zcu.cz>:
>>
>> Hi Kathrin,
>>>
>>> could you send me the mesh (off-list if needed)?
>>>
>>> r.
>>>
>>> On 08/30/2017 03:31 PM, Kathrin Sobe wrote:
>>>
>>> Hi Robert,
>>>>
>>>> I was able to load a mesh from a nastran .bdf file. The mesh is build of
>>>> tetrahedrons (nodes: 12593, tetrahedrons: 310106).
>>>>
>>>> When I create the Domain it stops with the following error:
>>>>
>>>> sfepy: warning: bad element orientation, trying to correct...
>>>> sfepy: warning: bad element orientation, trying to correct...
>>>>
>>>> Traceback (most recent call last):
>>>> runtime, nodes = tool_displacement()
>>>> domain = FEDomain('domain', mesh)
>>>> self.fix_element_orientation()
>>>> raise RuntimeError('elements cannot be oriented! (%s)' % key)
>>>> RuntimeError: elements cannot be oriented! (3_4)
>>>>
>>>> What is a correct element orientation for tetrahedral elements? The
>>>> Nastran file was generated automatically.
>>>>
>>>> Thanks for your help,
>>>> Kathrin
>>>> _______________________________________________
>>>> SfePy mailing list
>>>> sfepy(a)python.org
>>>> https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/
>>>>
>>>> _______________________________________________
>>>>
>>> SfePy mailing list
>>> sfepy(a)python.org
>>> https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/
>>>
>>>
>>
>