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

Set up RASModel in potentialFreeSurfaceFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 17, 2013, 10:01
Default Set up RASModel in potentialFreeSurfaceFoam
  #1
New Member
 
ross
Join Date: Aug 2012
Posts: 16
Rep Power: 14
rosswin is on a distinguished road
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
rosswin is offline   Reply With Quote

Old   March 17, 2013, 21:49
Default
  #2
Member
 
Amir Abbas Aliabadi
Join Date: Mar 2013
Posts: 33
Rep Power: 13
amir.a.aliabadi is on a distinguished road
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
amir.a.aliabadi is offline   Reply With Quote

Old   March 18, 2013, 06:54
Default
  #3
New Member
 
ross
Join Date: Aug 2012
Posts: 16
Rep Power: 14
rosswin is on a distinguished road
Hi aaa,

Thank you for your help.
I have looked at this file and it is commented in the pre-code 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
rosswin is offline   Reply With Quote

Old   March 18, 2013, 09:35
Default
  #4
New Member
 
ross
Join Date: Aug 2012
Posts: 16
Rep Power: 14
rosswin is on a distinguished road
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.
rosswin is offline   Reply With Quote

Old   March 18, 2013, 11:52
Default
  #5
Member
 
Amir Abbas Aliabadi
Join Date: Mar 2013
Posts: 33
Rep Power: 13
amir.a.aliabadi is on a distinguished road
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
amir.a.aliabadi is offline   Reply With Quote

Old   March 21, 2013, 07:37
Default
  #6
New Member
 
ross
Join Date: Aug 2012
Posts: 16
Rep Power: 14
rosswin is on a distinguished road
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/jLz4UJt-f8

Thank you again for your time,

Ross.
rosswin is offline   Reply With Quote

Old   March 21, 2013, 13:07
Default
  #7
Member
 
Amir Abbas Aliabadi
Join Date: Mar 2013
Posts: 33
Rep Power: 13
amir.a.aliabadi is on a distinguished road
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 non-existent 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.
amir.a.aliabadi is offline   Reply With Quote

Old   March 22, 2013, 17:18
Default
  #8
New Member
 
ross
Join Date: Aug 2012
Posts: 16
Rep Power: 14
rosswin is on a distinguished road
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
rosswin is offline   Reply With Quote

Old   March 26, 2013, 19:55
Default
  #9
Member
 
Amir Abbas Aliabadi
Join Date: Mar 2013
Posts: 33
Rep Power: 13
amir.a.aliabadi is on a distinguished road
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
amir.a.aliabadi is offline   Reply With Quote

Old   March 18, 2015, 17:50
Default
  #10
New Member
 
Join Date: Nov 2014
Posts: 11
Rep Power: 12
bizzy is on a distinguished road
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
bizzy is offline   Reply With Quote

Reply

Tags
openfoam, potentialfreesurfacefoam, rasmodel, turbulence model


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
TimeVaryingMappedFixedValue irishdave OpenFOAM Running, Solving & CFD 32 June 16, 2021 07:55
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 13:44
Install problem in linux navaladi OpenFOAM Installation 11 July 17, 2008 03:24
Ibm java gcc rrr OpenFOAM Installation 2 December 30, 2005 05:18


All times are GMT -4. The time now is 17:28.