
[Sponsors] 
March 17, 2013, 10:01 
Set up RASModel in potentialFreeSurfaceFoam

#1 
New Member
ross
Join Date: Aug 2012
Posts: 16
Rep Power: 6 
Hi,
I am using potentialFreeSurfaceFoam to model a hydrofoil in the presence of waves. I would like to run a turbulence model as my Reynolds number is in the region of 200 to 750 thousand around the hydrofoil. I am running OpenFoam 211 and Ubuntu 12.10, my mesh has been created using Gmsh. I think the kEpsilon model is the one that suits me best. However I am not sure. This is the first RASModel i will set up on my own and I have only been using OpenFoam for a couple months so I am still learning. Thank you very much for your help. Regards, Ross 

March 17, 2013, 21:49 

#2 
Member
Amir Abbas Aliabadi
Join Date: Mar 2013
Posts: 31
Rep Power: 5 
Hello Ross,
You can check if any solver is capable of RASModel by looking up the *.C and *.H files under openfoam211/applications/solvers/... Usually under createFields.H and solver.C (e.g. potentialFreeSurfaceFoam.C) you can check which turbulence model is set up. I think for this solver it is possible, but I am not an expert. If the solver takes any generic turbulence model (e.g. RAS, LES, DNS, etc...) then you should compile a new solver. Read section 3.2. of the OpenFOAM "Compiling appications and libraries" to learn how to do it. There is also an example of enabling generic turbulence model for a solver here. Just read the bottom of this Wiki: http://openfoamwiki.net/index.php/Bu...sinesqPisoFoam Good Luck and if there are any problems just post here. aaa 

March 18, 2013, 06:54 

#3 
New Member
ross
Join Date: Aug 2012
Posts: 16
Rep Power: 6 
Hi aaa,
Thank you for your help. I have looked at this file and it is commented in the precode section that it takes any generic turbulence model and that it must be selected. I thought I just had to change the case files. Just so I am clear on what I need to do. I need to modify the potentialFreeSurfaceFoam solver and then compile it as a new solver say for example potentialFreeSurfaceFoamRAS. And then run that solver on the case files. I have managed to just change the case files and run them as a turbulence model. But from what you are saying I assume all I am doing is running the same simulation in laminar again even though I have selected RASModel in turbulenceProperties. Thank you again for your help. Regards, Ross 

March 18, 2013, 09:35 

#4 
New Member
ross
Join Date: Aug 2012
Posts: 16
Rep Power: 6 
Hi aaa,
I've just been having a quick look through the sources you pointed me towards. I obviously haven't used OpenFoam that much, but from what it looks like the files contained within the potentialFreeSurfaceFoam solver have already got the turbulence models included. Do I still need to modify the solver? Also after having read documentation from OpenFoam 171 which mentioned that the turbulence model can be selected from the case directory. I assume this is only the case if the RASModel isn't included in the potentialFreeSurfaceFoam solver. I think I have already carried this out correctly, I used the pimpleFoam TJunction tutorial in the case files as an example for a RAS model. Thank you again for your help. It has given me a better understanding of the tool I am using. Regards, Ross. 

March 18, 2013, 11:52 

#5 
Member
Amir Abbas Aliabadi
Join Date: Mar 2013
Posts: 31
Rep Power: 5 
Hi Ross,
No problem at all. If the solver takes a generic turbulence model then you only need to make slight modifications in your case directory. Some examples are: constant/turbulenceProperties > simulationType RASModel; constant/RASProperties > RASModel kEpsilon; turbulence on; printCoeffs on; This is not all. You also need to include wall functions for kEpsilon model but I don't remember which tutorials implement wall functions for RASModels. Please browse some tutorials and see how those are implemented. Good Luck, aaa 

March 21, 2013, 07:37 

#6 
New Member
ross
Join Date: Aug 2012
Posts: 16
Rep Power: 6 
Hi aaa,
Thanks again. I have implemented what I think are the correct wall functions. However I am getting the very similar results for both my laminar and RAS model simulations. Even the coefficient of lift and drag are very similar. I assume that my simulations is still running in laminar. I have also worked out the y+ around my foil and it is too large to run the model directly. From what I understand This means I have to run wall functions and set my y+. Another quick question: I have run an inviscid model. I wasn't sure how to do this so I just set kinematic viscosity to 0 and the results I got are reasonable. Is this the correct way to run an inviscid model? The link below is a result of lift and drag coefficients for my 3 models. https://www.dropbox.com/sh/lrlokdrjy3yhgck/jLz4UJtf8 Thank you again for your time, Ross. 

March 21, 2013, 13:07 

#7 
Member
Amir Abbas Aliabadi
Join Date: Mar 2013
Posts: 31
Rep Power: 5 
Hello Ross,
As far as I can tell, if you have done everything recommended then the solver is not designed to run on RASModel. I just checked the very definition for potential flow in wikipedia: "In fluid dynamics, potential flow describes the velocity field as the gradient of a scalar function: the velocity potential. As a result, a potential flow is characterized by an irrotational velocity field, which is a valid approximation for several applications. The irrotationality of a potential flow is due to the curl of a gradient always being equal to zero." If there is no vorticity in a flow field, then there is no turbulence. Turbulence is actually defined by evolution of highly complicated vorticity fields of all sizes and time scales that grow and interact. If vorticity is nonexistent in a flow, it is difficult to imagine turbulence physically. I think you should investigate this further and if this is the case, then you should choose a different solver. 

March 22, 2013, 17:18 

#8 
New Member
ross
Join Date: Aug 2012
Posts: 16
Rep Power: 6 
Hi aaa,
I think I have managed to solve this issue. I had implemented the solver correctly and it was running a turbulence model. I just forgot to increase the Reynolds number of the flow so even though it was simulating RASModel it was solving for a low Re flow. It seems to work well, my model has shown vorticity and the coefficients of lift and drag have both increased. One quick question with regard to setting the Reynolds number of the flow. I know the range of Reynolds number around the hydrofoil. I am unsure of the Reynolds number in my tank. Is there a way to calculate that? Is changing kinematic viscosity (nu) the only way to change Reynolds number? Thanks for your help again. Regards, Ross 

March 26, 2013, 19:55 

#9 
Member
Amir Abbas Aliabadi
Join Date: Mar 2013
Posts: 31
Rep Power: 5 
Hello Ross,
Glad that your model is working. Regarding increasing Re number I am not sure how you have setup of your problem, but decreasing nu and increasing inlet velocity could both result in higher Re number Regards, aaa 

March 18, 2015, 17:50 

#10 
New Member
Join Date: Nov 2014
Posts: 3
Rep Power: 3 
Hello rosswin,
I am also trying to do the same and simulate a flow with potentialfreesurfacefoam but i can not handle the inlet/outlet parameters correctly, the freesurface rises ans rises. Could you maybe post your case here? Thanks in advance 

Tags 
openfoam, potentialfreesurfacefoam, rasmodel, turbulence model 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
TimeVaryingMappedFixedValue  irishdave  OpenFOAM Running, Solving & CFD  28  May 28, 2015 13:37 
Porous region set  braket  FLUENT  4  November 18, 2010 03:09 
What value shall I set for the Convergence criteria?  steventay  CFX  7  May 14, 2010 12:44 
Install problem in linux  navaladi  OpenFOAM Installation  11  July 17, 2008 02:24 
Ibm java gcc  rrr  OpenFOAM Installation  2  December 30, 2005 05:18 