|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Hossein
Join Date: Feb 2012
Posts: 13
Rep Power: 14 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Hossein
Join Date: Feb 2012
Posts: 13
Rep Power: 14 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16 ![]() |
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! http://www.cfd-online.com/Forums/ope...interfoam.html regards andrea |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Senior Member
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 18 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#6 | |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24 ![]() |
Quote:
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 |
||
![]() |
![]() |
![]() |
![]() |
#7 |
New Member
Hossein
Join Date: Feb 2012
Posts: 13
Rep Power: 14 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#8 |
Senior Member
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 18 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#9 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24 ![]() |
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
|
|
![]() |
![]() |
![]() |
![]() |
#10 |
New Member
Hossein
Join Date: Feb 2012
Posts: 13
Rep Power: 14 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#11 |
Senior Member
Join Date: Apr 2010
Posts: 151
Rep Power: 16 ![]() |
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. |
|
![]() |
![]() |
![]() |
![]() |
#12 |
New Member
Pallav Jha
Join Date: Apr 2011
Posts: 17
Rep Power: 15 ![]() |
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? |
|
![]() |
![]() |
![]() |
![]() |
#13 |
Senior Member
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#14 |
New Member
Pallav Jha
Join Date: Apr 2011
Posts: 17
Rep Power: 15 ![]() |
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) ?? |
|
![]() |
![]() |
![]() |
![]() |
#15 |
Senior Member
Join Date: Apr 2010
Posts: 151
Rep Power: 16 ![]() |
Pallav,
That is also possible. Before starting the second part of the simulation, change startTime and endTime in the controlDict. |
|
![]() |
![]() |
![]() |
![]() |
#16 |
Senior Member
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#17 |
New Member
Pallav Jha
Join Date: Apr 2011
Posts: 17
Rep Power: 15 ![]() |
Joris and Andrea,
Thanks a lot. |
|
![]() |
![]() |
![]() |
![]() |
#18 |
Member
anonymous
Join Date: Mar 2012
Posts: 45
Rep Power: 14 ![]() |
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 | Thread Starter | Forum | Replies | Last Post |
Open Channel Flow | ElanMorin | FLUENT | 4 | February 25, 2015 16:26 |
"parabolicVelocity" in OpenFoam 2.1.0 ? | sawyer86 | OpenFOAM Running, Solving & CFD | 21 | February 7, 2012 11:44 |
pisoFoam compiling error with OF 1.7.1 on MAC OSX | Greg Givogue | OpenFOAM Programming & Development | 3 | March 4, 2011 17:18 |
Problem installing on Ubuntu 9.10 -> 'Cannot open : No such file or directory' | mfiandor | OpenFOAM Installation | 2 | January 25, 2010 09:50 |
Open Channel Flow using InterFoam type solver | sxhdhi | OpenFOAM Running, Solving & CFD | 3 | May 5, 2009 21:58 |