CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[dRInterfaceLib] dynamicRefineFvMesh with two regions

Register Blogs Community New Posts Updated Threads Search

Like Tree12Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 16, 2015, 06:31
Default dynamicRefineFvMesh with two regions
  #1
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 all,

at the german Openfoam forum a colleague was asking if it is possible to simulate a multiphase case with refineFvMesh using two different parameter sets like: refine the interface twice and refine the water column in one level. Therefore I changed the dynamicRefineFvMesh in a way that you have the possibility to use two parameter sets for refining the interface and the water in two different ways. It should also be possible to use this lib with two different fields (but I did not try it). In other words, the refine method can be applied twice within one case.

It will be available today evening at my homepage: http://www.holzmann-cfd.de/index.php/en/development

You can easily check it with the tutorial in interDyMFoam -> damBreakWithObstacle. The extension is nothing special but I still want to share that work.
Attached Images
File Type: png cellLevel.png (31.2 KB, 271 views)
ekrumrick and Karl Kan like this.
__________________
Keep foaming,
Tobias Holzmann

Last edited by Tobi; September 19, 2017 at 05:25.
Tobi is offline   Reply With Quote

Old   November 17, 2015, 12:37
Default
  #2
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 all,

the lib was changed today and is now available. The name is dynamicInterfaceRefineFvMesh because you are able to handle the interface refinement and the general refinement with different parameters.

You can find all the stuff here: http://www.holzmann-cfd.de/index.php/en/development

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

Old   November 25, 2015, 14:12
Default Testing the new code
  #3
Member
 
Mahmoud Aboukhedr
Join Date: Feb 2014
Location: London
Posts: 40
Rep Power: 12
Mahmoud_aboukhedr is on a distinguished road
Dear Tobi,
I had tested your new code and it works very very good .. I will post later some results from my test case..
just a quick question, in the posted tutorials .. you had to different ways for the case setup (dynamicMeshDict) ... why is that? is it case depended? and do you recommend a generic setup?

Thanks

Mahmoud
Mahmoud_aboukhedr is offline   Reply With Quote

Old   November 27, 2015, 09:47
Default
  #4
Member
 
Brugiere Olivier
Join Date: Mar 2009
Posts: 34
Rep Power: 17
brugiere_olivier is on a distinguished road
Hello Tobias,

This is another very interesting tool that can have multiple applications.
However, I wonder how the code works in parallel. When you work in OpenFOAM, we decompose the case before starting the simulation. A cell number is allocated per processor. When remeshing, the number of cells by processors is it redistributed or is it only increases in some processors?

thank you in advance

Olivier
brugiere_olivier is offline   Reply With Quote

Old   December 1, 2015, 15:04
Default
  #5
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
Quote:
Originally Posted by Mahmoud_aboukhedr View Post
Dear Tobi,
I had tested your new code and it works very very good .. I will post later some results from my test case..
just a quick question, in the posted tutorials .. you had to different ways for the case setup (dynamicMeshDict) ... why is that? is it case depended? and do you recommend a generic setup?

Thanks

Mahmoud
Dear Mahmoud, the two tutorials are different in the way that in one tutorial you only refine the interface (that is also probably with the normal library). I wanted to demonstrate that you can handle both problems with that lib. The setup of the dynamicMeshDict has to be changed to the problem you want to solve. I am happy that it is working good for you.


@Olivier,

first thanks to the feedback and that you think it is a good tool. I would appreciate it, if someone will use the lib. To the decomposition: I don't investigate into that topic but I expect, that we will increase the number of cells only on the single processors because we are not reconstructing and decomposing again. A short test would give us the answer. If we use one of the tutorials and decompose it by two processors and run the simulation, we can check the cell number of each decomposed mesh and therefore we can really say how it is working. I expect that (if we decompose it vertically in the middle) we first get an increase in processor0 and then, after we reach processor1 cells with the fluid 1, we get an additional increase of cells on processor1.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   December 2, 2015, 04:07
Default
  #6
