# interFoam open channel

 Register Blogs Members List Search Today's Posts Mark Forums Read

 February 6, 2012, 16:06 interFoam open channel #1 New Member   Hossein Join Date: Feb 2012 Posts: 13 Rep Power: 6 Hello every body, I am pretty new in using of OpenFoam. I am trying to solve a problem with OpenFoam and I am using interFoam solver, laminar. However, I have problem in my inlet. I think the problem should be in inlet boundary condition. I am modeling an open channel that at the top I have a small inlet which creates a water jet that comes down from air phase into the water phase.And I do not have outlet. But when I define my boundary conditions as below: for 0/alpha1 inlet { type fixedValue; value uniform 1; } and for 0/U inlet { type fixedValue; value uniform (4 0 0); } and for 0/P_rgh { type buoyantPressure; value uniform 0; } I do not have a continuous water entry in the inlet. It looks like that at time 0 the condition is water but when the program runs it is just air in the inlet. How can I figure out this problem? If any body knows what should I do, please let me know. Because I think this is a pretty simple problem and I am missing some small items maybe in boundary conditions that I can not see a continuous water flow in my inlet. Thank you indeed in anticipation. Gildeh

 February 9, 2012, 04:51 #2 Senior Member   Nima Samkhaniani Join Date: Sep 2009 Location: Tehran, Iran Posts: 1,193 Blog Entries: 1 Rep Power: 16 Hi it seems, its something like filling a tank, am i right? whats wrong? could you put your result here?

 February 9, 2012, 06:51 #3 New Member   Hossein Join Date: Feb 2012 Posts: 13 Rep Power: 6 Hi Nima, I could resolve that problem finally. However, yes, that was about filling a tank. I have another question now: I want to model temperature convection-diffusion in my jet that is filling the tank. And I am using the interFoam solver. I think this solver solves continuity, momentum and VOF equations for flow and these are the equations that should be solved for T convection-diffusion as well (if I am wrong correct me please). So, I used http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam link that is how to add T field to icoFoam solver and could create T field in my interFoam problem. My question is that how this temperature affect the fluid density? Where should I define the density as a function of temperature for interForm solver? Because, when the jet comes into the tank with a lower temperature than the ambient water in tank (imagine a deltaT=50 degree) it should go down since its density is higher than the warmer water inside tank, but it does not!!! So, I think this temperature is not affecting the density. Do you have any idea of this? Thanks

 February 9, 2012, 09:12 #4 Senior Member   Andrea Ferrari Join Date: Dec 2010 Posts: 296 Rep Power: 8 Hi, here you can find an exhaustive thread about how to add temperature equation in interFoam. I've never tried it but maybe it could help you! Diverging result for Temperature field in interFoam regards andrea

 February 9, 2012, 18:53 #5 Senior Member   Wouter van der Meer Join Date: May 2009 Location: Elahuizen, Netherlands Posts: 146 Rep Power: 9 hi, I am no expert but I think at least you should use a compressible solver to have different densities, so interFoam in not suited for this. hope this helps, Wouter

February 10, 2012, 04:01
#6
Senior Member

Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,193
Blog Entries: 1
Rep Power: 16
Quote:
 Originally Posted by Gildeh Hi Nima, I could resolve that problem finally. However, yes, that was about filling a tank. I have another question now: I want to model temperature convection-diffusion in my jet that is filling the tank. And I am using the interFoam solver. I think this solver solves continuity, momentum and VOF equations for flow and these are the equations that should be solved for T convection-diffusion as well (if I am wrong correct me please). So, I used http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam link that is how to add T field to icoFoam solver and could create T field in my interFoam problem. My question is that how this temperature affect the fluid density? Where should I define the density as a function of temperature for interForm solver? Because, when the jet comes into the tank with a lower temperature than the ambient water in tank (imagine a deltaT=50 degree) it should go down since its density is higher than the warmer water inside tank, but it does not!!! So, I think this temperature is not affecting the density. Do you have any idea of this? Thanks
