
[Sponsors] 
June 28, 2005, 03:11 
I am a newbie. The current int

#1 
Member

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. 

June 28, 2005, 12:56 
I have a problem with running

#2 
Member
sergei shulepov
Join Date: Mar 2009
Posts: 37
Rep Power: 8 
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 vofscalar, 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 

June 28, 2005, 13:02 
If the mesh is properly 2D, i.

#3 
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 13 
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.


June 28, 2005, 21:57 
Dear Weller, how about my ques

#4 
Member

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. 

June 29, 2005, 06:12 
It is not trivial but possible

#5 
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 13 
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.


July 5, 2005, 12:35 
I have a rather simple questio

#6 
Member
sergei shulepov
Join Date: Mar 2009
Posts: 37
Rep Power: 8 
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 Tlike 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 10100 mu) 

July 5, 2005, 13:07 
Yes.

#7 
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 13 
Yes.


July 6, 2005, 06:48 
Henry,
Thanks for the answer

#8 
Member
sergei shulepov
Join Date: Mar 2009
Posts: 37
Rep Power: 8 
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.e10, and even lower, and finally having resolved the problems I had. Thanks 

July 6, 2005, 07:08 
Yes initialisation is a proble

#9 
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 13 
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.


July 7, 2005, 04:55 
Henry,
Thanks for the info ab

#10 
Member
sergei shulepov
Join Date: Mar 2009
Posts: 37
Rep Power: 8 
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 

July 8, 2005, 07:05 
I have been running some test

#11 
Member
sergei shulepov
Join Date: Mar 2009
Posts: 37
Rep Power: 8 
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 

July 8, 2005, 07:11 
based on all the grid cells bu

#12 
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 13 
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.


July 11, 2005, 05:26 
Henry,
Thanks for the answer

#13 
Member
sergei shulepov
Join Date: Mar 2009
Posts: 37
Rep Power: 8 
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=1e8, whereas based on the heavy phase it should be about 5e5. 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 

July 11, 2005, 09:06 
I haven't implemented anything

#14 
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 13 
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
OpenFOAM1.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, phasefraction etc. etc. But be careful it isn't only the interfacecapturing part of the solution that suffers from a Courantnumber limit, the PISO pressurevelocity 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 nearsteady with respect to the airflow 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. 

July 11, 2005, 10:20 
Henry,
Thanks, I will look at

#15 
Member
sergei shulepov
Join Date: Mar 2009
Posts: 37
Rep Power: 8 
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 waterinair 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 

July 14, 2005, 05:00 
Will it be possible to use int

#16 
New Member
Rob van Tol
Join Date: Mar 2009
Posts: 1
Rep Power: 0 
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 

July 14, 2005, 05:06 
No that is not possible, the V

#17 
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 13 
No that is not possible, the VOF method is a twofluid approach not a freesurface method.


July 20, 2005, 14:13 
Hi Henry,
I have some few que

#18 
Member
sergei shulepov
Join Date: Mar 2009
Posts: 37
Rep Power: 8 
Hi Henry,
I have some few questions related to Courant number in interFoam. I have looked at OpenFOAM1.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 

July 20, 2005, 14:35 
The gamma field is a volScalar

#19 
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 13 
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. 

July 20, 2005, 16:30 
Henry,
Thank you, this is wha

#20 
Member
sergei shulepov
Join Date: Mar 2009
Posts: 37
Rep Power: 8 
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 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
InterFoam MULES solver  jaswi  OpenFOAM Running, Solving & CFD  4  November 21, 2012 09:56 
Wmake problem interFoam solver  feijooos  OpenFOAM Running, Solving & CFD  4  December 8, 2008 12: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 