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

How to access a new defined fields in turbulence model code

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 21, 2016, 06:07
Default How to access a new defined fields in turbulence model code
  #1
Member
 
Xinguang Wang
Join Date: Feb 2015
Posts: 45
Rep Power: 11
JasonWang3 is on a distinguished road
Dear All

In my program, I defined a new fields in the ''creatfields.H'', as:

volScalarField UConvec1
(
IOobject
(
"UConvec1",
runTime.timeName(),
mesh
),
mesh,
dimensionedScalar
(
"UConvec1",
dimensionSet(1, -2, -2, 0, 0, 0, 0),
0.0
)
);

UConvec1 is calculated in the main program and stored the convection term in the previous time step, and will renewed at the end of the main program, and also used when dealing with the momentum equation.

In the turbulence mode code, such as kEpsilon.C, I need to access this field, here is my question, How can I access this field when coding in the turbulence model?

regards,
Xinguang
JasonWang3 is offline   Reply With Quote

Old   March 24, 2016, 14:35
Default
  #2
Senior Member
 
Hassan Kassem
Join Date: May 2010
Location: Germany
Posts: 242
Rep Power: 17
hk318i is on a distinguished road
lookupObject maybe the solution

check this
http://www.cfd-online.com/Forums/ope...-scalar-2.html
hk318i 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
Access turbulence model in coded functionobjectlibs eelcovv OpenFOAM Programming & Development 6 December 1, 2018 18:43
a reconstructPar issue immortality OpenFOAM Post-Processing 8 June 16, 2013 11:25
What model of turbulence choose to study an external aerodynamics case raffale OpenFOAM 0 August 23, 2012 05:45
Discussion: Reason of Turbulence!! Wen Long Main CFD Forum 3 May 15, 2009 09:52
Wall Treatment of User defined Turbulence Model Yang Chung FLUENT 0 August 23, 2008 11:31


All times are GMT -4. The time now is 09:19.