CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   dynamicRefineFvMesh in 2 directions (https://www.cfd-online.com/Forums/openfoam/76609-dynamicrefinefvmesh-2-directions.html)

Victor May 31, 2010 03:23

dynamicRefineFvMesh in 2 directions
 
Hallo at all,

I am trying to apply the dynamicRefineFvMesh to detonation simulations in order to increase the mesh refinement at the detonation front.
The problem is that the dynamicRefineFvMesh uses the hexRef8 code for refinement, so that the mesh is refined in all 3 dimensions. In order to decrease the number of cells it would be sufficient to refine the mesh in 2 directions.
I already tried to do through the hexRef8 code, but i do not understand what is going on there:confused:!?!

Is there anybody how has experience with this or knows how to solve this problem??

Thanks in advance for any help or hint!

Victor

pcaron June 3, 2010 14:35

Same problem here...
 
Hello Victor,

I'm working in 2D simulations, so I have both empty or wedge faces. If I use the refine option the simulation aborts. This is because, after refinement, the mesh has more than 1 element in the normal direction to the empty face.

I also tried to read hexref8, but it's to complex for me.

Maybe if an advanced user read this can help us? Please help!

I think the idea is to detect the empty direction, but I don't have the knowledge.

Regards

Pablo

AGRONOM June 7, 2010 08:29

Hi all!
The multiDirRefinement is more suitable for 2d simulations, because it allows to specify refinement directions.

I used to to make a cellSet, by choosing cells with high pressure gradient, and apply the refineMesh.

The problem is that I can't unrefine mesh (when pressure gradient decreases) due to lack of the refinement history.

pcaron June 7, 2010 09:45

Thanks agronom! I'll give it a try.

How do you create the cellSet? Do you include it into the solver?

Can you share a simple case? Maybe the cavity problem using this refine option.

Regards

Pablo

AGRONOM June 7, 2010 11:02

3 Attachment(s)
> Can you share a simple case?
But I do not guarantee that you'l find something useful in the attachment.
Running this case you should stop the solver to refine the mesh and then continue simulation.
In this case myRefineMesh is used with -dict and -time options i.e.
Code:

myRefineMesh -dict -time 3
>How do you create the cellSet? Do you include it into the solver?
mySonicFoam is a the same as sonicFoam, but for the pressure gradient is
saved in the time dir.
myRefineMesh consists of the cellSet and the refineMesh utilities, so myRefineMesh creates the cellSet, based on the pressure grad from the time dir.

pcaron June 7, 2010 12:16

Hi Agronom! This is enough information!!! It's my time to work now! :D

Thank you!!

Pablo

Victor June 28, 2010 05:46

Does anybody know, if there is a possibility to unrefine cells after using multiDirRefinement???It would be great help for me!


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