Hi,
I am attempting to solve heat diffusion in a spin valve. I have created a 3D mesh of part of the valve which has a hotspot on the wire and i want to see the heat diffusion into the substrate below. The wire is treated as being insulated with the surroundings and the only heat flow is into the substrate. I have found out that the mesh needs to be separate volumes for the wire and substrate or I get a linesearch failed message. I have an image of the spin valve and what the temperature distribution is like in real life and i am trying to recreate it. I can get the problem to work with 2 boundary conditions: the hotspot at 25C and bottom of substrate at 21C. Is there a way to set one ebcs and initial and see how the heat diffuses into the substrate that way? Also there appears to be some strange overlap effects between the wire and subs as my regions overlap at z=0 if there a way to stop this given there is also an interface conductance I need to factor in at z =0?
My code:
from __future__ import absolute_import
from sfepy import data_dir
import numpy as nm
filename_mesh = data_dir + '/3_vol.mesh'
materials = {
'coef4' : ({'val' : 1.2},),
'coef5' : ({'val' : 240},),
'coef6' : ({'val' : -2.5},),
'Ag' : ({'K' : 240 * nm.eye(3)},),
'Cu' : ({'K' : 240 * nm.eye(3)},),
'S' : ({'K' : 1.2 * nm.eye(3)},),
}
regions = {
'Omega' : 'all',
'subs' : ('cells of group 1', 'cell'),
'Ag_wire' : ('cells of group 2 ', 'cell'),
'Cu_wire' : ('cells of group 3 ', 'cell'),
'Gamma_Left' : ('vertices in (x == 7.8) & ( z > 0)', 'facet'),
'Gamma_Right' : ('vertices in (x == 27.8) & ( z > 0)', 'facet'),
'Gamma_Bottom' : ('vertices in (x > 7.8) & (x < 27.8) & ( y < 3) & ( y > 2) & ( z == 0) ', 'facet'),
'Sub_Bottom' : ('vertices in ( z == -2) ', 'facet'),
'Wire_top' : ('vertices in ( z == 1) ', 'facet'),
}
fields = {
'temperature' : ('real', 1, 'Omega', 1),
}
variables = {
't' : ('unknown field', 'temperature', 0),
's' : ('test field', 'temperature', 't'),
}
ebcs = {
't1' : ('Gamma_Left', {'t.0' : 25}),
't2' : ('Sub_Bottom', {'t.0' : 21}),
}
integrals = {
'i' : 2,
}
equations = {
'temperature' : """ dw_diffusion.i.Ag_wire(Ag.K, s,t) dw_diffusion.i.Cu_wire(Cu.K, s,t) dw_diffusion.i.subs(S.K, s,t) = 0
"""
}
solvers = {
'ls' : ('ls.scipy_direct', {}),
'newton' : ('nls.newton',
{'i_max' : 1,
'eps_a' : 1e-10,
'eps_r' : 1.0,
}),
}
options = {
'nls' : 'newton',
'ls' : 'ls',
}
I follow the manual to install sfepy in a conda environment.
The tests I made (python ./run_tests.py) are ok except this error which does exist for several test files :
[1] ../tests/test_eigenvalue_solvers.py
PETSc Error --- Open MPI library version
Open MPI v4.1.0, package: Open MPI runner(a)Mac-1610582404968.local Distribution, ident: 4.1.0, repo rev: v4.1.0, Dec 18, 2020 does not match what PETSc was compiled with 4.0, aborting
--- test_eigenvalue_solvers: failed!
An idea ?
Many thanks.
I am pleased to announce the release of SfePy 2020.4.
Description
-----------
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
--------------------------
- Ogden hyperelastic term
- serendipity finite element basis of orders 1-3
For full release notes see [1].
Cheers,
Robert Cimrman
[1] http://docs.sfepy.org/doc/release_notes.html#id1
---
Contributors to this release in alphabetical order:
Robert Cimrman
Jan Heczko
Vladimir Lukes
Hi Mike,
You need to either generate the mesh using the simple mesh generators that are
in the sfepy package (just block or cylinder meshes), or (most often) you need
to provide a mesh file, created in advance in an external tool. Many
open-source or commercial softwares can be used for meshing. The following
formats are supported thanks to meshio package:
$ python3 script/convert_mesh.py -l a b
sfepy: Supported readable mesh formats:
sfepy: --------------------------------
sfepy: abaqus (.inp)
sfepy: ansys (.cdb)
sfepy: comsol (.txt)
sfepy: exodus (['.ex2', '.e', '.exo'])
sfepy: gambit (.neu)
sfepy: gmsh (.msh)
sfepy: gmsh-dg (.msh)
sfepy: gmsh2-ascii (.msh)
sfepy: gmsh2-binary (.msh)
sfepy: gmsh4-ascii (.msh)
sfepy: gmsh4-binary (.msh)
sfepy: hdf5 (.h5)
sfepy: hdf5-xdmf (.h5x)
sfepy: hmascii (.hmascii)
sfepy: med (.med)
sfepy: medit (['.mesh', '.meshb'])
sfepy: mesh3d (.mesh3d)
sfepy: nastran (['.nas', '.fem', '.bdf'])
sfepy: tetgen (['.node', '.ele'])
sfepy: vtk (.vtk)
sfepy: vtk-ascii (.vtk)
sfepy: vtk-binary (.vtk)
sfepy: vtu (.vtu)
sfepy: xdmf (['.xmf', '.xdmf'])
sfepy: xyz (.xyz)
sfepy:
sfepy: Supported writable mesh formats:
sfepy: --------------------------------
sfepy: abaqus (.inp)
sfepy: exodus (['.ex2', '.e', '.exo'])
sfepy: gmsh (.msh)
sfepy: gmsh-dg (.msh)
sfepy: gmsh2-ascii (.msh)
sfepy: gmsh2-binary (.msh)
sfepy: gmsh4-ascii (.msh)
sfepy: gmsh4-binary (.msh)
sfepy: hdf5 (.h5)
sfepy: hdf5-xdmf (.h5x)
sfepy: med (.med)
sfepy: medit (['.mesh', '.meshb'])
sfepy: nastran (['.nas', '.fem', '.bdf'])
sfepy: tetgen (['.node', '.ele'])
sfepy: vtk (.vtk)
sfepy: vtk-ascii (.vtk)
sfepy: vtk-binary (.vtk)
sfepy: vtu (.vtu)
sfepy: xdmf (['.xmf', '.xdmf'])
sfepy: xyz (.xyz)
Does it help?
r.
On 10. 12. 20 20:53, Michael Rizzo wrote:
> Yea that one managed to work, and I made sure to change to the correct
> directory. I fact, it seems I had already done this, but I was unable to
> notice the importance of another error, which seems to relate to a mesh
> that is no longer available in the standard sfepy build:
> [image: image.png]
>
> I am new to FEA, but I do have some experience using ANSYS, where we
> usually start with the geometry and then figure out the mesh. In this case
> it seems I am not familiar enough to understand how to setup the mesh at
> present.
>
> Regards,
> Mike
>
> On Wed, 9 Dec 2020 at 16:02, Robert Cimrman <cimrman3(a)ntc.zcu.cz> wrote:
>
>> OK, so is fish_heart.py in your working directory? And how did you install
>> sfepy (which version)?
>>
>> Anyway, maybe start with the example [1], which is up-to-date and simpler.
>>
>> r.
>>
>> [1]
>> http://sfepy.org/doc-devel/examples/large_deformation-active_fibres.html
>>
>> On 09. 12. 20 21:45, Michael Rizzo wrote:
>>> Yea I am trying to use a module custom built by this other group for
>> now. I
>>> am trying the way indicated in the manual:
>>>
>>> [image: image.png]
>>>
>>> I can also take a look at some more recent description files.
>>>
>>> On Wed, 9 Dec 2020 at 15:32, Robert Cimrman <cimrman3(a)ntc.zcu.cz> wrote:
>>>
>>>> Can you post how you run the example module?
>>>>
>>>> If it is the file from [1], note that it is already 10 years old, so it
>>>> likely
>>>> needs updating for current sfepy.
>>>>
>>>> Regards,
>>>> r.
>>>>
>>>> [1] http://sfepy.org/fish_heart/
>>>>
>>>> On 09. 12. 20 18:42, Michael Rizzo wrote:
>>>>> Okay. I am working in colaboratory for now. I am able to pip install
>>>>> sfepy, but when I try to use a custom module I am running into path
>>>> issues.
>>>>>
>>>>> [image: image.png]
>>>>>
>>>>> I have been able to append the module to path using sys.append, and I
>>>> have
>>>>> also added the module to the examples folder. It seems like I may need
>> to
>>>>> rebuild and run the make again, however.
>>>>>
>>>>> I appreciated the assistance.
>>>>>
>>>>> Regards,
>>>>> Mike
>>>>>
>>>>> On Wed, 9 Dec 2020 at 11:44, Robert Cimrman <cimrman3(a)ntc.zcu.cz>
>> wrote:
>>>>>
>>>>>> Hi Mike,
>>>>>>
>>>>>> On 12/9/20 5:24 PM, Michael Rizzo wrote:
>>>>>>> Hello SFE folk,
>>>>>>>
>>>>>>> I am new to development. Is this the appropriate contact for question
>>>>>>> asking? If not, a redirect would be appreciated.
>>>>>>
>>>>>> Yes, ask here!
>>>>>>
>>>>>> Cheers,
>>>>>> r.
>>>>>>
>>>>>>> Regards,
>>>>>>> Mike
>> _______________________________________________
>> SfePy mailing list -- sfepy(a)python.org
>> To unsubscribe send an email to sfepy-leave(a)python.org
>> https://mail.python.org/mailman3/lists/sfepy.python.org/
>> Member address: mdrizzzoh(a)gmail.com
>>
>
OK, so is fish_heart.py in your working directory? And how did you install
sfepy (which version)?
Anyway, maybe start with the example [1], which is up-to-date and simpler.
r.
[1] http://sfepy.org/doc-devel/examples/large_deformation-active_fibres.html
On 09. 12. 20 21:45, Michael Rizzo wrote:
> Yea I am trying to use a module custom built by this other group for now. I
> am trying the way indicated in the manual:
>
> [image: image.png]
>
> I can also take a look at some more recent description files.
>
> On Wed, 9 Dec 2020 at 15:32, Robert Cimrman <cimrman3(a)ntc.zcu.cz> wrote:
>
>> Can you post how you run the example module?
>>
>> If it is the file from [1], note that it is already 10 years old, so it
>> likely
>> needs updating for current sfepy.
>>
>> Regards,
>> r.
>>
>> [1] http://sfepy.org/fish_heart/
>>
>> On 09. 12. 20 18:42, Michael Rizzo wrote:
>>> Okay. I am working in colaboratory for now. I am able to pip install
>>> sfepy, but when I try to use a custom module I am running into path
>> issues.
>>>
>>> [image: image.png]
>>>
>>> I have been able to append the module to path using sys.append, and I
>> have
>>> also added the module to the examples folder. It seems like I may need to
>>> rebuild and run the make again, however.
>>>
>>> I appreciated the assistance.
>>>
>>> Regards,
>>> Mike
>>>
>>> On Wed, 9 Dec 2020 at 11:44, Robert Cimrman <cimrman3(a)ntc.zcu.cz> wrote:
>>>
>>>> Hi Mike,
>>>>
>>>> On 12/9/20 5:24 PM, Michael Rizzo wrote:
>>>>> Hello SFE folk,
>>>>>
>>>>> I am new to development. Is this the appropriate contact for question
>>>>> asking? If not, a redirect would be appreciated.
>>>>
>>>> Yes, ask here!
>>>>
>>>> Cheers,
>>>> r.
>>>>
>>>>> Regards,
>>>>> Mike
Can you post how you run the example module?
If it is the file from [1], note that it is already 10 years old, so it likely
needs updating for current sfepy.
Regards,
r.
[1] http://sfepy.org/fish_heart/
On 09. 12. 20 18:42, Michael Rizzo wrote:
> Okay. I am working in colaboratory for now. I am able to pip install
> sfepy, but when I try to use a custom module I am running into path issues.
>
> [image: image.png]
>
> I have been able to append the module to path using sys.append, and I have
> also added the module to the examples folder. It seems like I may need to
> rebuild and run the make again, however.
>
> I appreciated the assistance.
>
> Regards,
> Mike
>
> On Wed, 9 Dec 2020 at 11:44, Robert Cimrman <cimrman3(a)ntc.zcu.cz> wrote:
>
>> Hi Mike,
>>
>> On 12/9/20 5:24 PM, Michael Rizzo wrote:
>>> Hello SFE folk,
>>>
>>> I am new to development. Is this the appropriate contact for question
>>> asking? If not, a redirect would be appreciated.
>>
>> Yes, ask here!
>>
>> Cheers,
>> r.
>>
>>> Regards,
>>> Mike
>> _______________________________________________
>> SfePy mailing list -- sfepy(a)python.org
>> To unsubscribe send an email to sfepy-leave(a)python.org
>> https://mail.python.org/mailman3/lists/sfepy.python.org/
>> Member address: mdrizzzoh(a)gmail.com
>>
>
Hello !
Is there a way to export data as a audio sound-file ? At least the kind that could Work ?
For instance, acoustics3d.py or vibro_acoustic3d.py could export vtk file that could then be converted into a wav or aiff one ?
Is there any example somewhere ?
Thanks !!
O.
Hi guys,
Currently, I am using Sfepy to simulate a 3D geometry model with a uniaxial
displacement to find out the von Mises strength and the total execution
time for the simulation is about *40 mins with 8G RAM*. Besides, 94% of the
RAM is occupied when the program is running.
I am not sure what is causing this execution time to take that long and
what I could do to shorten the execution time.
The geometry model was inputted from an Abaqus input-file with 5514
vertices and 4417 cells.
Also, I have checked the execution time line-by-line and found that the
most time consumable step is defined as:
state = pb.solve(status=status)
In this case, I am supposing the solving process used most of the RAM and
causing the timing issue.
The mesh file and our code is attached.
Thank you and best regards!
Kedi Yang