HenningScheufler / multiDimAMR

dynamic meshing with load balancing for hexahedral meshes in 3D and 2D
44 stars 23 forks source link

Can multiDimAMR expand the selected region for refine? #32 #9

Open irr77 opened 2 years ago

irr77 commented 2 years ago

Dear Henning: Sorry for disturbing you.

I use your advanced interFlow library together with multiDimAMR to refine mesh near interface. I notice that, in your provided "damBreakWithObstacle" case, there is a command "nLayer" in dynamicMeshDict which can increase number of refined cells near the interface. Because I'd like to expand the refined region outside the liquid phase, I use "nLayer" directly in the selected liquid phase. Sadly, it doesn't work, and the refined region is limited within the liquid phase, which is the same as the (not use "nLayer") one. 20220422205813

So, dear Henning, does there exist some setting I miss in your multiDimAMR which can achieve my goal? If not, could you give me some suggestion about expanding the selected region?

BTW, dear Henning, you mentioned that your code is based on the (Rettenmaier, Daniel, et al. "Load balanced 2D and 3D adaptive mesh refinement in OpenFOAM." SoftwareX 10 (2019): 100317.). I noticed that their provided code is able to refine region based on curl or gradient of some field. So, can your multiDimAMR provide similar functions?

Thank you for your attention.

Best regards

HenningScheufler commented 2 years ago

Sadly, Im currently short on time

There might be a logical bug with maxCellLevel.

This software design is different and the selection procedure should be more extensible. The idea of this library is to combine smaller classes like fieldBounds with the composedAdaptCriteria.

So if you want to have curl or grad, you would need to add a similar class to fieldBounds.

You could start by copying fieldBounds folder to e.g. fieldGrad.

If you rename the files, headers, class and typename to fieldGrad and also add it to the Make/files and finally compile it. (also see geometric in src/dynamicLoadBalanceFvMesh/adaptCriteria/)

you should be able to select a new type called fieldGrad.(https://openfoamwiki.net/index.php/OpenFOAM_guide/Use_bananas)

It should be similar to the geometric option

I would be happy to merge a pull request