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

problem while defining a new volScalarField in a new turbulence model

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 24, 2013, 03:44
Default problem while defining a new volScalarField in a new turbulence model
  #1
Member
 
Nikesh Bhattarai
Join Date: Nov 2011
Location: Sacheon, South Korea
Posts: 82
Rep Power: 14
nikesh is an unknown quantity at this point
Hii Foamers,
I am working on a new turbulence model which utilizes the basic Governing Equations of LaunderSharmaKE model. I need to modify the expression for nut. While doing so, I make use of a new term, k2e (it is a name i have given to this new variable, where k2e = sqr(k_)/epsilonTilda_ ) and in one part of the code it requires me to solve for div(phi_,k2e). I could implement all the equations and expressions in the new source code and I could also compile it successfully.
But when I try to run a case using that scheme, I get an error message::
--> FOAM FATAL IO ERROR:
[4] [8] keyword div(phi,(sqr(k)|epsilon)) is undefined in dictionary "/home/users/nikesh/Work/mvg/2-3Dflatplate-test/processor8/../system/fvSchemes::divSchemes"

I get the idea that this error is asking me to define the div(phi,k2e) term in the system/fvScheme file. I did that too.
Under the
divSchemes
I included
div(phi,k2e) Gauss upwind

And I still get the same error!
Any help is highly appreciated.
Thanks!!
nikesh
nikesh is offline   Reply With Quote

Old   January 24, 2013, 12:25
Default
  #2
Member
 
Join Date: Jun 2011
Posts: 53
Rep Power: 15
blacksquirrel is on a distinguished road
Hi Nikesh,
Include the exact keyword in your fvSchemes, so:

div(phi,(sqr(k)|epsilon)) Gauss upwind;

That should do it.
blacksquirrel is offline   Reply With Quote

Old   January 24, 2013, 21:35
Default
  #3
Member
 
Nikesh Bhattarai
Join Date: Nov 2011
Location: Sacheon, South Korea
Posts: 82
Rep Power: 14
nikesh is an unknown quantity at this point
Thnx blacksquirrel!
I had tried that option too but still wouldn't work. However good news that I managed to sort it out in another way.
I constructed and defined the function k2e_ in the source code.C file as::

k2e_
(
IOobject
(
"k2e",
runtime_.timeName(),
mesh_,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
sqr(k_)/epsilonTilda_
),

I also declared it in the header (source_code.H) file as::

volScalarField k2e_;

The expressions were then implemented and used in the part where viscosity is calculated.

And hence in the system/fvSchemes file, I could use::

divSchemes
div(phi,k2e) Gauss upwind;

I appreciate your reply though!!
Cheers!!
nikesh is offline   Reply With Quote

Reply


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
multiphaseInterFoam for RAS turbulence model chiven OpenFOAM Bugs 8 December 6, 2017 03:08
Problem with turbulence model akonduri OpenFOAM 2 September 17, 2010 01:49
Turbulence model for mixing problem??? nileshjrane Main CFD Forum 7 September 14, 2010 05:57
Centrifugal Pump and Turbulence Model Michiel CFX 12 January 25, 2010 04:20
Fan heater model: what turbulence source to use? andy20 Main CFD Forum 0 March 2, 2008 13:46


All times are GMT -4. The time now is 18:43.