It's only a while since I started to work with SfePy and It's awesome. I also have a concern and I really appreciate it if you could please share your thoughts on it with me: What I want to do is to import stress-strain curve as a table ( or function ) and do the tensile test on a sample rather than defining Young's modulus and Poisson's ratio to the software and let it solve constitutive equation to obtain the result of tensile test. Is it something I can do with SfePy ?
I'm trying to model a magnet encased in a cube of elastomer for part of a project. I've seemingly tried everything under the sun, but ive been rather limited due to the poor interactive documentation.
I have to core problems:
Defining a region by a function: Material parameters can be defined over just a region, as such a function to define an inner regions of given bounds:
def inner_region_(coors, domain=None ,magnet=None):
x, y, z = coors[:, 0], coors[:, 1], coors[:, 2]
mag_min_x, mag_max_x = str((magnet - (magnet / 2))), str((magnet + (magnet / 2)))
mag_min_y, mag_max_y = str((magnet - (magnet / 2))), str((magnet + (magnet / 2)))
mag_min_z, mag_max_z = str((magnet - (magnet / 2))), str((magnet + (magnet / 2)))
parse_def_min = 'vertices in (' + x + ' > ' + mag_min_x + ') & (' + y + ' > ' + mag_min_y + ') & (' + z + ' > ' + mag_min_z + ')'
parse_def_max = '& (' + x + ' < ' + mag_max_x + ') & (' + y + ' < ' + mag_max_y + ') & (' + z + ' < ' + mag_max_z + ')'
#pls dont hate my ugly strings :)
parse_def = parse_def_min + parse_def_max
flag = nm.where(parse_def)
I then call the function constructor in my main, again like the tutorials:
inner_region = Function('inner_region', inner_region_, extra_args=magnet)
and define the region off the domain:
magnet_region = domain.create_region('magnet0', 'vertices by inner_region','facet')
(i think i also need to make this region a child of my Omega (all node) region)
which fails miserably, due to the Function constructor seemingly not creating a Functions instance when called, but this is just from a bit of debugging (im no expert :D)
Secondly, I can't seem to configure having two materials over differing regions in the mesh. I think this is partly due to the above but also very limited examples concerning this use case interactively. If someone could run me through this i'd be extremely grateful!
BTW Im making meshes with pymesh, so cant use groups as a work around!
I am pleased to announce the release of SfePy 2021.2.
SfePy (simple finite elements in Python) is a software for solving systems of
coupled partial differential equations by finite element methods. It is
distributed under the new BSD license.
Home page: https://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
- new sensitivity analysis terms
- positive FE basis based on Bernstein polynomials
- smaller memory footprint of terms with constant material parameters
For full release notes see .
Contributors to this release in alphabetical order: