CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [dRInterfaceLib] dynamicRefineFvMesh with two regions (https://www.cfd-online.com/Forums/openfoam-community-contributions/162715-dynamicrefinefvmesh-two-regions.html)

Tobi November 16, 2015 05:31

dynamicRefineFvMesh with two regions
 
1 Attachment(s)
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.

Tobi November 17, 2015 11:37

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

http://holzmann-cfd.de/images/openfo...fineFvMesh.gif

Mahmoud_aboukhedr November 25, 2015 13:12

Testing the new code
 
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

brugiere_olivier November 27, 2015 08:47

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

Tobi December 1, 2015 14:04

Quote:

Originally Posted by Mahmoud_aboukhedr (Post 574984)
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.

brugiere_olivier December 2, 2015 03:07

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

Tobi December 2, 2015 07:53

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.

jakitsch January 7, 2016 07:56

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.

tjliang February 9, 2016 12:45

Quote:

Originally Posted by Tobi (Post 573505)
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

Tobi February 13, 2016 06:30

Quote:

Originally Posted by jakitsch (Post 579918)
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

Tobi March 10, 2016 08:12

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.

dzordz July 20, 2016 09:34

Quote:

Originally Posted by Tobi (Post 573505)
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 :)

Tobi July 20, 2016 09:57

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 (:

dzordz July 20, 2016 10:12

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?

Tobi July 20, 2016 11:03

Which foam you use? The library is based on 2.3.1.

dzordz July 21, 2016 02:03

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 ?

Tobi July 21, 2016 03:33

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.

ekrumrick August 17, 2016 10:43

Broken link
 
Dear Tobias,

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

Best regards,


Ezequiel

Tobi August 17, 2016 11:59

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.

maminow January 16, 2017 05:35

protecting refined regions (created with snappy) from dynamic refinement
 
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


All times are GMT -4. The time now is 23:27.