CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

About interFoam solver

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 28, 2005, 03:11
Default I am a newbie. The current int
  #1
Member
 
zoujianfeng
Join Date: Mar 2009
Location: Hangzhou, China
Posts: 30
Rep Power: 17
zou_mo is on a distinguished road
Send a message via MSN to zou_mo
I am a newbie. The current interFoam solver is for incompressible fluids. Is it direct to extend this solver to compressible fluids? What should I do?

Many thanks.
zou_mo is offline   Reply With Quote

Old   June 28, 2005, 12:56
Default I have a problem with running
  #2
Member
 
sergei shulepov
Join Date: Mar 2009
Posts: 37
Rep Power: 17
sergei is on a distinguished road
I have a problem with running interFoam. Setup is similar to the damBreake case, i.e., 2D with symmetry boundaries, and walls. Mesh is generated in ICEM then exported in STAR (3.2) format (also tried with Fluent v6). The, using mesh utilities, converted to foam. paraFoam "sees" the mesh.
setGamma was compiled and ran on the case, mesh reread done, and in paraFoam I see my mesh and vof-scalar, as it should be.
When starting the solver, after reading enviromentalProperties, I get

--> FOAM FATAL ERROR : Cannot find a cell not on a constraint boundary starting from cell 0


Function: findRefCell(const polyMesh&, const label refCelli)

in file: findRefCell/findRefCell.C at line: 79.

FOAM exiting

Is it incorrect mesh I have imported, or I have somewhere missed some reference cell values?
Thanks
Sergei
sergei is offline   Reply With Quote

Old   June 28, 2005, 13:02
Default If the mesh is properly 2D, i.
  #3
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
If the mesh is properly 2D, i.e. a slab of cells 1 cell think you can use the empty patch type for the front and back rather than symmetry boundaries which will solve your problem. Look at the definition of the damBreak mesh to see how it was done there.
henry is offline   Reply With Quote

Old   June 28, 2005, 21:57
Default Dear Weller, how about my ques
  #4
Member
 
zoujianfeng
Join Date: Mar 2009
Location: Hangzhou, China
Posts: 30
Rep Power: 17
zou_mo is on a distinguished road
Send a message via MSN to zou_mo
Dear Weller, how about my question? :-) My current problem is concerning gas and heat transfer.

The VOF idea implemented in interFOam seems to be wonderful.
zou_mo is offline   Reply With Quote

Old   June 29, 2005, 06:12
Default It is not trivial but possible
  #5
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
It is not trivial but possible to extend the interFoam solver for compressible fluids. I have derived all the equations and have a formulation that should work well but I need sponsorship before I can allocate time to do the implementation, testing, FoamX setup etc. etc.
henry is offline   Reply With Quote

Old   July 5, 2005, 12:35
Default I have a rather simple questio
  #6
Member
 
sergei shulepov
Join Date: Mar 2009
Posts: 37
Rep Power: 17
sergei is on a distinguished road
I have a rather simple question (before going into more details).
In one of the test cases I am running with interFOAM, a two phase flow through a micro channel junction is simulated. There is a T-like junction, which means that I have one inlet boundary (water inflow with a given velocity), and two pressure boundaries (larger cavities). Is it correct to use Outlet (two in my case) boundary condition in FOAM, and to specify a constant value of pd at those outlets?

Thanks in advance

PS. under micro channel I understand channels where capillary effects become pronounced (let say, with typical dimensions of 10-100 mu)
sergei is offline   Reply With Quote

Old   July 5, 2005, 13:07
Default Yes.
  #7
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
Yes.
henry is offline   Reply With Quote

Old   July 6, 2005, 06:48
Default Henry, Thanks for the answer
  #8
Member
 
