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

Accessing field values with in a dynamic mesh motion class

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 1, 2015, 06:45
Default Accessing field values with in a dynamic mesh motion class
  #1
kcn
Member
 
Join Date: May 2014
Posts: 31
Rep Power: 11
kcn is on a distinguished road
Hello,

Can some one please tell me how to access field values (for example p & U) from with in a dynamic mesh motion class?

I tried,

const volVectorField& U = db().lookupObject<volVectorField>("U");
But it produced the following error.

db was not declared in this scope.

Can some one please tell me the lines of code to use in order to call a field variable to the class.

Thanks,
kcn
kcn is offline   Reply With Quote

Old   July 14, 2015, 10:43
Default
  #2
Senior Member
 
Hassan Kassem
Join Date: May 2010
Location: Germany
Posts: 242
Rep Power: 17
hk318i is on a distinguished road
It is not clear which class you mean.
But if db() is declared and there is no reference to objectRegistry, you can use IOdictionary or mesh or time to get reference to objectRegistry if available.
hk318i is offline   Reply With Quote

Old   July 21, 2015, 00:52
Default
  #3
kcn
Member
 
Join Date: May 2014
Posts: 31
Rep Power: 11
kcn is on a distinguished road
Thanks Hassan. I managed to access them through mesh.
kcn 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
Dynamic mesh using profile sanjeetlimbu Fluent Multiphase 3 April 19, 2018 09:49
Error about inversePointDistance option of diffusivity for dynamic mesh motion mechy OpenFOAM 0 August 16, 2013 15:56
Polynomial Dynamic Mesh Motion AVK Fluent UDF and Scheme Programming 1 March 27, 2009 09:51
UDF, dynamic mesh motion phil FLUENT 0 September 15, 2004 05:42
Dynamic mesh motion Karthick FLUENT 5 July 15, 2004 02:33


All times are GMT -4. The time now is 23:00.