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

Accessing field values with in a dynamic mesh motion class

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 1, 2015, 06:45
Default Accessing field values with in a dynamic mesh motion class
  #1
kcn
New Member
 
Join Date: May 2014
Posts: 27
Rep Power: 3
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
Member
 
Hassan Kassem
Join Date: May 2010
Location: UK
Posts: 99
Rep Power: 7
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
New Member
 
Join Date: May 2014
Posts: 27
Rep Power: 3
kcn is on a distinguished road
Thanks Hassan. I managed to access them through mesh.
kcn is offline   Reply With Quote

Reply

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
Dynamic mesh using profile sanjeetlimbu Fluent Multiphase 2 April 11, 2015 09:48
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 10: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 14:36.