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

Fetching a variable from a solver in a turbulence model.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 15, 2018, 11:00
Default Fetching a variable from a solver in a turbulence model.
  #1
New Member
 
Vishwajit Kumar
Join Date: Jun 2017
Posts: 6
Rep Power: 8
tintintk is on a distinguished road
Hi,

I am developing a turbulence model in which i want to fetch some variable into the turbulence model.Can anyone explain how shall i do it.

By the way I want to fetch two constants in the k-epsilon turbulence model.

thanks.
tintintk is offline   Reply With Quote

Old   January 22, 2018, 18:05
Default
  #2
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
To get access in other classes, the variable has to be registered. If you can achieve that, you can simply grab the variable such as:

Code:
const scalar& foo = this->db().lookupObject<scalar>("yourRegisterdVariable");
As you say that you have to constants of a turbulence model, you either have to make a registered list (where you store the data in a registered variable) or make the variable itself to be registered.
__________________
Keep foaming,
Tobias Holzmann
Tobi 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
How to apply a turbulence model to the rhoCentralFoam solver? arussell92 OpenFOAM Pre-Processing 18 July 25, 2022 04:26
Question about matching of solver and turbulence model louistse OpenFOAM Running, Solving & CFD 1 February 1, 2017 21:36
fluent divergence for no reason sufjanst FLUENT 2 March 23, 2016 16:08
Water subcooled boiling Attesz CFX 7 January 5, 2013 03:32
Using (own) variable from turbulence model within solver Arnoldinho OpenFOAM Programming & Development 3 September 3, 2012 12:18


All times are GMT -4. The time now is 08:53.