On 11/17/2017 08:46 PM, Dio Dwianto wrote:
thank you very much for your reply, I really appreciate it. I do have some follow up questions and I hope you would be so kind to bear with me.
I can't seem to find show_mesh_info.py at the Script folder, or any folder in my SfePy directory for that matter. Is there any way for me to update my scripts?
How did you install sfepy? I have just noticed, that the show_mesh_info.py script is missing in the latest release (2017.3) source distribution (will be fixed in the next release). It is only in the git repository sources. It shows for steel_cylinder.med:
sfepy: CMesh: n_coor: 9878, dim 3, tdim: 3, n_el 44215 sfepy: element types: ['3_4'] sfepy: nodal BCs:  sfepy: bounding box: x: [-500.0, 500.0], y: [-499.996756531, 499.996756531], z: [0.0, 1000.0] sfepy: centre: [ 7.83762706 1.08148282 496.65201085]
and for cylinder.mesh:
sfepy: CMesh: n_coor: 354, dim 3, tdim: 3, n_el 1348 sfepy: element types: ['3_4'] sfepy: nodal BCs:  sfepy: bounding box: x: [-1.2246063538e-18, 0.1], y: [-0.02, 0.02], z: [-0.019999827242, 0.019999872274] sfepy: centre: [ 5.05445344e-02 -2.40167062e-05 -1.92192931e-05]
Check the bounding box ranges with the region definitions (Gamma_Left, Gamma_Right) in your file.
I found some seemingly useful scripts like "mesh_generators.py" and "mesh_tools.py" (files attached) but I'm not sure how to use them because I don't see any line of codes where I could add a directory to my geometry file. Or do I use some command combinations on the Command Line?
You normally need not to use the first one, if you already have a mesh. The second one is useful for treating meshes coming from CT and similar images.
I'm also curious about these lines of codes
[image: Inline image 1]
This is just a definition of some function of coordinates that is used as an initial condition.
[image: Inline image 2]
You can ignore those for now - the gen_lines() function is related to probing the results. I recommend reading in detail the tutorial and the primer chapters of the documentation.
what are these for? If I want to use the script to do some simulations for complex geometries, do I have to edit these codes accordingly?
Thanks again for your help and I hope you have a great weekend!
On Fri, Nov 17, 2017 at 2:52 PM, Robert Cimrman firstname.lastname@example.org wrote:
On 11/16/2017 02:14 PM, Dio Dwianto wrote:
I'm trying to use one of the example "time_poisson.py" for heat transfer simulation. I used my own mesh data ("steel_cylinder.med" ), which I created using Salome.
Somehow I didn't get the temperature distribution like what we would have gotten if we run the "time_poisson.py", which looked like this
[image: Inline image 1] Instead I could only get these results
[image: Inline image 2]
I attached the relevant files. Can somebody please tell me what I did wrong with the scripting?
You need to adjust the region definitions for the "steel_cylinder.med" mesh - it has different dimensions than "cylinder.mesh". The mesh dimensions can be easily printed using "script/show_mesh_info.py".
Check the example  for a way that would work for both the meshes (using the mesh bounding box).
Thanks for your help!