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

[snappyHexMesh] Pump simulation: multi-region snappyHexMesh

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By linnemann
  • 1 Post By me3840

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 22, 2017, 13:33
Question Pump simulation: multi-region snappyHexMesh
  #1
Senior Member
 
kandelabr's Avatar
 
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9
kandelabr is on a distinguished road
Hello,

I'm following the Turbomachinery CFD's tutorial for a pump simulation: http://www.cfdsupport.com/Turbomachi...l/node159.html

I'm having trouble with merging meshes. There are three separate meshes, suction pipe, rotating impeller and volute with outlet pipe.

The tutorial simply does this:
Code:
cp -r mesh-impeller mesh-whole
cd mesh-whole
mergeMeshes . ../mesh-inlet
mergeMeshes . ../mesh-volute
The problem I'm having is that mergeMeshes creates separate 0 1 2 files for each merge so I end up with two different meshes instead of a single merged one (one with impeller-inlet and one with impeller-outlet, but not one with inlet-impeller-outlet).

Is there something I'm missing?

Thanks in advance.
kandelabr is offline   Reply With Quote

Old   April 24, 2017, 08:37
Default
  #2
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27
linnemann will become famous soon enough
use "-overwrite" as an option to mergemeshes
KaLium likes this.
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Old   April 24, 2017, 11:00
Default
  #3
Senior Member
 
kandelabr's Avatar
 
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9
kandelabr is on a distinguished road
oh, i see. didn't notice it in the "-help" text.

thanks!
kandelabr is offline   Reply With Quote

Old   May 6, 2017, 09:44
Default
  #4
Senior Member
 
kandelabr's Avatar
 
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9
kandelabr is on a distinguished road
Speaking of...

Is there a tutorial or something that would explain how to do a single-region approach? I guess the multiRegionFeatureSnap would come in handy for AMI meshing?
kandelabr is offline   Reply With Quote

Old   May 26, 2017, 19:31
Default
  #5
Senior Member
 
Join Date: Nov 2010
Location: USA
Posts: 1,232
Rep Power: 24
me3840 is on a distinguished road
IMO you should almost never use snappy to make multi region meshes. It's buggy and you can't get prism layers without running it twice. It's just easier to mesh two geometries.
linnemann likes this.
me3840 is offline   Reply With Quote

Old   May 29, 2017, 05:01
Default
  #6
Senior Member
 
KaLium's Avatar
 
Kal-El
Join Date: Apr 2017
Location: Finland
Posts: 150
Rep Power: 9
KaLium is on a distinguished road
Can you make single mesh, while using several locationsInMesh?

I only do fluent simulation, so I don't know if this works for you.
KaLium is offline   Reply With Quote

Old   May 29, 2017, 05:36
Default
  #7
Senior Member
 
kandelabr's Avatar
 
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9
kandelabr is on a distinguished road
Hello,

I am still wrestling with that one mesh of mine and I have come to a few conclusions:
  • snappy doesn't work well with sharp edges no matter what refinement level I choose. it works best with no refinement at all.
  • also (high) refinement is not good for AMI because there's quickly a cell that gets a zero weight and causes a floating point error. I separated patches that need refinement from AMI patches so that there's one non-refined patch in between.
  • so in spirit of two points above, it's important that base mesh is as dense as possible, which that blockMesh quickly eats up whole 32 GB of my RAM and game is over. so it's better to make meshes piece by piece.

anyway, thanks for your suggestions, but i'm seriously thinking of dumping snappy and using something else.

if anyone has an idea what that 'else' could be, i'll be glad to hear about it.
kandelabr is offline   Reply With Quote

Old   May 29, 2017, 08:00
Default
  #8
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hello Nejc,

I cannot agree to any of your points related to snappyHexMesh. I agree that you can have a lot of troubles with that tool but if you know how to use it, you can do many things. Referring to the topic / geometry you want to simulate, I already did something like that (and I always use snappyHexMesh):

- ACMI FAN (even more complex)
https://www.youtube.com/watch?v=ZsdoAQ9hQUM

- AMI Turbine with 6-DOF
https://www.youtube.com/watch?v=x6nj...PzWHt3lU_M93hf

- AMI with Arbitrary geometry
https://www.youtube.com/watch?v=NlTs...M93hf&index=10

- AMI for centrifugal fan
https://www.youtube.com/watch?v=wlK1...M93hf&index=26

If I check your first link in post #1, the geometry looks not too complicated. I suppose that your are using sHM somehow not correct. However, I just wanted to give you a few examples that it is definetely working and that your statements related to snappyHexMesh are not correct. Just one single point - Layer generation in sHM is terrible and also other things that could be improved like:

- Speed
- Memory allocation
- Layer generation
- Improving or switching to defined cell types

But for your problem there is no argument against to use sHM.
__________________
Keep foaming,
Tobias Holzmann

Last edited by Tobi; May 29, 2017 at 12:51.
Tobi is offline   Reply With Quote

Old   May 29, 2017, 10:37
Default
  #9
Senior Member
 
