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

Field value inside a boundary condition class

Register Blogs Community New Posts Updated Threads Search

Like Tree34Likes
  • 1 Post By pcaron
  • 5 Post By su_junwei
  • 2 Post By pcaron
  • 15 Post By CedricVH
  • 1 Post By pcaron
  • 7 Post By mchurchf
  • 2 Post By Jung hoo
  • 1 Post By ufocfd

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   October 17, 2022, 09:40
Default
  #6
Senior Member
 
Giles Richardson
Join Date: Jun 2012
Location: Cambs UK
Posts: 100
Rep Power: 13
ufocfd is on a distinguished road
that's been very useful - thanks

Quote:
Originally Posted by CedricVH View Post
You have the access member function const objectRegistry& db() const. Accessing for example U is done by the code:

Code:
const volVectorField& U = db().lookupObject<volVectorField>("U");
For accessing the mesh: when creating a boundary condition, you have access to the patch. You can thus access the mesh with:

Code:
const fvMesh& mesh = patch().boundaryMesh().mesh();
saeed jamshidi likes this.
ufocfd is offline   Reply With Quote

 


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
Boundary Conditions Thomas P. Abraham Main CFD Forum 20 July 7, 2013 05:05
inlet velocity boundary condition murali CFX 5 August 3, 2012 08:56
Airfoil boundary condition Frank Main CFD Forum 1 April 21, 2008 18:36
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 04:15
meshing F1 front wing Steve FLUENT 0 April 17, 2003 12:37


All times are GMT -4. The time now is 16:28.