Member
 
Brugiere Olivier
Join Date: Mar 2009
Posts: 34
Rep Power: 17
brugiere_olivier is on a distinguished road
Hello Tobi,

I tested your tools in parallel. The behavior is the one you predict.
It is therefore difficult to use this kind of automatic refinement on more complex configurations because the calculation time is affected by the imbalance in the number of cells per processor.

Olivier
brugiere_olivier is offline   Reply With Quote

Old   December 2, 2015, 08:53
Default
  #7
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 Oliver,

thanks for the replay and the test. Hmm... maybe I would investigate into that but till now I just used the available lib. Maybe it would be nice if after a special amount of cells at one processor, we will reconstruct and decompose it again to be sure to have a balance of cells and reduce the computational costs.

Interesting topic.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   January 7, 2016, 08:56
Default
  #8
New Member
 
Victor Jakitsch
Join Date: Sep 2015
Posts: 2
Rep Power: 0
jakitsch is on a distinguished road
Hello Tobias,

I'm new to openFoam, and if possible could you tell me how to put your changes to work with a default version?
Thank you.
jakitsch is offline   Reply With Quote

Old   February 9, 2016, 13:45
Default
  #9
Member
 
Peng Liang
Join Date: Mar 2014
Posts: 60
Rep Power: 12
tjliang is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Hi all,

at the german Openfoam forum a colleague was asking if it is possible to simulate a multiphase case with refineFvMesh using two different parameter sets like: refine the interface twice and refine the water column in one level. Therefore I changed the dynamicRefineFvMesh in a way that you have the possibility to use two parameter sets for refining the interface and the water in two different ways. It should also be possible to use this lib with two different fields (but I did not try it). In other words, the refine method can be applied twice within one case.

It will be available today evening at my homepage: http://www.holzmann-cfd.de/index.php/en/development

You can easily check it with the tutorial in interDyMFoam -> damBreakWithObstacle. The extension is nothing special but I still want to share that work.
Hello Tobi,

do you know if it is possible to implement dynamic mesh refinement in chtmultiregionfoam, where the mesh are divided in multiregion. I want to make mesh refinement in fluidregion while solidregion remain unrefined. I have tried but the mesh remained unsplitted although in terminal it says mesh has been refined and unrefined. I also tried createNameddynamicFvMesh.H instead of createdynamicfvmesh.H , it seems also unuseful. For any hints i will be quite grateful.

Bests,

Peng
tjliang is offline   Reply With Quote

Old   February 13, 2016, 07:30
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
Quote:
Originally Posted by jakitsch View Post
Hello Tobias,

I'm new to openFoam, and if possible could you tell me how to put your changes to work with a default version?
Thank you.
Hey, just compare my files to the your lib-files and make the changes. Thats all. Its only c++.

@Peng: of course it is possible but it should be not as easy as single domains but just try it out. FIrst I would check if it is possible just to implement dynamic mesh class to the fluid regions and if this works, try to create a fluid region with dynamic mesh. IN that case I would prefer to make a one domain case (only fluid region). If this is working, than it is very easy, otherwise you have to spend more time in analysing and implementing the dynamic lib to cht.

Regards,
Tobi
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   March 10, 2016, 09:12
Default
  #11
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
Dear all,

today I build the standalone lib. Now you can easily compile the lib anywhere. Additionally I updated the readme file.

Thanks to stephie for the error report.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   July 20, 2016, 10:34
Default
  #12
Member
 
Join Date: May 2016
Posts: 39
Rep Power: 10
dzordz is on a distinguished road
Quote:
Originally Posted by Tobi View Post
It will be available today evening at my homepage: http://www.holzmann-cfd.de/index.php/en/development
Hello Tobi,
the webpage you provided unfortunately will now open for me. Also http://www.holzmann-cfd.de/index.php...efinefvmesh-en directLink does not work for me. Did you by any chance remove it, or am I having weird access issues?

Thanks!

Ok. Issues with German vs. English website. All fixed
dzordz is offline   Reply With Quote