kandelabr's Avatar
 
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9
kandelabr is on a distinguished road
@Tobi:
your cases are impressive, but not very helpful to me
I'm sure Snappy can do many things but I'm getting tired of trying thousands of combinations of settings that fail to make a good mesh. No matter what refinement and base mesh density I choose, the sharp edges are always chipped and I always get spots of insane pressure there.

The problem is that I have no idea what will work and why and there are no useful tips or user-friendly documentation so all that's left to a beginner is a trial-and-error approach which obviously takes a bit too long.

Here's my latest random attempt at snappy alchemy: https://drive.google.com/open?id=0Bx...XZJck9wSWJNdjg
I don't expect you to save the day but I'd appreciate a comment or two

Thanks!
kandelabr is offline   Reply With Quote

Old   May 29, 2017, 12:50
Default
  #10
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
I am on the way home but you can check out some AMI tutorials that I made (www.holzmann-cfd.de).
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   June 5, 2017, 15:22
Default
  #11
Senior Member
 
kandelabr's Avatar
 
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9
kandelabr is on a distinguished road
Quote:
Originally Posted by Tobi View Post
I am on the way home but you can check out some AMI tutorials that I made (www.holzmann-cfd.de).
I took some time to try another few dozen different cases, taking exactly the same settings as in your tutorials but with different background mesh density but very few of them yielded anything marginally useful.

I got rid of sharp corners by rounding them with a small radius. The mesh does get a little smoother on those spots now but not enough, my cases always fail in the same way.

Adding layers would probably help a little but that's another story... Mostly a sad one...

The only difference between my geometry and yours is that you export from Salome as a single STL file with regions but I export groups as separate geometries. Can this have any influence?

Thanks again!
kandelabr is offline   Reply With Quote

Old   June 15, 2017, 08:04
Default
  #12
Senior Member
 
kandelabr's Avatar
 
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9
kandelabr is on a distinguished road
After two months or so I'm running out of ideas.
This is my whole 'mesh' case:

https://drive.google.com/open?id=0Bx...XZJck9wSWJNdjg

I'd appreciate if someone could take a few minutes and run this thing. It's configured to extract surface features, decompose to 4 processors and run snappyHexMesh in parallel. It requires ~4GB of RAM and ~5 minutes to finish on my i7.

The problem is that it always generates a few skewed faces that wreak havoc during calculation. Also edges aren't covered well.

Anyone, willing to try his/her luck? I have no idea what's wrong with my settings, if there's anything wrong at all. I figured out sharp edges were a problem so I chamfered them (which is very wrong IMO, it should be the other way round, create mesh to match geometry )

Thanks!
kandelabr is offline   Reply With Quote

Old   June 15, 2017, 11:45
Default
  #13
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

right now I am sitting at the airport Eindhoven (Netherlands) and checking your case. Unfortunately my lapatop has not enough memory so I run into swaping. What I already checked out:

  • Feature edges - wall.eMesh and blades.eMesh has almost the same edges. I would expect that both are not 100% equal and thus you can get problems. Unfortunately I do not have blender installed either so I cannot check it.
  • The triangulation of the surface is good, so I would expect that you do not have any problem here, so here is no problem.
  • I tried to understand the set-up of your simulation but I do not get it (AMI?)
  • The background mesh - your intension is nice but snappy will just hate you for that - the background mesh should be pure cube cells. Maybe you can add aspect ratio but the best way is to have a pure cube background mesh. As you already have skewness and nonorthogonality, The algorithm of sHM will not work as you would expect.
So change that and you will be much happier. However, I guess I will make the case next week and push it to my website

Good luck.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   June 16, 2017, 04:08
Default
  #14
Senior Member
 
kandelabr's Avatar
 
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9
kandelabr is on a distinguished road
There are two blockMesh dicts and i'm using the 'cube' version since I already found out snappy doesn't like anything else but yes, it was a good idea in the beginning.

This case is for meshing only, AMI gets added with createPatch in another case. Here I'm just trying to mesh a not-too-complicated shape.

I'm using Netgen 1D-2D in Salome and check 'limit size by surface curvature' and it works very well.

Now I'm testing your statement about .eMesh files; I'm leaving out all edge files but the most critical (AMI surfaces). So far it really does work better, but there's some more tweaking to be done.

@Tobi:
Thank you very much for your time and tips, you seem to be a busy man indeed Have you ever considered getting something like this: https://ko-fi.com/ ?
kandelabr is offline   Reply With Quote

Old   June 16, 2017, 07:30
Default
  #15
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Oh I did not checked out your folders. Based on the fact that you did not provide any bash script which runs the whole stuff, I just thought typing:

Code:
blockMesh
surfaceFeatureExtract
surfaceFeatureConv ... 
-> checking everything
is enough and it was actually enough yesterday during the stay at the airport. However, I can check the things out next week, when I am back to austria and my desktop pc. Just one thing which could be a tweaking in your case. The backgroundmesh should not fit exactly to any patch at your geometry. What I mean is that if you have a patch (outlet) which is really aligned with one patch of the background mesh, this can make trouble. To get rid of that, you just have to extend the backgroundmesh size of a few promille. I hope you get the point.

