February 28, 2018, 12:12
|
Problem accessing data in point boundary condition
|
#1
|
Member
Jibran
Join Date: Oct 2012
Location: UK
Posts: 61
Rep Power: 15
|
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
|
|
|