Region dependent material property (region group number defined in mesh)

Hi Robert,
I saw this conversation with Santiago and I am having what I think a very similar problem.
I would like to define Material property based on the defined regions in meshes. In the examples I saw, the material property is always defined either as a constant or based on the coordinates stored in "coors".
For example, in the poisson with source term example[1], the load is defined as "5e5 * y coordinate". How can I define the load as say 5.5e5 for vertices inside the 'Omega_L' region, and zero outside of Omega_L, thus effectively creating a constant heat source in the middle ball? In other words, how can I get the point indices in "coors" that belong to the "Omega_L" region?
I understand that "Omega_L" in this example is defined by the "get_middle_ball" function so one can just implement that function inside the material property defining function to find which "coors" are inside the ball. However for my purpose my sources are defined as groups in the mesh, where I can retrieve the region by doing "domain.create_region(name='source_region', select='cells of group 301')".
This would be an example mesh that I would generate, where cells of group 301 correspond to a heat source with a finite heat source Q, and the rest of the space does not generate heat:
MeshVersionFormatted 2 Dimension 3 Vertices 28 0 0 0.5 1 0 0 0 2 0 1 0.5 3 ###More Vertices### Tetrahedra 48 4 8 20 21 301 18 8 6 21 301 ###More tetrahedra labelled as group 301, this is a heat source with material property A### 5 18 6 19 301 11 9 23 28 302 14 16 27 24 302 ###More tetrahedra, these have material property B### 25 13 14 24 302 End
[1] http://sfepy.org/doc-devel/examples/diffusion/poisson_functions.html
Thank you for your help!
Regards,
Bill

Hi Bill,
look at the homogenization example [1]. There is defined a material with different Young's modulus and Poisson's ratio in two distinct regions:
materials = { 'mat': ({'D': {'Ym': stiffness_from_youngpoisson(dim, 7.0e9, 0.4), 'Yc': stiffness_from_youngpoisson(dim, 70.0e9, 0.2)}},), }
where the regions are defined as
regions = { 'Ym': 'cells of group 1', 'Yc': 'cells of group 2', }
I think, that is exactly what you need.
Regards, Vladimir
[1] http://sfepy.org/doc-devel/examples/homogenization/linear_homogenization.py
On 3.5.2018 23:03, null null wrote:
Hi Robert,
I saw this conversation with Santiago and I am having what I think a very similar problem.
I would like to define Material property based on the defined regions in meshes. In the examples I saw, the material property is always defined either as a constant or based on the coordinates stored in "coors".
For example, in the poisson with source term example[1], the load is defined as "5e5 * y coordinate". How can I define the load as say 5.5e5 for vertices inside the 'Omega_L' region, and zero outside of Omega_L, thus effectively creating a constant heat source in the middle ball? In other words, how can I get the point indices in "coors" that belong to the "Omega_L" region?
I understand that "Omega_L" in this example is defined by the "get_middle_ball" function so one can just implement that function inside the material property defining function to find which "coors" are inside the ball. However for my purpose my sources are defined as groups in the mesh, where I can retrieve the region by doing "domain.create_region(name='source_region', select='cells of group 301')".
This would be an example mesh that I would generate, where cells of group 301 correspond to a heat source with a finite heat source Q, and the rest of the space does not generate heat:
MeshVersionFormatted 2 Dimension 3 Vertices 28 0 0 0.5 1 0 0 0 2 0 1 0.5 3 ###More Vertices### Tetrahedra 48 4 8 20 21 301 18 8 6 21 301 ###More tetrahedra labelled as group 301, this is a heat source with material property A### 5 18 6 19 301 11 9 23 28 302 14 16 27 24 302 ###More tetrahedra, these have material property B### 25 13 14 24 302 End
[1] http://sfepy.org/doc-devel/examples/diffusion/poisson_functions.html
Thank you for your help!
Regards,
Bill
SfePy mailing list sfepy@python.org https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/
participants (3)
-
Bill Sze
-
null null
-
Vladimír Lukeš