sergei shulepov
Join Date: Mar 2009
Posts: 37
Rep Power: 17
sergei is on a distinguished road
Henry,
Thanks for the answer in relation to the interFOAM boundary conditions.
I found that my problems were related to the initialization of the solver. It was not enough to define gamma=1 and a certain velocity at the channel inlet. A proper initialization of the flow (some few cell filled with "heavy" fluid, and velocity of the fluid)is required to run interFoam smoothly.
Unfortunately, I found similar advices (by Ali) on the forum after having spent some hour on starring at deltaT going down to some 1.e-10, and even lower, and finally having resolved the problems I had.

Thanks
sergei is offline   Reply With Quote

Old   July 6, 2005, 07:08
Default Yes initialisation is a proble
  #9
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
Yes initialisation is a problem with the current interFoam, you cannot specify an interface (gamma 0->1 transition) at an inlet, but I have managed to find a better way of handling inlets in the interFoam series of codes for the 1.2 release which fixes this problem.
henry is offline   Reply With Quote

Old   July 7, 2005, 04:55
Default Henry, Thanks for the info ab
  #10
Member
 
sergei shulepov
Join Date: Mar 2009
Posts: 37
Rep Power: 17
sergei is on a distinguished road
Henry,
Thanks for the info about initialization of interFOAM solver. According to my experience, there is a large number of problems where it is quite important.
May be some dummy iterations to get interface were(?) it should be. This seems however to be problem dependent.
It will be iteresting to see how you have solved the problem in FOAM 1.2.

Sergei
sergei is offline   Reply With Quote

Old   July 8, 2005, 07:05
Default I have been running some test
  #11
Member
 
sergei shulepov
Join Date: Mar 2009
Posts: 37
Rep Power: 17
sergei is on a distinguished road
I have been running some test with the interFOAM solver, and have a question related to the Courant number. How the maximum Courant number is calculated: based on all the grid cells or only in the cells adjacent to the sharp interface (i.e. were 0<gamma<1)?
Is it possible to choose between the options?

Thanks
Sergei
sergei is offline   Reply With Quote

Old   July 8, 2005, 07:11
Default based on all the grid cells bu
  #12
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
based on all the grid cells but for some problems it might be useful to calculate a maximum Courant number for the region around the interface which is quite easy to do.
henry is offline   Reply With Quote

Old   July 11, 2005, 05:26
Default Henry, Thanks for the answer
  #13
Member
 
sergei shulepov
Join Date: Mar 2009
Posts: 37
Rep Power: 17
sergei is on a distinguished road
Henry,
Thanks for the answer with respect to Courant number in interFOAM. That is actually what I suspected. At the moment, when the flow is driven by a "heavy" phase, performance is quite OK (like in dam breake similar cases, or pipe flow of a fluid "pressed" into a pipe). In tests with a few outlets with different pressure (i.e., when the air flow is also present), computation times are really huge, because time step becomes artificially small. In some cases I have got dt=1e-8, whereas based on the heavy phase it should be about 5e-5.
Henry, is there something to do about it, and do you have intention to implement this in 1.2 version. If not, may be you can give a hint how to do it (may be I will try, which is with my c++ programming skills really an issue).

Sergei
sergei is offline   Reply With Quote

Old   July 11, 2005, 09:06
Default I haven't implemented anything
  #14
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
I haven't implemented anything in 1.2 that will help you with this problem but there is something you can do about it yourself. Take a look at

OpenFOAM-1.1/src/cfdTools/incompressible/CourantNo.H

If you create a copy of this file into a copy of the interFoam directory you can make changes to it and compile your own version of interFoam with those changes. You can now redefine Courant number with any kind of biasing you like, interface, phase-fraction etc. etc. But be careful it isn't only the interface-capturing part of the solution that suffers from a Courant-number limit, the PISO pressure-velocity algorithm also suffers from bad convergence if the Courant number if larger than 1. You will have to play around to find out what you can get away with.

