How Gmsh can creat hexahedra by save as .mesh file

75 views
Skip to first unread message

Kid Guo

unread,
May 21, 2015, 8:33:06 AM5/21/15
to sfepy...@googlegroups.com
Hi 

I'm using SfePy to solve a problem.Firstly, I creat a simple cube by Gmsh and save as my.mesh file.
Now I am using sfepy/examples/multi_physics/biot.py to calculate.but it something wrong.
Then I open the "/meshes/3d/cube_medium_hexa.mesh",in the  "cube_medium_hexa.mesh" file,it consists  Vertices and Hexahedra.But in my mesh file,it only consists Vertices,Edges and  Triangles,no Hexahedra. When I run the biot.py, there aren't any results I want. How can I save .mesh file including Hexahedra? I think it is the main probelm.

Regards,
Kid





Robert Cimrman

unread,
May 22, 2015, 12:21:15 PM5/22/15
to sfepy...@googlegroups.com
Hi Kid,

see [1] - you need to generate a structured grid and set some further options
to have a fully hexahedral grid. (I have never used gmsh in this mode, so I
have no more details.)

r.

[1] http://geuz.org/gmsh/doc/texinfo/gmsh.html#Mesh-module

Kid Guo

unread,
May 26, 2015, 5:04:57 AM5/26/15
to sfepy...@googlegroups.com
Hi  Robert,
at first thank you for your help, I have solved the problem, and now I want to use "sfepy/examples/multi_physics/biot.py", I suspect to add  Dirichlet (essential) boundary conditions in the biot. Here I want to fix the bottom and load a press on the left facet and right facet, the press can be same or different, actually I want more is to load a linear function(like,P = γgh)  from Top to Bottom along the z axis. How can I achieve it.

r.
 


在 2015年5月23日星期六 UTC+8上午12:21:15,Robert Cimrman写道:
biot.py

Robert Cimrman

unread,
May 27, 2015, 3:41:59 AM5/27/15
to sfepy...@googlegroups.com
On 05/26/2015 11:04 AM, Kid Guo wrote:
> Hi Robert,
> at first thank you for your help, I have solved the problem, and now I want
> to use "sfepy/examples/multi_physics/biot.py", I suspect to add Dirichlet
> (essential) boundary conditions in the biot. Here I want to fix the bottom
> and load a press on the left facet and right facet, the press can be same
> or different, actually I want more is to load a linear function(like,P = γgh) from Top
> to Bottom along the z axis. How can I achieve it.

Check [1] - sinbc() function - it shows how to apply Dirichlet BC using a function.

r.

[1] http://sfepy.org/doc-devel/examples/diffusion/sinbc.html

Kid Guo

unread,
Jun 3, 2015, 9:41:19 AM6/3/15
to sfepy...@googlegroups.com
 at first thank you for your help, I have solved the problem.I have seen this example,sinbc()function.and I add a new function in biot.py. but it  
something wrong.
1.I added a new facet named Right and select its region.Like "'Right' : ('vertices in (x > 0.999999)', 'facet'),"
2.a new function added in biot.py. 
3.I load a stress to the left and right facet. if the stress is a constant,it worked.but when I added a new function on the left facet and another new function on the right facet,it didn't work.

r.
在 2015年5月27日星期三 UTC+8下午3:41:59,Robert Cimrman写道:

Kid Guo

unread,
Jun 3, 2015, 9:44:26 AM6/3/15
to sfepy...@googlegroups.com


在 2015年5月27日星期三 UTC+8下午3:41:59,Robert Cimrman写道:
On 05/26/2015 11:04 AM, Kid Guo wrote:
biot.py
left_pore.png
left_pore-right_1000.png
left1.png
left1right1.png
left10right1.png
left-equal-right_pore.png
left-unequal-right_pore.png

Robert Cimrman

unread,
Jun 3, 2015, 1:09:37 PM6/3/15
to sfepy...@googlegroups.com
On 06/03/2015 03:41 PM, Kid Guo wrote:
> at first thank you for your help, I have solved the problem.I have seen
> this example,sinbc()function.and I add a new function in biot.py. but it
> something wrong.
> 1.I added a new facet named Right and select its region.Like "'Right' :
> ('vertices in (x > 0.999999)', 'facet'),"
> 2.a new function added in biot.py.
> 3.I load a stress to the left and right facet. if the stress is a
> constant,it worked.but when I added a new function on the left facet and
> another new function on the right facet,it didn't work.

What exactly does not work? I am getting (with biot.py from your next message)
the linear pressure distribution in z direction on the left and right facets,
as the functions for Dirichlet conditions on pressure enforce.

BTW. what you apply is the fluid pressure in the pores. To apply a stress load
on the boundary, you would need to use the 'dw_surface_ltr' term (as in [1]),
not the Dirichlet BC on pressure.

r.
[1]
http://sfepy.org/doc-devel/examples/linear_elasticity/linear_elastic_tractions.html

Kid Guo

unread,
Jun 3, 2015, 10:28:00 PM6/3/15
to sfepy...@googlegroups.com
Maybe I can not express clearly,  I point out something that I don't understand, you will know what I mean.I put the pictures in attachment named figure 1-7.
1.From the figure 3 and figure 4.the stress is a constant,it worked.
2.From figure 2, the left boundary loaded a porewater pressure function and the right loaded a pressure--a constant equal 1000.but the figure 2 show the right pressure is 0.
3.From figure 6 and 7. if the value in two function is equal,both they are p=p2=9.8*10e3*z, it worked,we can see it from the figure 6.but if it is unequal, p2=9.8*10e2*z, the figure 7 show the right pressure is 0.

r.

Robert Cimrman

unread,
Jun 4, 2015, 5:31:31 AM6/4/15
to sfepy...@googlegroups.com
On 06/04/2015 04:27 AM, Kid Guo wrote:
> Maybe I can not express clearly, I point out something that I don't
> understand, you will know what I mean.I put the pictures in attachment
> named figure 1-7.
> 1.From the figure 3 and figure 4.the stress is a constant,it worked.

ok

> 2.From figure 2, the left boundary loaded a porewater pressure function and
> the right loaded a pressure--a constant equal 1000.but the figure 2 show
> the right pressure is 0.

No, look at the scale (range of pressure in the colorbar in
left-unequal-right_pore.png) - 1000 is about 100x smaller than the max.
pressure (about 1e5), so it looks blueish. But its blue is lighter then the
blue for the zero. Try to rerun that with a higher constant, e.g. 1e5 :)

> 3.From figure 6 and 7. if the value in two function is equal,both they are
> p=p2=9.8*10e3*z, it worked,we can see it from the figure 6.but if it is
> unequal, p2=9.8*10e2*z, the figure 7 show the right pressure is 0.

I guess it is the same here.

r.

Kid Guo

unread,
Jun 4, 2015, 9:31:20 AM6/4/15
to sfepy...@googlegroups.com
yep. you are right. thank you.

r.



--
You received this message because you are subscribed to a topic in the Google Groups "sfepy-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sfepy-devel/Vc5CeMLP1Yg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sfepy-devel...@googlegroups.com.
To post to this group, send email to sfepy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sfepy-devel.

Reply all
Reply to author
Forward
0 new messages