|
[Sponsors] |
June 5, 2013, 14:44 |
2D adaptive Mesh Refinement
|
#1 |
New Member
Join Date: Jan 2013
Posts: 1
Rep Power: 0 |
Hello Foamers,
i am new here. i am not sure if it is right posting my problem in this forum... i hope it is ok. I did create an adaptive mesh using dynamicRefineFvMesh. I adapted the hexRef8 class for splitting cells in 2D. Now i started my solver and the cell refinement runs good (the mesh check is OK) and now the big BUT it comes ... Always if the mesh changes the calculations will be solved in 3D, i.e. the vector of velocity is directed in the 3.dimension. And now comes sth weird. If i stop the calculation and then i re-start it from the last timestep then the calculation is correctly calculated in 2D. What is the problem, i have absolutely no idea. many thanks Last edited by Tobi; October 10, 2018 at 02:16. |
|
June 7, 2013, 04:11 |
|
#2 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25 |
dear buddy, maybe you want to share your code and one test case here, maybe we can help you to solve the problem
__________________
My Personal Website (http://nimasamkhaniani.ir/) Telegram channel (https://t.me/cfd_foam) |
|
July 17, 2013, 15:45 |
|
#3 |
Member
Haomin Yuan
Join Date: Jan 2012
Location: Madison, Wisconsin, USA
Posts: 59
Rep Power: 14 |
Hey,
As far as I know, the cut engine hexRef8 is only capable to cut cell into 8 subcells, which means it is 3 dimensions. I have seen a paper talking about cut cells in to 2 subcells, I think you look it up here: http://publications.lib.chalmers.se/...173/174173.pdf Another question is, what solver are u using? I am now trying to implement AMR into steady solver.But I met some problems. |
|
July 28, 2013, 11:04 |
|
#4 |
New Member
Johannes P
Join Date: Feb 2012
Posts: 8
Rep Power: 14 |
I'm also working on a 2D adaptive mesh refinement with a dynamicFvMesh. Does anybody have an idea whether it's good to start modifying the hexRef8 class, keeping its low-level style (which is really complicated) or if one could adapt hexRef8, keep using all its nice features and just plug in simpler mesh modification operations?
I successfully managed to do exactly the refinement I want using multiDirRefinement which gives me the type of meshes I want BUT It still lacks all the other capabilities which are needed for a dynamic mesh (like: field mapping, keeping track of the refinement history, allowing unrefinement etc.) What I'd like to do is: take hexRef8 and rewrite it partially, using the code from multiDirRefinement, thus turning it into a hexRef4 or hexRef2. Does anybody have a good idea how to start? |
|
May 31, 2016, 11:00 |
|
#5 |
Member
Join Date: Mar 2015
Posts: 36
Rep Power: 11 |
Have you seen this thesis? (http://digitalcommons.mtu.edu/cgi/vi...8&context=etds)
Especially Apendix B. It seems like the 2D adaptive mesh refinement we are looking for. |
|
July 19, 2016, 15:39 |
|
#6 |
New Member
Jakub Pola
Join Date: Feb 2011
Posts: 22
Rep Power: 15 |
Hi,
does anyone of you managed to implement the 2D engine for dynamic local mesh refinement? I'm trying to do it according to mentioned paper: [Ahmad Baniabedalruhman] http://digitalcommons.mtu.edu/etds/1005/[/URL] I'm currently struggling with the code from appendix B related to splitting of internal faces. Does anyone know how the variable anchorPointJ should be initialized? It is appearing on the page 173 when author is proposing the algorithm for splitting internal faces. Regards, Jakub. |
|
July 20, 2016, 05:46 |
|
#7 |
New Member
Join Date: May 2016
Posts: 2
Rep Power: 0 |
Hi Jakub,
I am also currently trying to get the adaptive mesh refinement to run in 2D following the Baniabedalruhman thesis. It seems to me that the modifications are neither complete nor all correct. With some modifications, I was able to compile the new library but my code crashes during the first refinement step. For the anchorPointJ I have added: label anchorPointJ = anchors.otherVertex(anchorPointI); Send me a PM if you are interested in a discussion Hannes |
|
July 21, 2016, 12:40 |
|
#8 |
New Member
Join Date: Mar 2016
Posts: 7
Rep Power: 10 |
Hi Hannes89,
I am interested in adaptive mesh refinement. I found and fixed some problems, but I still don't understand how to declare: -anchorPointJ -isDivisibleFace -isDivisibleEdge. Did you solve the problems? Could you help me? Regards, Carmelina |
|
July 21, 2016, 15:47 |
|
#9 |
New Member
Jakub Pola
Join Date: Feb 2011
Posts: 22
Rep Power: 15 |
Catelyn,
together with Hannes89, we are trying to implement this solution. You can join us if you want. The more the better On monday I will try to give you some hints regarding those variables. Regards, Jakub. |
|
July 25, 2016, 07:02 |
|
#10 |
New Member
Join Date: May 2016
Posts: 2
Rep Power: 0 |
Hi Catelyn,
the isDivisible variables should be boolean lists, holding a value for every face and edge, that can be declared like this: boolList isDivisibleFace(mesh_.nFaces(),false); boolList isDivisibleEdge(mesh_.nEdges(),false); Regarding the anchorPointJ. I am not so sure about the algorithm implemented in the PhD thesis and can not give you a definitive answer. I am currently trying to rewrite this bit of the code. Hannes |
|
July 25, 2016, 07:10 |
|
#11 |
New Member
Jakub Pola
Join Date: Feb 2011
Posts: 22
Rep Power: 15 |
Hi,
here are my thoughts regarding variables you asked.
When it comes to anchorPointJ, we don't know yet what it should be. Kuba. |
|
July 26, 2016, 06:30 |
|
#12 |
New Member
Join Date: Mar 2016
Posts: 7
Rep Power: 10 |
Thank you all,
I realized they were boolean variables but I have a too approximate knowledge in programming. I wrote to Dr. Baniabedalruhman, I'll keep you posted if I receive any answers. Catelyn |
|
November 13, 2016, 00:44 |
2d amr
|
#13 |
New Member
|
Have you succeed? , recently I also refer to Dr .Baniabedalruhman's thesis for 2D AMR, but still a lot of problems? How to define the variable of anchorPointJ ? Coud you give me some hints how to make the 2D AMR run successfully,please? Thank you.
|
|
November 14, 2016, 11:26 |
|
#14 | |
New Member
Join Date: Mar 2016
Posts: 7
Rep Power: 10 |
Quote:
Catelyn |
||
November 20, 2016, 10:47 |
|
#15 |
New Member
|
I have study the codes at Appendix B in the thesis of http://digitalcommons.mtu.edu/cgi/vi...8&context=etds. I changed the codes as the thesis suggest, but when I run my 2d heat transfer case, there's error. And I output the debug informaion, I found basically those values are right.
I find the error was occur in the function createInternalFaces ( original in file hexRef8.C for 3D ,but I change this file hexRef4.C for 2D) . The "if (edgeMidPointI==-1)" judgement ,which I think is the key problem, because for 2D problem ,the value of edgeMidPointI of empaty boundary 's edge are not -1, but the value of edgeMidPointI of internal edges are -1, so when loop the interal edge this judgement is right, it will output the wrong message,and stop the programm. So, I look into the function of storeMidPointInfo, I want to do some change, but I do not unstand its theory. I will continue to handle this problem. Is there anyone can give me some help how to sovle this problem? If I successed to run the 2D AMR , I will show the codes! |
|
November 30, 2016, 09:52 |
|
#16 |
New Member
Luca Cornolti
Join Date: Jun 2016
Location: Switzerland
Posts: 13
Rep Power: 10 |
Hi,
I recently started to work on this problem too. I tried to implement the (in)famous code described in Dr. Baniabedalruhman's thesis in Openfoam 3.2 extend, whose dynamicMesh libraries are very close to the "standard" version. As already reported, the description of the code in the thesis is quite incomplete. After some modification, I reached the same point of XuDongNa: when runiing the solver, the refinement process stops when the first cell is split as the createInternalFaces function sends an error because the edgeMidPointl is not set. Unfortunately, I don't have much time to work on this. Where you able to solve the problem? |
|
December 13, 2016, 06:19 |
|
#17 | |
Senior Member
mahdi abdollahzadeh
Join Date: Mar 2011
Location: Covilha,Portugal
Posts: 153
Rep Power: 15 |
Dear All
Here is the code and a case following the introduction of the Ahmad thesis, It doesnt run! here is the error it looks like that spilitting the faces and edges are done correctly, however, it has errors when creating the internal faces. Quote:
dynamicRefineFvMesh2D.H damBreak.zip hexRef82D.H hexRef82D.C I hope that somebody could share his successful implementation of the 2D AMR. Mahdi Last edited by mm.abdollahzadeh; December 15, 2016 at 07:54. |
||
December 15, 2016, 09:44 |
|
#18 |
New Member
Luca Cornolti
Join Date: Jun 2016
Location: Switzerland
Posts: 13
Rep Power: 10 |
Attached, you can find the code I developed.
From my tests, It seems to work well with 2D meshes. Anyway, the refining part of the code can be improved. (the code is developed for foam-extend 3.2, most of it is anyway the same of the standard OpenFOAM version). Last edited by Luca Cornolti; December 22, 2016 at 05:04. Reason: Updatings |
|
January 30, 2017, 16:50 |
|
#19 |
Member
Oleg Sutyrin
Join Date: Feb 2016
Location: Russia
Posts: 41
Rep Power: 10 |
Here is Luca Cornolti's code adapted for OpenFOAM 4.0. I've made it by line-by-line comparisons:
(original dynamicRefineFvMesh+hexRef8 for foam-extend 3.2) <-> (dynamicRefineFvMesh2D+hexRef2D for foam-extend 3.2) and (original dynamicRefineFvMesh+hexRef8 for foam-extend 3.2) <-> (original dynamicRefineFvMesh+hexRef8 for OpenFOAM 4.0). I understood only about 30% of the code, and ran only very basic tests, so cannot guarantee that everything is correct. But it seems to work OK at least in single-process mode. I also added basic support of axisymmetric 2D ("wedge" boundary condition), but cells that are directly adjacent to the symmetry axis would not refine since they are not parallelepipedal. In OpenFOAM 4.0 code structure is slightly different. Complete installation is as follows (assuming you installed OF4 into '/opt/openfoam4/'): 1. put 'dynamicRefineFvMesh2D' folder into '/opt/openfoam4/src/dynamicFvMesh/' folder; add 'dynamicRefineFvMesh2D/dynamicRefineFvMesh2D.C' line into '/opt/openfoam4/src/dynamicFvMesh/Make/files'; run 'wmake' command from 'opt/openfoam4/src/dynamicFvMesh/'; 2. put 'hexRef2D' folder into 'opt/openfoam4/src/dynamicMesh/polyTopoChange/polyTopoChange/' folder; add 'polyTopoChange/polyTopoChange/hexRef2D/hexRef2D.C' line into '/opt/openfoam4/src/dynamicMesh/Make/files'; run 'wmake' command from 'opt/openfoam4/src/dynamicMesh/'; Enjoy! Last edited by OlegSutyrin; January 31, 2017 at 04:29. |
|
February 28, 2017, 18:26 |
2D+axisy. codes
|
#20 |
New Member
Ahmad
Join Date: Dec 2016
Posts: 1
Rep Power: 0 |
2D+axisy. dynamic mesh refinement can be found in the link below.
http://faculty.yu.edu.jo/ahmad_a/Lis.../AllItems.aspx |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] SnappyHexMesh for internal Flow | vishwa | OpenFOAM Meshing & Mesh Conversion | 24 | June 27, 2016 09:54 |
[Workbench] mesh refinement of vortex tube using workbench | aqsa1590 | ANSYS Meshing & Geometry | 3 | December 25, 2014 09:57 |
[snappyHexMesh] snapEdge - failure | Tobi | OpenFOAM Meshing & Mesh Conversion | 33 | March 18, 2014 04:58 |
Mesh motion with Translation & Rotation | Doginal | CFX | 2 | January 12, 2014 07:21 |
Icemcfd 11: Loss of mesh from surface mesh option? | Joe | CFX | 2 | March 26, 2007 19:10 |