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/)
-   -   interFoam (with fine mesh) vs interDyMFoam (https://www.cfd-online.com/Forums/openfoam-solving/169887-interfoam-fine-mesh-vs-interdymfoam.html)

AnasCFD April 19, 2016 12:54

interFoam (with fine mesh) vs interDyMFoam
 
2 Attachment(s)
Hi guys,

I am stucking with one case and hope that any expert can give me an advice.

I am running a 2D liquid curtain flow case. When I use interFoam on a base mesh with local refinement (using refineMesh for the region of interest) I get different results than when I use interDyMFoam on the same Base mesh (or even on the already refined one). interFoam gave me a stable long curtain as obtained by ANSYS-polyflow and as expted from theory. On the other hand the interDyMFoam solver gave an unstable curtain.

I am using the following schemes:
div(rhoPhi,U) Gauss limitedLinearV 1;
div(phi,alpha) Gauss linearUpwind cellMDLimited Gauss linear 1;
div(phirb,alpha) Gauss interfaceCompression;
I have also tried other schemes.

Pictures of the results are attached

Attachment 46800

Attachment 46801

Xinze April 27, 2016 06:18

Please check if the turbulence model remains the same for interFoam and interDyMFoam.

xz

AnasCFD April 27, 2016 06:45

Many thanks Xinze,

My case is laminar.

Tobi April 27, 2016 06:51

It should remain, why should there be changes in the turbulence model?
Normally the dynamic mesh lib allows to modify the mesh and due to mesh motion/change we have to introduce "mesh-fluxes" that should be zero if we have no mesh motion.

Finally it is zero because I build a shrinkage model based on dynamic meshes and therefore I had to check the mesh fluxes. In any case, interesting phenomena and we should check it.

Maybe the mesh-flux introduce somehow (due to numerical errors) a flow that will establish some non-physical behavior. Another problem could be boundaries.

Could you provide the case?

PS: Which FOAM version you are using?

maminow May 10, 2016 13:01

problem with running interDyMFoam in a similar case
 
1 Attachment(s)
Hi Tobi,
I am trying to simulate a similar case (2D water curtain surrounded by air), and I am encountering some difficulties to do it properly. First, I used interFoam (2.4.0) with a refined region (which contain the liquid), but I observed non physical oscillations on the free surface. So I desactivated the compression coefficient (calpha=0), and it worked but the interface was diiffused over 5 cells for each side of the curtain. I thought that the best solution to this type of problem is refining around the interface (in my case waves are important and the compression term is causing problems because of the non physical oscillations). The difficulty is that we don't know the exact position of it (I have taken gravity into account which means that its thickness is varying with altitude). So, what I tryed was first to obtain the stationary shape of it with interfoam (with a simple refined box in the middle of my initial uniformly meshed domain), and I am now aiming to do a second simulation based on the shape that I have obtained. Well, there might be several ways to do it, but because I am new in OpenFOAM, I am trying to finish it this way: use the final result obtained to do a quick simulation with interDyMFoam with a refinement on the interface zone just to obtain the mesh refined around the stationary shape of interface, then using the new mesh with interFoam to obtain the new stationary sharp interface (which shoud not necessarely be very different from the first one but who knows). Now, I am facing a problem with the second step (when I run interDyMFoam), it shows me this error:

--> FOAM FATAL ERROR:
Number of cells in mesh:280224 does not equal size of cellLevel:8321568
This might be because of a restart with inconsistent cellLevel.

From function hexRef8::getLevel0EdgeLength() const
in file polyTopoChange/polyTopoChange/hexRef8.C at line 358.

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::error::abort() at ??:?
#2 Foam::hexRef8::getLevel0EdgeLength() const at ??:?
#3 Foam::hexRef8::hexRef8(Foam::polyMesh const&, bool) at ??:?
#4 Foam::dynamicRefineFvMesh::dynamicRefineFvMesh(Foa m::IOobject const&) at ??:?
#5 Foam::dynamicFvMesh::addIOobjectConstructorToTable <Foam::dynamicRefineFvMesh>::New(Foam::IOobject const&) at ??:?
#6 Foam::dynamicFvMesh::New(Foam::IOobject const&) at ??:?
#7 ? at ??:?
#8 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#9 ? at ??:?

This is my case attached below (I gave you the initial state before step1 because it's not heavy). You can find all details in the runofoam file and Thanks a lot for any suggestion :)




Quote:

Originally Posted by Tobi (Post 596941)
It should remain, why should there be changes in the turbulence model?
Normally the dynamic mesh lib allows to modify the mesh and due to mesh motion/change we have to introduce "mesh-fluxes" that should be zero if we have no mesh motion.

Finally it is zero because I build a shrinkage model based on dynamic meshes and therefore I had to check the mesh fluxes. In any case, interesting phenomena and we should check it.

Maybe the mesh-flux introduce somehow (due to numerical errors) a flow that will establish some non-physical behavior. Another problem could be boundaries.

Could you provide the case?

PS: Which FOAM version you are using?


Tobi May 10, 2016 13:16

I have no time for checking your case.
But due to your error message:

Quote:

--> FOAM FATAL ERROR:
Number of cells in mesh:280224 does not equal size of cellLevel:8321568
This might be because of a restart with inconsistent cellLevel.
Remove the cellLevels and pointLevels files in constant/polyMesh.
Check it out again. Normally you should be fine then.


All times are GMT -4. The time now is 19:01.