×

Notice

The forum is in read only mode.

creating groups of faces for openfoam boundary conditions

  • Nicky
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
15 years 9 months ago #3201 by Nicky
I have the following problem: I created a mesh out of a face and then extruded it one cell thick to be able to solve it with openfoam. I've been told that is the right way to solve 2D in openfoam. My problem is that in order to have the boundary conditions i have to create groups of faces for inlet, outlet, etc but I can't as my geometry is a face and not a volume so I can't select the whole outlet faces, for example, once i've extruded the mesh. I can select the faces manually, one by one, but that won't help cause it won't work for other cases.

I thought I could mesh the extruded face instead of just the face and then extrude the mesh but if I do that I don't know how to mesh it just one cell thick.

any ideas of how to solve this? Thanks!
More
15 years 9 months ago #3209 by Joël Cugnoni
You can achieve what you want if you create an extrusion mesh.

Try do the following:
1) Create a volume by extrusion of your 2D domain (face => volume) in the Geometry module, define group of faces for boundary conditions: inlet, outlet, wall, symm. You will also need a group of all edges in the "extrusion" direction (=side edges = the edges on which you want only 1 element) and a group of faces corresponding to your initial face (=the source face) and a second group of faces corresponding to its "translated image" after extrusion (the "destination" face).
2) In Mesh module: create a mesh with:
- 1D algo=Wire discretization, 1D hypothesis: average length (=global mesh size)
- 2D algo=quadrangle
- 3D algo=extrusion
validate but do not compute mesh yet : it will fail.
3) Create a submesh on the "side edges":
- 1D algo = Wire discretization, hypothesis: number of element = 1
4) if you want, create submeshes to define refinements on the edges of your "source face"
5) Create a submesh on your "source" face:
- 2D algo = triangle or Netgen 2D
6) Create a submesh on your "destination" face
-2D algo = projection 2D, hypothesis: select the "Source" of the projection = your "source face", leave the rest empty.

Now you should be able to compute the mesh without error. Extrusion meshing is a bit tedious, but it should always work when :
1) the "source" and "destination" 2D face mesh are identical
2) the "side" faces are meshed with a structured grid of quadrangles (= side faces must have exactly 4 edges!)

You can find also a tutorial on the wiki: www.caelinux.org/wiki/index.php/Doc:CAET...nd_Extrusion_meshing

Joël Cugnoni - a.k.a admin
www.caelinux.com
  • Nicky
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
15 years 9 months ago #3214 by Nicky
i've been trying to do this but I can't get it right. When you say "you will also need a group of all edges in the "extrusion" direction", do you mean all the faces on the side? At the beginning I did a group of edges but in the tutorial you posted what it does is get the group of faces on the sides so now I'm confused about that point.

also, I assume that when you say "number of element=1" in the third step you are talking about the hypothesis "nb.segments".

Thanks again for your help!
  • Nicky
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
15 years 9 months ago #3215 by Nicky
it worked! :woohoo:

I did it again with group of edges, as you said and not faces, and nb.segments=1 and it works! :lol:

in the tutorial it creates the same group for source and destination and it creates the same submesh for both of them. is that ok too?
  • Nicky
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
15 years 9 months ago #3216 by Nicky
and now, if I want to refine the mesh around the walls or around the aerofoil, should i create a submesh on the edges? when I was doing it in 2D I was taking the edge around the aerofoil. Now should I take the edge on the source aerofoil and the edge on the destination aerofoil, create a group with them and use that group for the submesh?
  • Nicky
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
15 years 9 months ago #3222 by Nicky
i've been trying to do refinements as you said in step 4 but it gives me an error if I just take the edge on the source face. If i create a group with the edge on the source and the destination and do the submesh on that then it computes ok.
Moderators: catux
Time to create page: 0.160 seconds
Powered by Kunena Forum