CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Programming & Development

how to implement Cmu changing with mesh coordinates

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

LinkBack Thread Tools Display Modes
Old   December 3, 2013, 06:21
Default how to implement Cmu changing with mesh coordinates
New Member
Join Date: Aug 2011
Posts: 15
Rep Power: 6 is on a distinguished road
I need to make the constant Cmu in kEpsilon turbulence model in OpenFOAM-2.2.1 to change with height like this :


in which uStar D1 D2 z0 are predefined constants,and z is the z-coordinate of the mesh. I have tried it like this in the *.C file of myKEpsilon model:

and in the *.H file i declared Cmu_ as the volScalarField.

My problem are :

1) From certain reference paper, the ignoring of the BC typeName in the parameters list of IOobject means the Boundary condition of the defined geometricField will be then calculated, so am I ritht to define the Cmu field like this or there is a better solution or even the Cmu could not defined as volScalarField at all?

2) If the above definition for Cmu field is appropriate, then how can i initialize the Cmu nonuniformly in the 0/Cmu file, as it's associated with the mesh coordinates, and for what the boundary conditions should applied , the Dirichlet BC ?

Thanks for your reply , and the attached file is the source and head files of myKEpsilon.

best regards .

Attached Files
File Type: h myKEpsilon.H (5.1 KB, 1 views)
File Type: c myKEpsilon.C (6.8 KB, 3 views) is offline   Reply With Quote


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
No layers in a small gap bobburnquist OpenFOAM Native Meshers: snappyHexMesh and Others 6 August 26, 2015 09:38
[ICEM] Problem making structured mesh on a surface froztbear ANSYS Meshing & Geometry 4 November 10, 2011 09:52
engrid -> save as .stl with boundarie codes Zymon enGrid 31 August 29, 2011 13:40
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 15:09
How to control Minximum mesh space? hung FLUENT 7 April 18, 2005 09:38

All times are GMT -4. The time now is 22:58.