CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

variable CMU for kEpsilon model

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By Sugajen

LinkBack Thread Tools Search this Thread Display Modes
Old   August 1, 2017, 10:54
Default variable CMU for kEpsilon model
Vedamt Chittlangia
Join Date: Feb 2016
Posts: 64
Rep Power: 6
vcvedant is an unknown quantity at this point

I want to change change C_\mu for kEpsilon model and define it as a local variable for the whole domain.
So, \nu_t = C_\mu \frac{k^2}{\varepsilon} would remain same but
C_\mu = f(x,y)

Currently it is defined as dimensionedScalar. I am thinking that first I should define it as volScalarField and then do the changes.
I would appreciate any help and guidance.

vcvedant is offline   Reply With Quote

Old   August 1, 2017, 20:03
Join Date: Jan 2012
Location: Tempe, USA
Posts: 52
Rep Power: 11
Sugajen is on a distinguished road
Hi Vedamt,

I have not worked with Turbulence models but I can suggest a general way to proceed.

As you said couple of things need to be done.
1. Remove the cMu variable as a diemnsionedScalar from createFields.H and instead create a scalarField similar to P. And initialize to say zero.
Info<< "Creating field cMu\n" << endl;
volScalarField cMu
    dimensionedScalar("cMu", dimensionSet(0,0,0,0,0,0,0), scalar(0.0))   // give proper dimensions
2. Now write code to give values to the cMu field both internal field and boundary.
forAll ( mesh.C(), cellI) 
cMu[cellI] = // your code here

forAll (mesh.boundaryMesh(), patchI)
    forAll(mesh.boundaryMesh()[patchI], faceI)
         cMu.boundaryField()[patchI][faceI] = //your code here
3. Then use it for anywhere else
4. Also do remove the value from transportProperties of case/constant/ if it is being read from that file.

vcvedant likes this.
Sugajen is offline   Reply With Quote


kepsilon, turbulent viscosity, volscalarfield

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
CFX - Bingham Model with yield stess variable with temperature annagoco ANSYS 1 July 16, 2019 16:26
NEW turbulence TRANSITIONAL model giammy92 OpenFOAM 3 June 30, 2016 09:47
coalChemistryFoam: "Foam::error::printStack(Foam::Ostream&) at ??:?" musabai OpenFOAM Running, Solving & CFD 2 February 20, 2015 14:07
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00
K - epsilon VS SST turbulence model Maicol Main CFD Forum 0 November 30, 2012 16:25

All times are GMT -4. The time now is 01:02.