Hi dear hossein
interFoam considers both two phases as incompressible so you can not see density changes.
but in your simulation density varies with temperature, do u know how density changes with temperature?
look into compressibleInterFoam to find how to make density changeable!
but remember compressibleInterFoam is isotheram and density changes based on pressure variation

 February 13, 2012, 18:36 #8 Senior Member   Wouter van der Meer Join Date: May 2009 Location: Elahuizen, Netherlands Posts: 146 Rep Power: 9 sorry to bother you again. You mention three phases now ( heavy water, light water, air) and a changing density (so compressible) and still you want to use interFoam (two phase incompressible). regards Wouter

 February 14, 2012, 03:51 #9 Senior Member   Nima Samkhaniani Join Date: Sep 2009 Location: Tehran, Iran Posts: 1,193 Blog Entries: 1 Rep Power: 16 i think you may add some thing like Boussinesq term in your momentum term to consider the density variation due to temperature! however if you want to know the effect of temperature on turbulence model, i suggest you to look at turbulence model, in heat transfer solvers in OpenFOAM

 March 28, 2012, 11:34 Hi again #10 New Member   Hossein Join Date: Feb 2012 Posts: 13 Rep Power: 6 Dear Friends, I was pretty busy with my semester work and now come back to OF. I finally could change the boundary conditions in the dam break in order to simulate my problem by using the InterFoam. I also could change the solver as we discussed above. Now, I want to change the turbulence model and see the effect of different turbulence models. There are two directories within the Constant folder that are related to turbulence mode: 1. turbulenceProperties: that includes this line: "simulationType RASModel;" I think, here we choose the model that RASModel is in this case. 2. RASProperties: that includes these 3 lines: RASModel kEpsilon; turbulence on; printCoeffs on; And I think here, it introduces the RAS type that KEpsilon is here. Now I have these questions: 1. I want to see the other RAS types, (see all the list here http://www.openfoam.com/features/RAS.php),I am actually interesting to apply two RAS turbulence models for incompressible fluids: LRR Launder-Reece-Rodi RSTM LaunderGibsonRSTM Launder-Gibson RSTM with wall-reflection terms Now, I want to know what should I change? I guess that I have to change 2 directories out of 3 below: 1. turbulunceProperties 2. RASProperties 3. 0 1. turbulenceProperties: that includes this line: "simulationType RASModel;" I think, I should not change any thing here since the two above-mentioned models are within the RAS model. 2. RASProperties: that includes these 3 lines: RASModel kEpsilon; turbulence on; printCoeffs on; And for this directory, I believe that I should change the KEpsilon to LRR. But that should not be the only things to change. I have to create 2 (or more?!) folders for initial and boundary conditions in 0 directory (instead of k and epsilon for KEpsilon case). Now, I want to know: 1. Are the first and second steps (within turbulenceProperties and RASProperties) true as I mentioned above??!! 2. If yes, what files should I create in 0 directory for the two above-mentioned RAS models which I want to implement instead of KEpsilon model? (Now that I am using KEpsilon, there are 2 files, k and epsilon). Thank you all if you can help me. Cheers, Gildeh

 March 29, 2012, 04:36 #11 Senior Member   Join Date: Apr 2010 Posts: 151 Rep Power: 8 Indeed, you need to add these files: - constant/turbulenceProperties - constant/RASProperties - 0/k - 0/epsilon And you also have to add some lines in - system/fvSolution - system/fvSchemes Take a look at the tutorial \$FOAM_TUT/multiphase/interFoam/ras/damBreak, an interFoam RAS case.

 March 29, 2012, 05:10 #12 New Member   Pallav Jha Join Date: Apr 2011 Posts: 17 Rep Power: 7 Hi All, I am working on a similar dambreak tutorial (filling a tank). I need to alter the case file slightly and allow the water to flow for only 0.5 seconds at a velocity of 300 m/s in the -Y direction into an open tank filled with air. So I edited the inlet properties in 0/U file as follows: Code: ```// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { inlet { type fixedValue; value uniform (0 -300 0); }``` Can you please tell me what changes should I make to the inlet to add a time constraint?

 March 29, 2012, 05:58 #13 Senior Member   Andrea Ferrari Join Date: Dec 2010 Posts: 296 Rep Power: 8 Hi, You can simply use a time dependent inlet velocity boundary condition. Make a search on the forum, there are a lot of posts about that. best andrea

 March 30, 2012, 02:10 #14 New Member   Pallav Jha Join Date: Apr 2011 Posts: 17 Rep Power: 7 Thanks Andrea. Can I also just run the simulation with U (0 -300 0) for 0.5 secs and then restart the simulation from latestTime with U ( 0 0 0) ??

 March 30, 2012, 02:34 #15 Senior Member   Join Date: Apr 2010 Posts: 151 Rep Power: 8 Pallav, That is also possible. Before starting the second part of the simulation, change startTime and endTime in the controlDict.

 March 30, 2012, 03:26 #16 Senior Member   Andrea Ferrari Join Date: Dec 2010 Posts: 296 Rep Power: 8 Hi, yes you can. If you want more info about how use unsteady BC, have a look here http://albertopassalacqua.com/?p=69 (thanks to Alberto Passalacqua). best andrea

 March 30, 2012, 05:12 #17 New Member   Pallav Jha Join Date: Apr 2011 Posts: 17 Rep Power: 7 Joris and Andrea, Thanks a lot.

 June 19, 2012, 03:48 #18 Member   anonymous Join Date: Mar 2012 Posts: 45 Rep Power: 6 Hi! I'm trying to add concentration following the tutorial "how to add temperature to icoFoam", but I'm using buoyantboussinesqPimpleFoam and it doesn't work, anyone knows why?? when I do the WMAKE appears that error: make: *** [Make/linux64GccDPOpt/my_buoyantBoussinesqPimpleFoam.o] Error 1 I don't know why the file is not created...

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post ElanMorin FLUENT 4 February 25, 2015 17:26 sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 12:44 Greg Givogue OpenFOAM Programming & Development 3 March 4, 2011 18:18 mfiandor OpenFOAM Installation 2 January 25, 2010 10:50 sxhdhi OpenFOAM Running, Solving & CFD 3 May 5, 2009 21:58

All times are GMT -4. The time now is 21:29.