CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   InterDyMFoam dynamic refinement (https://www.cfd-online.com/Forums/openfoam-solving/58015-interdymfoam-dynamic-refinement.html)

ala January 30, 2009 08:49

hallo all, i am student and n
 
hallo all,
i am student and new at/in (?) OpenFOAM

i am just trying my first case in OpenFOAM
(surface tension of a water , in a square, with contact angle with and
without gravity)
solver: interFoam

so, it's all really pretty
at yet i just want to deal with interDyMFoam and dynamic refinement.
in 3D its all ok,
but i have no idea how can i dynamic refine in 2D

i get following error:


Starting time loop

Courant Number mean: 0 max: 0
deltaT = 0.001
Time = 0.001

Selected 56 cells for refinement out of 5400.
Refined from 5400 to 5792 cells.
Selected 0 split points out of a possible 56.
Execution time for mesh.update() = 0.18 s


This mesh contains patches of type empty but is not 1D or 2D
by virtue of the fact that the number of faces of this
empty patch is not divisible by the number of cells.

From function emptyFvPatchField<type>::updateCoeffs()
in file fields/fvPatchFields/constraint/empty/emptyFvPatchField.C at
line 148.

FOAM exiting

Thanks in advance. Greetings, Ala

dmoroian January 30, 2009 09:39

Hello Ala and welcome, The ab
 
Hello Ala and welcome,
The above message says that you have few boundary surfaces set as "empty", but your domain is not one cell thick. You will have to change the "empty" to something else like "wall".
Also, try to use the search feature of this forum, since there are many people that encountered the same problem.

I hope this is helpful,
Dragos

ala January 31, 2009 08:56

Hello Dragos, first of all
 
Hello Dragos,

first of all thank you very much for your reply.

I followed your approach and changed the empty boundary surfaces to wall.
Unfortunately it seems that the changes didn't have an effect.
InterDyMFoam still refined my mesh in 3D.
I have a really simple mesh. See my blockMeshDict:

vertices
(
( 0 0 0 )
( 2 0 0 )
( 2 4 0 )
( 0 4 0 )
( 0 0 1 )
( 2 0 1 )
( 2 4 1 )
( 0 4 1 )
);

blocks
(
hex ( 0 1 2 3 4 5 6 7 ) ( 16 32 1 ) simpleGrading ( 1 1 1 )
);

edges
(
);

patches
(
wall leftWall
(
( 0 3 7 4 )
)

wall rightWall
(
( 1 2 6 5 )
)

wall lowerWall
(
( 0 4 5 1 )
)

wall emptyWalls
(
( 0 1 2 3 )
( 4 5 6 7 )
)

patch atmosphere
(
( 3 2 6 7 )
)
);

mergePatchPairs
(
);


At the 0 directory I have changed the patch emptyWall as follows :

gamma -> zeroGradient, pd -> zeroGradient, U -> fixedValue, value ( 0 0 0 ).

After a few seconds of simulation InterDyMFoam still refined the mesh in 3D, also at walls with one cell thickness. How can I do it, that InterDyMFoam just refines the mesh in 2D? And not 3D! (Cmp. the pictures below).

I also used the search of the OpenFOAM forum but I did not find something that helped on! Any hints are welcome!

Thanks,
Ala

Mesh before: http://www.cfd-online.com/OpenFOAM_D...your_image.gif and the mesh afterwards: http://www.cfd-online.com/OpenFOAM_D...your_image.gif

ala January 31, 2009 09:08

Sorry, there was an error whil
 
Sorry, there was an error while uploading the pictures from my last post. Here are the two pictures:
Mesh before: http://www.cfd-online.com/OpenFOAM_D...es/1/10908.jpg and the mesh afterwards: http://www.cfd-online.com/OpenFOAM_D...es/1/10909.jpg

olwi February 1, 2009 16:25

Hi Ala, The dynamic mesh cl
 
Hi Ala,

The dynamic mesh class used in interDyMFoam handles only refinement in 3D. When a hexahedron is refined, it is split in eight. Always. Note that the same hex splitter is used in the snappyHexMesh mesh generator, which consequently will always give you a 3D mesh.

To make the dynamic mesh class refine/coarsen in 2D, someone would have to develop a new algorithm which does the cell and edge splitting only in two directions. That is certainly possible, but I have not heard of anyone spending time on it. I think it takes quite some experience and knowledge to do it. And time. Or finance Icon or OpenCFD to do it.

Depending on what you want to do, you might look at the (older?) approach of the refineMesh utility. It works in 2D as well, but it is not meant to run during the simulation. Maybe you could hack a solver of your own to do the refinement action between time steps, but I don't think this is a trivial task, either.

Good luck!

Ola

luther June 23, 2009 05:11

2D mesh refinement
 
Hi All,

Has this issue been resolved by someone? I would also like to be able to run Dynamic mesh refinement in a 2D case.

Please let me know if anyone has been able to accomplish this.

Regards
Luther

waynezw0618 June 23, 2009 05:36

empty to symmetry
 
Hi

i also face the same problem .
so i set the empty to symmetry plane.

wayne

luther June 23, 2009 05:40

hi Wayne,

Thank you. Will try it.

Do you perhaps know what the implications is on computation time changing empty to symmetry?

Regards
Luther

waynezw0618 June 23, 2009 05:55

I am sorry i don`t..i try this for we do 2D case in CFX is setting this face to symmetry and i think it will restrict something.but it also split the mesh in these direction


Quote:

Originally Posted by luther (Post 220163)
hi Wayne,

Thank you. Will try it.

Do you perhaps know what the implications is on computation time changing empty to symmetry?

Regards
Luther


Brunno April 11, 2010 13:40

Problem with dynamicRefineFvMesh
 
Hello,
I am also trying to employ the dynamic mesh refinement tool. It works fine for any mesh generated by blockMesh; whenever I try to run a case whose mesh was created by snappyHM I get the following error:

Only call if constructed with history capability#0 Foam::error::printStack(Foam::Ostream&) in "/home/brunno/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/brunno/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 Foam::hexRef8::getSplitPoints() const in "/home/brunno/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libdynamicMesh.so"
#3 Foam::dynamicRefineFvMesh::selectUnrefinePoints(do uble, Foam::PackedList<1u> const&, Foam::Field<double> const&) const in "/home/brunno/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libdynamicFvMesh.so"
#4 Foam::dynamicRefineFvMesh::update() in "/home/brunno/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libdynamicFvMesh.so"
#5 main in "/home/brunno/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/interDyMFoam"
#6 __libc_start_main in "/lib/libc.so.6"
#7 _start at /usr/src/packages/BUILD/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:116


From function hexRef8::getSplitPoints()
in file polyTopoChange/polyTopoChange/hexRef8.C at line 4873.

FOAM aborting

Aborted

Has anyone faced this problem before ?

Victor June 28, 2010 06:17

Hi at all,
I'm also looking for dynamicrefineMesh for 2D!
Does anybody have a solution for this? I tried to understand the code but its dufficult for me....
Thanks a lot in advance!
Victor

stainboy July 19, 2016 03:59

Hi,

I know that this is quite old but for others I recommend this paper regarding 2D local dynamic mesh refinement.

http://digitalcommons.mtu.edu/cgi/vi...8&context=etds

It describes the idea and gives example implementation in OpenFOAM.

anraw September 28, 2016 18:51

Quote:

Originally Posted by stainboy (Post 610181)
Hi,

I know that this is quite old but for others I recommend this paper regarding 2D local dynamic mesh refinement.

http://digitalcommons.mtu.edu/cgi/vi...8&context=etds

It describes the idea and gives example implementation in OpenFOAM.

Excellent! Took a look through it and it's exactly what I need to decrease the calculation time of my jet break up simulation. I hope the author publishes the files on git hub..hint hint


All times are GMT -4. The time now is 05:10.