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 trying to model Stokes flow at very high viscosities (~10^20), from my results it looks like I cannot achieve this and am better suited using viscosities of ~10^5 or so. I know there is this older post [1] which states:
"A word of warning though: SfePy does not
have a dedicated Navier-Stokes solver (the Newton (+ and direct) solver use
that is in the navier_stokes.py example is rather naive, and works for small
problems with only, with viscosity "high enough")"
Has there been a different solver implemented since this was posted? If not, what do you recommend to work with such large viscosities?
Thank you
[1] "Problem with the mesh while trying to solve the Navier Stokes equations with sfepy"
Dear All,
I am a python developer interested in contributing to the sfepy project.
There is quite a bit of material in the "How to contribute" page (
http://sfepy.org/doc-devel/developer_guide.html#how-to-contribute). So far
I have been able to :
- fork repository to my github account
- clone forked repository into my local computer
- look through issues in sfepy github page for opportunities to help
resolve salient issues. I am thinking about this one in particular
https://github.com/sfepy/sfepy/issues/367
- Look into forking workflow in Atlassian website (
https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow
)
- Pursue basic git tutorials. so far I have only experience working with
svn vcs.
I am confused abut how to properly set up a standalone sfepy development
environment in conda. Of course installing a regular environment is easy
*conda install -c conda-forge sfepy*
The above command seems to take care of all dependencies, including the
python installation itself. However I don't understand how this can be
combined with *git clone *such that I can install the cloned fork within
conda environment. How are the dependencies handled? What of the python
version dependency? I do not see these anywhere in the repository, it seems
to only contain sfepy scripts and modules.
Thanks for your consideration and look forward to hearing from you.
Best Regards,
Amine
OK! Thanks so much Robert. I’ve got things back to more or less where they were. One issue I think I never sorted out before was handling boundary conditions in a clean way. I’d like to be able to specify regions symbolically. I see in the docs there’s a concept of vertices in a “group” or “set” but I’m not sure how to create a .geo file that has either “groups” or “sets” defined by lines or points. Can anyone point me to the docs describing how to do this?
thanks!
-steve
Robert Cimrman wrote:
> Hi Steve,
>
> Welcome back :)
>
Hi,
I'd like to try and solve the problem outlined here,
https://pages.nist.gov/pfhub/benchmarks/benchmark4.ipynb/
Is this a problem that Sfepy could handle? I'm assuming the elasticity
part of the problem would be straightforward, but what about a fourth
order phase field equation? Given that it's tractable are there
examples that match the form of the elasticity equation and/or any
Cahn-Hilliard type examples for Sfepy?
Cheers,
Daniel
--
Daniel Wheeler
Dear All,
I installed sfepy in Ubuntu computer using : conda install -c conda-forge sfepy
command, after that I downloaded sfepy by cloning from github. I am trying to run the examples.
If I am within the sfepy environment in conda, then how can I execute an input file completely?
For example, I run the cube.py using :
(mysfepyenv).../path/to/cube.py/directory$ sfepy-run simple cube.py
How can I postprocess it?
Is it something like this:
(mysfepyenv).../path/to/cube.py/directory$ sfepy-run postproc cube.py
When I do this, it yields the following message:
ModuleNotFoundError: No module named énthought'
...
ModuleNotFoundError: No module named 'traits'
...
How do I install them?
Yours Sincerely,
Anil Kunwar
Hi SfePy folks,
I worked on a couple problems using sfepy 6.5 years ago, and then drifted away. Today I tried to run my old code using the latest SfePy and it's mostly broken. ;-( What is the best way to see what's changed since 2012 and how one should go about updating code from that time?
thanks!
-steve