[MOAB-dev] Neumann boundary condition

Iulian Grindeanu iulian at mcs.anl.gov
Wed Dec 11 16:56:35 CST 2013


----- Original Message -----

| So, as i can understand, any value of NEUMANN_SET tag corresponds to
| some certain rule implemented in solver
the value is set by the user, but used by the solver. What solver do you use? for moab, the value is just an integer, and should be unique for each set, but it is not mandatory. It is really just a way to group and differentiate boundary conditions; 

| I've got one more question - having only nodes and hexagonals in .h5m
| mesh file, what is the best way to find and store the opposite face
| from the neighbouring cell for each hexagonal's face?
hexagons? I assume you mean hexahedra, because you are asking about "faces". A hexagon is 2d, it has only one face, in moab terms. 
a hexahedron has 6 faces. 

a hexahedron can have though 6 neighbors, with which shares a face (unless it is on the boundary). 
Again, I don't understand the question, what do you need? 
from each hexahedron, you get the connected vertices with get_connectivity; you can get adjacent faces with get_adjacencies method. 

Opposing face to what? 
A common face between 2 hexagons can be found with get_adjacencies method too, something like this: 
std::vector<EntityHandle> adjacencies, from_entities = {hex1, hex2}; 
// generate common face between these 2 hexas, if it exists 
mb->get_adjacencies( from_entities, 2, 2, true, adjacencies, Interface::INTERSECT); 

// adjacencies.size() should be 1 (or 0 , if the hexes for not share a face) 

Iulian 

| Thanks

| On Wed, 11 Dec 2013 15:25:00 -0600 (CST), Iulian Grindeanu wrote:
| | p { margin: 0; }
| 
| | programmatically?
| 
| | a neumann set in moab is usually a set of boundary faces (quads in
| | a
| | hexahedral mesh, or triangles in a tetrahedral mesh)
| 
| | what kind of solver do you have?
| 
| | if you know the tag value, you can obtain the set that has that tag
| | value, with something like
| 
| | Range neumann_sets;
| 
| | Tag neu_tag;
| 
| | int value_neumann_tag= 100; // your value, set it accordingly
| 

| | mb->tag_get_handle(NEUMANN_SET_TAG_NAME, neu_tag, 1,
| | MB_TYPE_INTEGER);
| 
| | mb->get_entities_by_type_and_tag(0, MBENTITYSET, &neu_tag,
| | &value_neumann_tag, 1, neumann_sets);
| 

| | neumann_sets[0] should be your set.
| 

| | then you can get entities from it with
| 
| | Range entities;
| 
| | mb->get_entities_by_handle(neumann_sets[0], entities);
| 

| | Entities should be your quads or triangles. it is up to the
| | specific
| | solver syntax to set pressure on them (or other BCs)
| 

| | Maybe I didn't understand your question
| 

| | Iulian
| 

| | | Hello MOAB-dev,
| | 
| 

| | | Can you please explain how can i set a certain Neumann boundary
| | | condition
| | 
| 
| | | for selected set of faces via NEUMANN_SET tag?
| | 
| 

| | | For example the normal derivative of pressure
| | 
| 

| | | Thanks
| | 
| 
| | | Anton
| | 
| 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20131211/7d4b574c/attachment.html>


More information about the moab-dev mailing list