To your other statement, about getting money for my work. Yes, I was thinking about that but if I do so, noone will check out my stuff anymore. It was like with my book. At the beginning I just wanted to know who is downloading it and required an registration to my website. However, a few days later people where asking why they have to register to my website. After that I decided to have open access to all of my work (if I publish it).

Good luck and I am happy that the eMesh stuff is already helping. What you can do in addition. Transform your eMesh to an object file, load it in blender and check if you have doubles in points and lines and if so, remove them. Save it again and then convert the obj to eMesh again or directly use the obj file within snappyHexMesh.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   June 20, 2017, 02:21
Default same results
  #16
Member
 
王莹
Join Date: May 2017
Posts: 51
Rep Power: 9
Alisa_W is on a distinguished road
Hello, I used a MRFZone in simpleFoam to simulate a impeller of a pump(I think this part may be the most important one) and there are some strange phenomenon I want to discuss with you.
The pressure of inlet is higher than that of outlet .At first I thought this is caused by the rotating direction so I changed the direction to the opposite one but much to my surprise, nothing happened-even the distribution of U and p.
Attached Images
File Type: jpg 2017-06-20 12-17-57????.jpg (95.3 KB, 67 views)
Alisa_W is offline   Reply With Quote

Old   June 20, 2017, 03:28
Default
  #17
Senior Member
 
kandelabr's Avatar
 
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9
kandelabr is on a distinguished road
I have exactly the same problem. Your pressure values are too high, i guess you dont have a pump that outputs 13500 bar. I think you have a problem with your mesh just like i do, but I'm still solving mine, so can't help you much...

Sent from my MotoE2(4G-LTE) using CFD Online Forum mobile app
__________________
www.damogranlabs.com
kandelabr is offline   Reply With Quote

Old   June 20, 2017, 07:21
Default
  #18
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

I have no idea about the pressures in such an device but based on Bernoulli I would expect to have lower pressure at the outlet than at the inlet because the velocity is higher thus the pressure should drop. Just as an hint. Maybe, if you would extend your domain, than you should have higher pressure afterwards. As far as I know in that topic (normal water power plants with pelton or similar), we have an diffusor after the pump in order to slow down the fluid and increase the pressure which helps also for cavitating, right? But as I said, I have no expertise in that topic.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   July 9, 2017, 15:19
Default snappyHexMesh of baffle blades
  #19
Member
 
Join Date: Sep 2016
Posts: 63
Rep Power: 10
sitajeje is on a distinguished road
Dear Tobi,

Thank you very much first of all for your websites! I use solidworks to create the step file, and then salome to create groups in geometry, mesh them, export stl files, and combine them together with your codes. I appreciate your tutorials greatly!

I hope you have time to take a look at my case with the link below. I need to mesh a axial fan, whose blades are so thin that I must use baffle. The background mesh is cylindrical, because I read on some other threads that it is good for cylindrical geometry.

https://drive.google.com/open?id=0B8...mVJZm80ZnVlMmc

The problem is that, if I use a coarse background mesh, and refine the features and refinementSurfaces with higher levels, the cylindrical surface as well as the intersection of the baffle blades and the cylindrical surface become uneven. This leads to high k value in computation. I notice that the unevenness is less if the levels of the cylindrical surface, the baffle blades and their edges are the same. But if their levels are all 2 instead of 1, the unevenness still exists. The only thing I can do is to refine the background mesh so massively that it results in 1.4M cells.

I used the suggestions of the following link, and got quite a few skewed cells.
https://www.cfd-online.com/Forums/op...tml#post433024

I wonder whether you have some methods to reduce the cell number. Thank you very much in advance!

Could you please share this tutorial on your website? It is very impressive for me, since I need to compute similar cases of active cooling. Thank you very much in advance!

- ACMI FAN (even more complex)
https://www.youtube.com/watch?v=ZsdoAQ9hQUM

Best regards,
sitajeje
Attached Images
File Type: jpg BaffleBlades.jpg (165.6 KB, 41 views)
sitajeje is offline   Reply With Quote

Reply

Tags
mergemeshes, multi-region approach, snappyhexmesh


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
Negative initial temperature error (chtMultiRegionFoam) jebin OpenFOAM Pre-Processing 60 July 17, 2022 06:10
Problem with chtMultiregionFoam radiation boundary condition baran_foam OpenFOAM Running, Solving & CFD 10 December 17, 2019 18:36
What is proper boundary condition to model Pump inlet in a multiphase simulation? shivasluzz CFX 3 June 26, 2017 20:15
conjugate heat transfer in OpenFOAM skuznet OpenFOAM Running, Solving & CFD 99 March 16, 2017 06:07
[snappyHexMesh] snappyHexMesh on a multiple region blockMesh blais.bruno OpenFOAM Meshing & Mesh Conversion 1 February 17, 2015 06:40


All times are GMT -4. The time now is 22:17.