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
Dear Robert
I could overcome my previous problems of not having root privileges, so it
all worked up till the command:
./postproc.py cylinder.vtk
This echoed the below message:
Exception
In
/home/gmh/.local/lib/python2.7/site-packages/mayavi-4.4.4.dev0-py2.7-linux-x86_64.egg/mayavi/sources/vtk_xml_file_reader.py:86
AttributeError: 'AlgorithmOutput' object has no attribute 'point_data' (in
get_all_attributes)
Traceback (most recent call last):
File
"/home/gmh/.local/lib/python2.7/site-packages/traits-4.6.0.dev354-py2.7-linux-x86_64.egg/traits/trait_notifiers.py",
line 340, in __call__
self.handler( *args )
File "/home/gmh/sfepy/sfepy/postprocess/dataset_manager.py", line 177, in
_dataset_changed
self._assign_attribute.input = value
File
"/home/gmh/.local/lib/python2.7/site-packages/traits-4.6.0.dev354-py2.7-linux-x86_64.egg/traits/trait_handlers.py",
line 104, in _read_only
name, class_of( object ) )
TraitError: The 'input' trait of an AssignAttribute instance is 'read only'.
sfepy: point scalars t at [-0.05 -0.02 0. ]
sfepy: range: -2.00e+00 2.00e+00 l2 norm range: 1.06e-02 2.00e+00
No handlers could be found for logger "mayavi.core.common"
I'm using Python 2.7.8 if that's relevant to the current issue.
Thanks again
Cheers
I am trying to use a "parameter" field variable in interactive mode. What I
am trying to do is very similar to the thermo-elaticity example, but for
some reason I cannot make it work in interactive mode.
In the thermo-elasticity example the parameter field variable is defined as
follows
def get_temperature_load(ts, coors, region=None):
""" Temperature load depends on the `x` coordinate. """
x = coors[:, 0]
return (x - x.min())**2 - T0
fields = {
'displacement': ('real', 3, 'Omega', 1),
'temperature': ('real', 1, 'Omega', 1),}
variables = {
'u' : ('unknown field', 'displacement', 0),
'v' : ('test field', 'displacement', 'u'),
'T' : ('parameter field', 'temperature',
{'setter' : 'get_temperature_load'}),}
equations = {
'balance_of_forces' :
"""dw_lin_elastic.2.Omega( solid.D, v, u ) - dw_biot.2.Omega( solid.alpha, v, T ) = 0""",}
In interactive mode this is what I am doing the following:
field_p = Field.from_args('fp', nm.float64, 1, omega,
approx_order=order_p)
press_load = Function('press_load',get_pressure_load)
press = FieldVariable('pressure','parameter',field_p,special={'setter'
:press_load},
primary_var_name='(set-to-None)')
And the corresponding term:
t20 = Term.new('dw_laplace(matalpha.k, q, press)',
integral, omega, matalpha=matalpha, q=q, press=press)
But this does not work.
Any thoughts?
Thanks
I am trying to use the option Region.from_vertices in order to create a
region to apply boundary conditions. I want to use this function because I
can easily identify the vertices on which I need to apply boundary
conditions. However I get an error when I try to use the created surface,
see below. I notice by comparing with other regions that work, that the
region created has missing information but don't know how to fix it.
Your help is appreciated,
Adolfo
Traceback (most recent call last):
File "PoroElasticity_paper_ext_3.py", line 520, in <module>
main()
File "PoroElasticity_paper_ext_3.py", line 454, in main
vec = pb.solve()
File
"/Users/adantra/anaconda/envs/default/lib/python2.7/site-packages/sfepy/discrete/problem.py",
line 1020, in solve
vec = nls(vec0, status=self.nls_status)
File
"/Users/adantra/anaconda/envs/default/lib/python2.7/site-packages/sfepy/solvers/nls.py",
line 251, in __call__
vec_r = fun(vec_x)
File
"/Users/adantra/anaconda/envs/default/lib/python2.7/site-packages/sfepy/discrete/evaluate.py",
line 52, in eval_residual
vec_r = self.problem.equations.eval_residuals(vec)
File
"/Users/adantra/anaconda/envs/default/lib/python2.7/site-packages/sfepy/discrete/equations.py",
line 677, in eval_residuals
self.evaluate(mode='weak', dw_mode='vector', asm_obj=out)
File
"/Users/adantra/anaconda/envs/default/lib/python2.7/site-packages/sfepy/discrete/equations.py",
line 613, in evaluate
term_mode=term_mode, asm_obj=asm_obj)
File
"/Users/adantra/anaconda/envs/default/lib/python2.7/site-packages/sfepy/discrete/equations.py",
line 830, in evaluate
ret_status=True)
File
"/Users/adantra/anaconda/envs/default/lib/python2.7/site-packages/sfepy/terms/terms.py",
line 1240, in evaluate
n_elr, n_qpr, dim, n_enr, n_cr = self.get_data_shape(varr)
File
"/Users/adantra/anaconda/envs/default/lib/python2.7/site-packages/sfepy/terms/terms.py",
line 1053, in get_data_shape
out = variable.get_data_shape(self.integral, integration, region.name)
File
"/Users/adantra/anaconda/envs/default/lib/python2.7/site-packages/sfepy/discrete/variables.py",
line 1526, in get_data_shape
region_name=region_name)
File
"/Users/adantra/anaconda/envs/default/lib/python2.7/site-packages/sfepy/discrete/fem/fields_base.py",
line 364, in get_data_shape
region = self.domain.regions[region_name]
File
"/Users/adantra/anaconda/envs/default/lib/python2.7/site-packages/sfepy/base/base.py",
line 678, in __getitem__
raise IndexError, ii
IndexError: Fracture0
I am trying to generate a mesh from geometry but it does not seem to be
working. Does anybody have experience with this option? I am attaching a
sample code.
Hi sfepy developers and users,
I am wondering is it possible to have periodic strain boundary condition in
sfepy? For example, in a 2D uniaxial tension along y direction, how to
constrain the strain at left and right boundary to be same when solving
mechanical equilibrium equation?
Regards
Ronghai
Hi to everybody,
I'm trying to run the installation (in-built and not) of SfePy in Mac OS X
10.9 (Mavericks).
By now, I tried to do it using a python 2.7 distribution that came along
with the anaconda package and installing all prerequisites using pip or
conda. But when launching 'python setup.py install' or 'python setup.py
build', the installer crashes.
My log window:
*MacBook-Pro-de-M:sfepy-master slowpoke$ sudo python setup.py install*
*Traceback (most recent call last):*
* File "setup.py", line 239, in <module>*
* check_versions()*
* File "setup.py", line 143, in check_versions*
* show_only=show_only)*
* File "/Volumes/Storage_MacLnx/Downloads/sfepy-master/build_helpers.py",
line 304, in package_check*
* __import__(pkg_name)*
* File
"/Users/slowpoke/anaconda2/lib/python2.7/site-packages/matplotlib/__init__.py",
line 1131, in <module>*
* rcParams = rc_params()*
* File
"/Users/slowpoke/anaconda2/lib/python2.7/site-packages/matplotlib/__init__.py",
line 975, in rc_params*
* return rc_params_from_file(fname, fail_on_error)*
* File
"/Users/slowpoke/anaconda2/lib/python2.7/site-packages/matplotlib/__init__.py",
line 1100, in rc_params_from_file*
* config_from_file = _rc_params_in_file(fname, fail_on_error)*
* File
"/Users/slowpoke/anaconda2/lib/python2.7/site-packages/matplotlib/__init__.py",
line 1018, in _rc_params_in_file*
* with _open_file_or_url(fname) as fd:*
* File "/Users/slowpoke/anaconda2/lib/python2.7/contextlib.py", line 17,
in __enter__*
* return self.gen.next()*
* File
"/Users/slowpoke/anaconda2/lib/python2.7/site-packages/matplotlib/__init__.py",
line 1000, in _open_file_or_url*
* encoding = locale.getdefaultlocale()[1]*
* File "/Users/slowpoke/anaconda2/lib/python2.7/locale.py", line 543, in
getdefaultlocale*
* return _parse_localename(localename)*
* File "/Users/slowpoke/anaconda2/lib/python2.7/locale.py", line 475, in
_parse_localename*
* raise ValueError, 'unknown locale: %s' % localename*
*ValueError: unknown locale: UTF-8*
Any idea about what could be happening?
Thank you very much in advanced.
MA