CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

interFoam open channel

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 6, 2012, 16:06
Default interFoam open channel
  #1
New Member
 
Hossein
Join Date: Feb 2012
Posts: 13
Rep Power: 5
Gildeh is on a distinguished road
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
Gildeh is offline   Reply With Quote

Old   February 9, 2012, 04:51
Default
  #2
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,124
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
Hi
it seems, its something like filling a tank, am i right?
whats wrong?
could you put your result here?
nimasam is offline   Reply With Quote

Old   February 9, 2012, 06:51
Default
  #3
New Member
 
Hossein
Join Date: Feb 2012
Posts: 13
Rep Power: 5
Gildeh is on a distinguished road
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
Gildeh is offline   Reply With Quote

Old   February 9, 2012, 09:12
Default
  #4
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 275
Rep Power: 7
Andrea_85 is on a distinguished road
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
Andrea_85 is offline   Reply With Quote

Old   February 9, 2012, 18:53
Default
  #5
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 131
Rep Power: 8
wouter is on a distinguished road
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
wouter is offline   Reply With Quote

Old   February 10, 2012, 04:01
Default
  #6
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,124
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
Quote:
Originally Posted by Gildeh View Post
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
nimasam is offline   Reply With Quote

Old   February 13, 2012, 16:36
Default Hi Andrea, Wouter and Nima
  #7
New Member
 
Hossein
Join Date: Feb 2012
Posts: 13
Rep Power: 5
Gildeh is on a distinguished road
Thank you all for your responses. I was sick for a while and could not check here.
Andrea: thank you very much for this thread. I just looked at that and I should follow the procedures.
Wouter: My problem is an incompressible problem. In fact I have a stationary water with a specified temperature in the tank that another fluid with different temp. is coming into the tank from inlet, so the density of this fluid is different from that in the tank (density=function(T)). However, this is just an extra term in momentum equation that controls the density differences (this is buoyancy term in momentum equation).
Nima: Yes. I have a formula for my density that is a function of temperature and I can implement this equation in my solver that I am working on. But my question is (see below please):
All: Now, I added a field as T (for temperature) but I added this as a scalar that I think it is not correct. Because temperature will affect the turbulent flows. I am using RANS model (k-e model) in interFoam.
So, now I have the density formula as a function of temperature and I know where I should insert this formula in the solver. But, do not know how to add the temperature field in order to see its influence on the turbulence model. In face, now I am just considering the temperature as a scalar that diffusion-advection equation is being solved for that.
Please let me know if you have any idea. And I have to go and read the thread which Andrea mentioned here.

Thanks again.
Gildeh
Gildeh is offline   Reply With Quote

Old   February 13, 2012, 18:36
Default
  #8
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 131
Rep Power: 8
wouter is on a distinguished road
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
wouter is offline   Reply With Quote

Old   February 14, 2012, 03:51
Default
  #9
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,124
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
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
nimasam is offline   Reply With Quote

Old   March 28, 2012, 11:34
Exclamation Hi again
  #10
New Member
 
Hossein
Join Date: Feb 2012
Posts: 13
Rep Power: 5
Gildeh is on a distinguished road
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
Gildeh is offline   Reply With Quote

Old   March 29, 2012, 04:36
Default
  #11
Senior Member
 
Join Date: Apr 2010
Posts: 151
Rep Power: 7
flowris is on a distinguished road
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.
flowris is offline   Reply With Quote

Old   March 29, 2012, 05:10
Default
  #12
New Member
 
Pallav Jha
Join Date: Apr 2011
Posts: 17
Rep Power: 6
Pallav is on a distinguished road
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?
Pallav is offline   Reply With Quote

Old   March 29, 2012, 05:58
Default
  #13
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 275
Rep Power: 7
Andrea_85 is on a distinguished road
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
Andrea_85 is offline   Reply With Quote

Old   March 30, 2012, 02:10
Default
  #14
New Member
 
Pallav Jha
Join Date: Apr 2011
Posts: 17
Rep Power: 6
Pallav is on a distinguished road
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) ??
Pallav is offline   Reply With Quote

Old   March 30, 2012, 02:34
Default
  #15
Senior Member
 
Join Date: Apr 2010
Posts: 151
Rep Power: 7
flowris is on a distinguished road
Pallav,

That is also possible. Before starting the second part of the simulation, change startTime and endTime in the controlDict.
flowris is offline   Reply With Quote

Old   March 30, 2012, 03:26
Default
  #16
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 275
Rep Power: 7
Andrea_85 is on a distinguished road
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
Andrea_85 is offline   Reply With Quote

Old   March 30, 2012, 05:12
Default
  #17
New Member
 
Pallav Jha
Join Date: Apr 2011
Posts: 17
Rep Power: 6
Pallav is on a distinguished road
Joris and Andrea,

Thanks a lot.
Pallav is offline   Reply With Quote

Old   June 19, 2012, 03:48
Default
  #18
Member
 
anonymous
Join Date: Mar 2012
Posts: 45
Rep Power: 5
libia87 is on a distinguished road
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...
libia87 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open Channel Flow ElanMorin FLUENT 4 February 25, 2015 17:26
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 12:44
pisoFoam compiling error with OF 1.7.1 on MAC OSX Greg Givogue OpenFOAM Programming & Development 3 March 4, 2011 18:18
Problem installing on Ubuntu 9.10 -> 'Cannot open : No such file or directory' mfiandor OpenFOAM Installation 2 January 25, 2010 10:50
Open Channel Flow using InterFoam type solver sxhdhi OpenFOAM Running, Solving & CFD 3 May 5, 2009 21:58


All times are GMT -4. The time now is 03:58.