CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (http://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   dynamic mesh in 2 dimension (http://www.cfd-online.com/Forums/openfoam-meshing/124152-dynamic-mesh-2-dimension.html)

seju September 28, 2013 07:16

dynamic mesh in 2 dimension
 
hi,
Can I do dynamicMesh in 2 dimension?:confused:

wyldckat September 28, 2013 11:35

Greetings seju,

Have a look into the tutorial "incompressible/pimpleDyMFoam/movingCone".

Best regards,
Bruno

seju September 28, 2013 17:51

Quote:

Originally Posted by wyldckat (Post 454057)
Greetings seju,

Have a look into the tutorial "incompressible/pimpleDyMFoam/movingCone".

Best regards,
Bruno

------------------------------------------------------------------------
tnx Mr. Bruno
I saw it, but its 3 dimension.
I want do dynamicMesh in 2 dimension in interFoam.Is it possible?:o

nimasam September 29, 2013 03:22

Hello Sajad
it seems you are looking for adaptive mesh refinement (AMR) for 2D case,
well it is not included in OpenFOAM, it only refines mesh in 3D hexahedral mesh.
so you have two Options:

1- write your own code based on existing one, look at following address
http://publications.lib.chalmers.se/...173/174173.pdf

2- consider your front and back patch not empty;), for example symmetryPlane, then using present AMR (your geometry will also be refined in the third direction)

wyldckat September 29, 2013 04:15

Greetings to all!

@Sajad: Nima is correct. I pointed to that tutorial of the "movingCone", because even though it uses the wedge feature for simulating only a small part of a 3D axisymmetrical geometry, it can easily be transformed to a 2D model, by the standards of OpenFOAM, as explained in the very first tutorial on the User Guide: http://www.openfoam.org/docs/user/cavity.php

And I remembered just now that there are two specific 2D tutorials using interDyMFoam:
Code:

multiphase/interDyMFoam/ras/sloshingTank2D
multiphase/interDyMFoam/ras/sloshingTank2D3DoF

Best regards,
Bruno

seju September 30, 2013 05:25

Quote:

Originally Posted by nimasam (Post 454102)
Hello Sajad
it seems you are looking for adaptive mesh refinement (AMR) for 2D case,
well it is not included in OpenFOAM, it only refines mesh in 3D hexahedral mesh.
so you have two Options:

1- write your own code based on existing one, look at following address
http://publications.lib.chalmers.se/...173/174173.pdf

2- consider your front and back patch not empty;), for example symmetryPlane, then using present AMR (your geometry will also be refined in the third direction)

thank you Mr sam.Im trying to do it.;):rolleyes:

seju September 30, 2013 05:31

Quote:

Originally Posted by wyldckat (Post 454108)
Greetings to all!

@Sajad: Nima is correct. I pointed to that tutorial of the "movingCone", because even though it uses the wedge feature for simulating only a small part of a 3D axisymmetrical geometry, it can easily be transformed to a 2D model, by the standards of OpenFOAM, as explained in the very first tutorial on the User Guide: http://www.openfoam.org/docs/user/cavity.php

And I remembered just now that there are two specific 2D tutorials using interDyMFoam:
Code:

multiphase/interDyMFoam/ras/sloshingTank2D
multiphase/interDyMFoam/ras/sloshingTank2D3DoF

Best regards,
Bruno

thank you so much mr santos.

atoof November 10, 2014 08:30

Quote:

Originally Posted by wyldckat (Post 454108)
Greetings to all!

@Sajad: Nima is correct. I pointed to that tutorial of the "movingCone", because even though it uses the wedge feature for simulating only a small part of a 3D axisymmetrical geometry, it can easily be transformed to a 2D model, by the standards of OpenFOAM, as explained in the very first tutorial on the User Guide: http://www.openfoam.org/docs/user/cavity.php

And I remembered just now that there are two specific 2D tutorials using interDyMFoam:
Code:

multiphase/interDyMFoam/ras/sloshingTank2D
multiphase/interDyMFoam/ras/sloshingTank2D3DoF

Best regards,
Bruno

Dear Bruno,

Is it possible to use extrudeMesh utility after each refinement to remove cells in 3rd direction for adaptive refinement method?

Perhaps we can write a script to do that.

Hossein

wyldckat November 10, 2014 17:35

Quote:

Originally Posted by atoof (Post 518327)
Is it possible to use extrudeMesh utility after each refinement to remove cells in 3rd direction for adaptive refinement method?

Quick answer - It depends:
  1. More details would make it easier to answer you.
  2. extrudeMesh usually cannot be used within a solver. But it can be used between using meshing utilities.
  3. The only adaptive refinement method that comes to mind is the one that is exemplified in the tutorial "multiphase/interDyMFoam/ras/damBreakWithObstacle". In such a situation, extrudeMesh is not advisable, because this dynamic meshing strategy relies on being able to undo the refinement operation.
    • The only solution I think of is that you would have to create your own dynamicRefineFvMesh class, which would be able to handle pseudo-2D meshes.

atoof November 10, 2014 23:47

Quote:

Originally Posted by wyldckat (Post 518412)
Quick answer - It depends:
  1. More details would make it easier to answer you.
  2. extrudeMesh usually cannot be used within a solver. But it can be used between using meshing utilities.
  3. The only adaptive refinement method that comes to mind is the one that is exemplified in the tutorial "multiphase/interDyMFoam/ras/damBreakWithObstacle". In such a situation, extrudeMesh is not advisable, because this dynamic meshing strategy relies on being able to undo the refinement operation.
    • The only solution I think of is that you would have to create your own dynamicRefineFvMesh class, which would be able to handle pseudo-2D meshes.

Thanks Bruno for your suggestion. Actually I've modified the solver reactingFoam where mesh refines adaptively in the flame region (reactingDymFoam). As you know, simulation of reacting flows needs high computational cost when the number of species increase. I am running a 2D case and I need to remove the cells refined in the 3rd direction when the refinement is done.
I think that we could extrude the mesh after updating it (for refinement) in the solver without creating new dynamicRefineFvMesh class, don't you?

wyldckat April 6, 2015 14:56

1 Attachment(s)
Hi Hossein,

Sorry for the really late reply, but only today did I finally manage to come back to your post.

Quote:

Originally Posted by atoof (Post 518442)
I think that we could extrude the mesh after updating it (for refinement) in the solver without creating new dynamicRefineFvMesh class, don't you?

In theory, yes, because it's digital and in the digital world everything is possible.

But in practice, I'm not convinced that extruding the mesh would be the best approach. As I've written in my previous post, the dynamicRefineFvMesh class was designed for 3D refinement and therefore you will need a special handling for 2D meshes. Not only that, but you would also need a variant of the class hexRef8, which would be named "hexRef4" (divide twice over X and Y).

I was curious about this and I've attached a test case based on the tutorial "multiphase/interDyMFoam/ras/damBreakWithObstacle" (from OpenFOAM 2.3.x), but configured for 2D. It crashes at 0.38s, probably because of some liquid that wanted to exit the domain... anyway, this is a good basis for getting started with a 2D variant of dynamicRefineFvMesh.

Best regards,
Bruno


All times are GMT -4. The time now is 22:11.