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

how to implement Cmu changing with mesh coordinates

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 3, 2013, 05:21
Default how to implement Cmu changing with mesh coordinates
  #1
New Member
 
zdong
Join Date: Aug 2011
Posts: 15
Rep Power: 14
abbott.hn 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 :

Cmu=pow(uStar,4)/(D1*ln(z+z0)+D2)

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:

Code:
Cmu_
  (
           IOobject
           (
                     "Cmu",
                     runTime_timeName(),
                     mesh_,
                     IOobject::MUST_READ,
                     IOobject::AUTO_WRITHE
           ),
           mesh_
  )
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 .

Dong
Attached Files
File Type: h myKEpsilon.H (5.1 KB, 4 views)
File Type: c myKEpsilon.C (6.8 KB, 7 views)
abbott.hn 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
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 09:38
[ICEM] Problem making structured mesh on a surface froztbear ANSYS Meshing & Geometry 4 November 10, 2011 08: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 14:09
How to control Minximum mesh space? hung FLUENT 7 April 18, 2005 09:38


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