CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[snappyHexMesh] Boundaries condition in a sHM mesh (32770 undesired patches)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 9, 2015, 13:33
Default Boundaries condition in a sHM mesh (32770 undesired patches)
  #1
New Member
 
Join Date: Jun 2015
Location: UK
Posts: 13
Rep Power: 10
MartinBlx is on a distinguished road
Hi everyone!

I'm a newbie to OpenFOAM and I'm facing a problem when trying to run one of my first cases.

Basically what I'm aiming to do is to simulate the flow inside a curved channel. I created the CAD geometry with Inventor then exporting it in a .stl file.

I managed to mesh inside my channel using sHM but now I would like to apply boundaries conditions to it, basically a velocity inlet and oulet and the rest of the channel faces should be walls, so I could finally execute simpleFoam on my case.

But I don't know how I'm supposed to select the good faces to create the inlet and outlet patches.
And sHM created 32770 patches, called channel_patch0 etc. until channel_patch32768...

Any ideas?

Cheers
MartinBlx is offline   Reply With Quote

Old   June 9, 2015, 16:21
Default
  #2
Member
 
Alexander Bartel
Join Date: Feb 2015
Location: Germany
Posts: 97
Rep Power: 11
alexB is on a distinguished road
Hi Martin,

I have found a good tutorial for sHM https://www.youtube.com/watch?v=ObsFQUiVi1U .
I hope it helps.

regards
Alex
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
alexB is offline   Reply With Quote

Old   June 12, 2015, 08:39
Default
  #3
New Member
 
Join Date: Jun 2015
Location: UK
Posts: 13
Rep Power: 10
MartinBlx is on a distinguished road
Hi,

the tutorial helped a lot, many thanks!

However, I didn't manage to make my simulation work. When running simpleFoam on my new sHM mesh (with now boundaries on it), I get the following errror message at t=16s:

"Time = 16

DILUPBiCG: Solving for Ux, Initial residual = 0.68764051, Final residual = 0.011333324, No Iterations 19
DILUPBiCG: Solving for Uy, Initial residual = 0.68577598, Final residual = 0.0081194435, No Iterations 16
DILUPBiCG: Solving for Uz, Initial residual = 0.66073159, Final residual = 0.020511581, No Iterations 21
#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::divide(Foam::Field<double>&, double const&, Foam::UList<double> const&) at ??:?
#4 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foamerator/<Foam::fvPatchField, Foam::volMesh>(Foam::dimensioned<double> const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
#5
at ??:?
#6 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7
at ??:?
--------------------------------------------------------------------------
mpirun noticed that process rank 0 with PID 17171 on node xxxxx-All-Series exited on signal 8 (Floating point exception)."



I can't figure out what is wrong?

For my simulation, I decided to try first on a basic channel (see picture, it cannot be more simple!).

I think my problem comes from extracting the boundary regions from my original CAD model.

I used AutoDesk Inventor to design the channel. Then, I used the "slice" tool to create separately solids from the channel: an inlet, an outlet and the "middle" of the channel (so 3 new CAD files). When concatenating the three, it should give the overall channel, as it is explained in Douglas' tutorial. I try to show you what I've done in the attached picture.

I think I did this part wrong. So how am I supposed to extract these surfaces from my original CAD model? This part is not detailed in the tutorial. (I'm also a newbie to Autodesk)

regards
Martin
Attached Images
File Type: jpg channel.jpg (29.1 KB, 5 views)
MartinBlx is offline   Reply With Quote

Old   June 15, 2015, 10:16
Default
  #4
New Member
 
Join Date: Jun 2015
Location: UK
Posts: 13
Rep Power: 10
MartinBlx is on a distinguished road
Anyone?

I'm blocked with the solving of my case because of this boundary extraction issue.
MartinBlx is offline   Reply With Quote

Old   June 17, 2015, 10:11
Default
  #5
Member
 
Alexander Bartel
Join Date: Feb 2015
Location: Germany
Posts: 97
Rep Power: 11
alexB is on a distinguished road
Hi Martin,

sorry for the late reply, I was busy and lost this thread out of sight.

I could sketch how I extract the sufrace.
I built up one file of the whole volumetric body and saved it as .stl-file decoded as ASCII (because every other programm should be able to handle this format).

Then I used meshlab (freeware) and deleted everything except for the inlet surface and saved it as another .stl-file (ASCII), and so on for all other surfaces. (bit time consuming)

From then I stuck again to the tutorial.



To your picture:
if the bodies in your picture should be connected there must not be sufraces between them. So the bodies shouldn't be blocks with 6 surfaces (for me it seems like they are whole hexahedra ) .

regards
Alex
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
alexB is offline   Reply With Quote

Old   June 17, 2015, 10:28
Default
  #6
New Member
 
Join Date: Jun 2015
Location: UK
Posts: 13
Rep Power: 10
MartinBlx is on a distinguished road
Thanks for the reply, I will try to use MeshLab in the future when working with more sophisticated shapes than the basic ones.

I managed to fit to the tutorial by indeed locating my inlet and outlet in the ASCII .stl file of my hexahedra body (indeed I made a mistake when trying to identify my inlet and outlet as hexahedra). It was easy since the ASCII file gives 12 triangles (2 by faces) and the components of the normals made it easy to identify my patches.

But I think that when working with more complex solid, this method won't work because the number of triangles would be just too high. So I'll try to delete the undesired surfaces with MeshLab.
MartinBlx is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem using AMI vinz OpenFOAM Running, Solving & CFD 298 November 13, 2023 08:19
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 06:09
Mesh motion with Translation & Rotation Doginal CFX 2 January 12, 2014 06:21
[ICEM] Extruded unstructured mesh association with boundaries, volumes, etc. macfly ANSYS Meshing & Geometry 6 August 7, 2012 16:13
[Gmsh] 2D Mesh Generation Tutorial for GMSH aeroslacker OpenFOAM Meshing & Mesh Conversion 12 January 19, 2012 03:52


All times are GMT -4. The time now is 02:40.