It may be that your problem is near-steady with respect to the air-flow and you could run with a much larger Courant number and still maintain sufficient accuracy. This can be acheived using a transient version of SIMPLE rather than PISO which is more expensive but more robust and doesn't formally have a Courant number limit. I have a test version of interFoam running with transient SIMPLE but it still has some and I don't have time at the moment to finish testing it create a releasable version.
henry is offline   Reply With Quote

Old   July 11, 2005, 10:20
Default Henry, Thanks, I will look at
  #15
Member
 
sergei shulepov
Join Date: Mar 2009
Posts: 37
Rep Power: 17
sergei is on a distinguished road
Henry,
Thanks, I will look at the sources, and experiment with it.
I have some experience with VOF in Star (piso) and Comet (simple). My belief is, indeed, that the behavior of PISO is more predictable. However, it is really time consuming (especially when dealing with flows of fluids of very different viscosity, for example). Here, SIMPLE should perform much better, may be because of a reason you have mentioned.
When simulating flows of water-in-air relevant to our problems, I would prefer PISO with control over the Courant number definition, because in those cases interface is still rather dynamic.

Thanks again
Sergei
sergei is offline   Reply With Quote

Old   July 14, 2005, 05:00
Default Will it be possible to use int
  #16
New Member
 
Rob van Tol
Join Date: Mar 2009
Posts: 1
Rep Power: 0
vantol is on a distinguished road
Will it be possible to use interFoam without a second fluid, i.e. simulate one fluid with a free surface in vacuum ?
If this is possible, what should I specify as properties for the second fluid ?

Kind regards,

ROB
vantol is offline   Reply With Quote

Old   July 14, 2005, 05:06
Default No that is not possible, the V
  #17
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
No that is not possible, the VOF method is a two-fluid approach not a free-surface method.
henry is offline   Reply With Quote

Old   July 20, 2005, 14:13
Default Hi Henry, I have some few que
  #18
Member
 
sergei shulepov
Join Date: Mar 2009
Posts: 37
Rep Power: 17
sergei is on a distinguished road
Hi Henry,
I have some few questions related to Courant number in interFoam. I have looked at

OpenFOAM-1.1/src/cfdTools/incompressible/CourantNo.H

as you have suggested above. Can you give me some more hints/additional explanations about gamma scalar field definition, which I can use in

max(mesh.surfaceInterpolation::deltaCoeffs()
*mag(phi)/mesh.magSf())

Specifically, how the gamma field can be defined/called to use it in the above construction.
What exactly

interface.cGamma()

means?
Thanks in advance
Sergei
sergei is offline   Reply With Quote

Old   July 20, 2005, 14:35
Default The gamma field is a volScalar
  #19
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
The gamma field is a volScalarField but you probably would rather have it interpolated onto the faces which you can do with fvc::interpolate(gamma).

interface.cGamma() simply returns the compression coefficient you specify in the fvSolution dictionary. Take a look at the interfaceProperties.[HC] files supplied with interFoam to see for yourself.
henry is offline   Reply With Quote

Old   July 20, 2005, 16:30
Default Henry, Thank you, this is wha
  #20
Member
 
sergei shulepov
Join Date: Mar 2009
Posts: 37
Rep Power: 17
sergei is on a distinguished road
Henry,
Thank you, this is what I was looking for. With interpolation it behaves now "better".
I will try a few bias function to speed up calculations, and compare it to Star with respect to the calculation time.

Thanks again
Sergei
sergei is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
InterFoam MULES solver jaswi OpenFOAM Running, Solving & CFD 6 June 21, 2022 08:46
Wmake problem interFoam solver feijooos OpenFOAM Running, Solving & CFD 4 December 8, 2008 11:01
DICPCG solver in interFoam m9819348 OpenFOAM Running, Solving & CFD 1 September 20, 2007 13:10
About interfoam solver qiu OpenFOAM Running, Solving & CFD 0 May 6, 2007 22:48
Need documentation for interFOAM solver mer OpenFOAM Running, Solving & CFD 5 May 31, 2006 12:22


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