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

Problem accessing data in point boundary condition

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 28, 2018, 12:12
Default Problem accessing data in point boundary condition
  #1
Member
 
Jibran
Join Date: Oct 2012
Location: UK
Posts: 61
Blog Entries: 1
Rep Power: 14
Jibran is on a distinguished road
Hello Foamers,

I am trying to implement a new boundary condition for a pointVectorField but I am facing a problem. I would like to get access to a variable (lets say U_ declared as a pointVectorField in my solver) on the patch under consideration inside the updateCoeffs() function of my new boundary condition. Then I want to perform a simple operation to modify the values of U_ and assign them to this boundary.

I know that you can access volume (and surface) fields as follows
Code:
const fvPatchField<vector>& U_ = patch().lookupPatchField<volVectorField, vector>("U");
However, I believe this functionality is not available for pointFields since their values are stored in the internalField and not in the boundaryField. So is there a way the get point values of U_ only associated to the current patch?

Please note that I don't want to read the complete pointField but only the data residing on the patch I am interested in (points associated to the current boundary patch). This is because then I would need some sort of connectivity between the global point addressing and the local addressing to perform some calculations, which according to my knowledge is not available. If there is, please let me know since that would do the trick for me as well.

Just for reference, the complete field could be read as
Code:
const pointVectorField U_ = db.lookupObject<pointVectorField>("U");
Thanks in advance
__________________
Jibran Haider
https://jibranhaider.com/
Jibran is offline   Reply With Quote

Reply

Tags
boundary condition, lookupobject, point fields


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
3D Windturbine simulation in SU2 k.vimalakanthan SU2 15 October 12, 2023 05:53
My radial inflow turbine Abo Anas CFX 27 May 11, 2018 01:44
Basic Nozzle-Expander Design karmavatar CFX 20 March 20, 2016 08:44
CFX fails to calculate a diffuser pipe flow shenying0710 CFX 7 March 26, 2013 04:13
the problem of my transient simulation "Floating point exception: Overflow " alloveyou CFX 15 November 22, 2012 11:14


All times are GMT -4. The time now is 06:05.