|
[Sponsors] |
[Other] Generating Mesh for a drop in another fluid |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 23, 2015, 18:04 |
Generating Mesh for a drop in another fluid
|
#1 |
Member
Join Date: Feb 2014
Posts: 34
Rep Power: 12 |
Hi All,
I am trying to solve a problem of a drop interface deformation due to body force. The drop is immersed in another fluid so it's a 2 phase flow problem. I need to resolve the interface accurately so I want to use interDyMFoam to have a adaptive fine mesh around the drop interface. But the problem now is that to generate the initial shape of the drop, I used 'sphereToCell' on an initially coarse and uniform mesh. The result is that the initial interface of the drop is not smooth enough. I don't want any 'corners' on the interface but it seems that I can't get away with it on a initially structured mesh. I'm thinking about a way to get around it. I would like to have a smoother mesh on the interface so that no sharp corners would be there at time=0. One way to do this is possibly generate the mesh by two blocks. One sphere(drop) block and the other is the domain outside. My question now is that for the domain outside the sphere, should I divide the domain manually? (I don't really want to do that!!) Are there easier ways to do that? I search the web and it seems that 'interDyMFoam' cannot be used on tetrahedral meshes? Is that still true with the latest version of OpenFOAM? I believe tetrahedral meshes can capture the interface much better (without 90 degree corners at least). I would appreciate any suggestion of how to solve my problem. Thank you all! Best, P Last edited by Prosper; April 24, 2015 at 11:09. |
|
April 23, 2015, 18:11 |
|
#2 |
Member
Join Date: Feb 2014
Posts: 34
Rep Power: 12 |
BTW, my problem is in 3D, so the drop is a 3D sphere.
|
|
April 24, 2015, 11:09 |
|
#3 |
Member
Join Date: Feb 2014
Posts: 34
Rep Power: 12 |
Any ideas?
|
|
April 27, 2015, 07:24 |
|
#4 |
Senior Member
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18 |
hello,
Adaotative meshing work fdon't work with tetrahedral cell, and tetrahedral cell will capture a bad interface anyway. What you can try is: 1) from you initial mesh, use setFields to create your liquid sphere 2) run 1 iterate with interDyMFoam => this with refine mesh at interface, but you will see a not smooth interface. 3) call setField again (re initialise) => you interface should now be more smooth 4) run ... regards, olivier |
|
April 27, 2015, 18:31 |
How to initialize values for complex shapes in tetrahedral meshes in OpenFOAM
|
#5 |
Member
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11 |
Hi Everyone,
In fact, it's quite easy to set values for arbitrarily shaped volumes in a tetrahedral mesh (or any type, for that matter) in OpenFOAM. This is the procedure I use: 1) Generate a tet mesh which respects the internal (and external, of course) boundaries that you which to capture. For this example, I set one up that consist of a cube domain with an internal volume that I wish to use to set initial values. BTW, I use tetgen to create the mesh, and I use sketchup with my preprocessor plugin (https://extensions.sketchup.com/en/c...y-tetgen-tools) to set up the geometry. The geometry looks like this (SketchUp: The mesh looks like this (GMSH): 2) Run tetgenToFoam to convert to OpenFOAM. 3) Export an stl of the internal region that you want to set values inside of, and save to the triSurface directory in your case. 4) In the topotSetDictionary, use "surfaceToCell" to create a set of all point inside. 5) Run setFields for the set you've just created. The mesh is perfectly aligned, and the cells are correctly assigned initial values (from paraview): That's how to set exact initial values. After that (time > 0) you'll have to rely on AMR to resolve the VOF interface. Hope that helps - enjoy! Peter |
|
April 28, 2015, 12:16 |
|
#6 | |
Member
Join Date: Feb 2014
Posts: 34
Rep Power: 12 |
Quote:
Thank you for your reply! I tried you method and it is working for me! I ran setFields again after 1 time step and the interface shape is much better refined. I found that I may need to do this several times and set the mesh refinement level higher to get the resolution I need. Thanks again! -P |
||
April 28, 2015, 12:24 |
|
#7 | |
Member
Join Date: Feb 2014
Posts: 34
Rep Power: 12 |
Quote:
Thank you for your reply! I'll definitely try what you did and the mesh looks really good to resolve the interface shape. When I tried block meshes I always get non-smoothness and corners on the interface. I believe if I use tetrahedral meshes there shouldn't be corners on the interface. Thanks again and I'll let you know how it goes. Best, -P |
||
June 22, 2015, 07:24 |
|
#8 |
New Member
WeiYang
Join Date: Jan 2014
Location: China
Posts: 3
Rep Power: 12 |
hello Olivier:
You have provided a good method to achieve refinement for a deformed droplet. However, it works only if run with a single core. when parallel is used, the interface is not smooth. whether you encountered this problem or not. YOUNG |
|
October 19, 2017, 03:03 |
AMR_DynamicMeshdict
|
#9 |
Member
Ali Noaman Ibrahim
Join Date: Sep 2015
Location: US_Chicago
Posts: 97
Rep Power: 11 |
Dear All:-
If I want to set up the dynamicMeshDict to refine based on alpha field (for capturing the droplet interface), do I need to modify the interDyMFoam solver ? Could you state with steps what I should do ? Thanks for any indea |
|
October 19, 2017, 03:19 |
|
#10 |
Member
Brian Willis
Join Date: Mar 2011
Location: Cape Town, South Africa
Posts: 58
Rep Power: 15 |
Dear Ali
You shouldn't have to modify interDyMFoam. The dynamic refinement class modifies the mesh based on the alpha field, i.e. where the interface is. Check the damBreakWithObstacle tutorial in the interDyMFoam examples for an example of how it works. Regards, Brian |
|
October 19, 2017, 03:27 |
|
#11 | |
Member
Ali Noaman Ibrahim
Join Date: Sep 2015
Location: US_Chicago
Posts: 97
Rep Power: 11 |
Quote:
I will look into that. But, I would like to make AMR works with moving mesh to simulate droplet on a surface with dynamic angle BCs. Therefore, I posted here to check if I am on the right track. I think I have to combine at least two classes to achieve my goal. Any comment? |
||
Tags |
interdymfoam, interface |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Question about adaptive timestepping | Guille1811 | CFX | 25 | November 12, 2017 18:38 |
[Gmsh] 2D Mesh Generation Tutorial for GMSH | aeroslacker | OpenFOAM Meshing & Mesh Conversion | 12 | January 19, 2012 04:52 |
Doxygen documentation | Tanay | OpenFOAM Installation | 9 | September 23, 2011 12:40 |
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! | sc298 | OpenFOAM Meshing & Mesh Conversion | 2 | March 27, 2011 22:11 |
Terrible Mistake In Fluid Dynamics History | Abhi | Main CFD Forum | 12 | July 8, 2002 10:11 |