Old   July 20, 2016, 10:57
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,

finally I changed the alias from development to software-development. I will check the broken link in my forwarding library.

But the link you posted works - I think even for you now (:
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   July 20, 2016, 11:12
Default
  #14
Member
 
Join Date: May 2016
Posts: 39
Rep Power: 10
dzordz is on a distinguished road
It works now, danke!

But I seem to be having problems with compiling the library. I get an error message:
/dynamicInterfaceRefineFvMesh.C:349:17: error: ‘fillSignallingNan’ is not a member of ‘Foam::sigFpe’

Any ideas where the problem lies?
dzordz is offline   Reply With Quote

Old   July 20, 2016, 12:03
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
Which foam you use? The library is based on 2.3.1.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   July 21, 2016, 03:03
Default
  #16
Member
 
Join Date: May 2016
Posts: 39
Rep Power: 10
dzordz is on a distinguished road
I have two version. First computer on Linux has v3.0+, the second has Windows 16.06. None of them work. Do you thing it is better to rewrite the code, or to install version 2.3.x ?
dzordz is offline   Reply With Quote

Old   July 21, 2016, 04:33
Default
  #17
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
As you can see in the download section of the library, its is for 2.3.1. For newer version it will not compile because due to the fact that classes and other stuff changed. So it is up to you what you want to do. In my opinion, the adaption to the latest FOAM version should be done in a few minutes.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   August 17, 2016, 11:43
Question Broken link
  #18
New Member
 
Ezequiel Krumrick
Join Date: Mar 2014
Location: Argentina
Posts: 10
Rep Power: 12
ekrumrick is on a distinguished road
Dear Tobias,

I could not download the tutorial, is it possible that the link is not working properly?

Best regards,


Ezequiel
ekrumrick is offline   Reply With Quote

Old   August 17, 2016, 12:59
Default
  #19
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
Dear Ezequiel,

there is not tutorial mentioned in that thread. The only thing that is mentioned, is the library and this link was somehow not correct displayed. If you copy-paste it, you got some crazy signs.

Thanks for reporting, I renewed it now.
ekrumrick likes this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   January 16, 2017, 06:35
Default protecting refined regions (created with snappy) from dynamic refinement
  #20
New Member
 
Join Date: Mar 2016
Posts: 4
Rep Power: 10
maminow is on a distinguished road
Hi Tobias,

I am facing a problem with dynamic refinement. I created an initial mesh with snappyHexMesh with a refined region (a channel containing liquid with a parabolic profile). The liquid will leave the channel region to the atmosphere and I aim to use the dynamic refinement using two different parameter sets (based on location inside the liquid phase or at the interface). The problem is that the interface start inside the initially refined box and this yielded to different absolute levels on the interface (inside the box and outside it). Besides, during the simulation there are always some non refined cells between the initially refined box and the outside-box region.

I have seen this: https://www.youtube.com/watch?v=u-VV3euIsXo
and I noted that your initially refined regions (with snappyHexMesh) were protected from refinement and that cells with intermediate size were refined to the needed level to have the same size of the smallest ones. So can you tell me how did you manage to do this please?

Thanks in advance
maminow 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
[snappyHexMesh] multiple regions Tobi OpenFOAM Meshing & Mesh Conversion 56 March 29, 2020 05:53
[ANSYS Meshing] ICEM CFX Primitive Regions Appearing after Smoothing syble ANSYS Meshing & Geometry 1 July 29, 2016 17:29
[CAD formats] Clean / Repair STL file with multiple regions on command line matthiasd OpenFOAM Meshing & Mesh Conversion 6 May 24, 2016 07:51
Determining the calculation sequence of the regions in multe regions calculation peterhess OpenFOAM Running, Solving & CFD 4 March 9, 2016 04:07
chtMultiRegionFoam different properties in (fluid) region(s) volker1 OpenFOAM Pre-Processing 3 February 4, 2015 07:46


All times are GMT -4. The time now is 19:05.