CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Deep modification of turbulence model

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 4, 2012, 13:49
Default Deep modification of turbulence model
  #1
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi all,

I am currently working in porous media flow with free surface using a customized interFoam (OF2.1.0). So far the model has proven to be stable, but it runs for laminar turbulence model. Now I have to modify kEpsilon to add the closure terms needed. In order to do so I have to make kEpsilon to accept another field (porosity) at the time of creation, but that is kind of a secondary question for now.

As a first step I am trying to eliminate the unwanted functions e.g. R(), as I will only be using the model for myInterFoam. I changed the name of the model to kEpsilonPor and it compiles flawlessly. Then I removed all the references to R() in kEpsilonPor.H and kEpsilonPor.C and it did not compile.

To proceed I changed "files" and "options" from Make folder:
files
Code:
kEpsilonPor.C

LIB = $(FOAM_USER_LIBBIN)/libPorousRASModels
options
Code:
EXE_INC = \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I$(LIB_SRC)/meshTools/lnInclude

LIB_LIBS = \
    -lincompressibleTurbulenceModel \
    -lfiniteVolume \
    -lmeshTools
and copied several files to the folder, in order to modify them: RASModel.C, RASModel.H, transportModel.C, transportModel.H, turbulenceModel.C, turbulenceModel.H, backwardsCompatibilityWallFunctions.C, backwardsCompatibilityWallFunctions.H and backwardsCompatibilityWallFunctionsTemplates.C.

Everything compiles well, getting rid of the mentioned references to R() in RASModel.C, RASModel.H and turbulenceModel.H.

The problem is that when I run any case using the new turbulence model I keep getting:

Code:
kEpsilonPorCoeffs
{
    Cmu             0.09;
    C1              1.44;
    C2              1.92;
    sigmaEps        1.3;
}
time step after time step, not only the first one, as expected.

Any hints on what could be happening and how to fix it?

Thanks

Pablo
Phicau is offline   Reply With Quote

Old   April 9, 2012, 06:57
Default
  #2
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Kind of solved:

http://www.cfd-online.com/Forums/ope...-buoyancy.html
Phicau is offline   Reply With Quote

Old   January 29, 2013, 11:18
Default
  #3
Member
 
Join Date: Oct 2011
Posts: 37
Rep Power: 15
Peter Müller is on a distinguished road
Hi everybody

In the createFields of my solver I create a pointer on an RASModel named turbulence (same as for example in the createFields of simpleFoam). My problem is that I would like to access the name of the turbulence model. I'm using OF2.1.x. In other versions this was possible with turbulence->typeModel() but this is no more available.
Do you have any suggestions?

Thanks in advance
Peter Müller is offline   Reply With Quote

Reply

Tags
openfoam, 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
Adding a Turbulence Model doug OpenFOAM Running, Solving & CFD 11 May 21, 2018 14:54
KOmega Turbulence model from wwwopenFOAMWikinet philippose OpenFOAM Running, Solving & CFD 30 August 4, 2010 11:26
question about turbulence model selection and sensitivity karananand Main CFD Forum 1 February 26, 2010 05:41
Turbulence Model Modification and Implement qtian OpenFOAM Running, Solving & CFD 1 January 25, 2009 07:53
v2-f turbulence model in CFX? flga CFX 14 November 23, 2006 07:12


All times are GMT -4. The time now is 15:42.