|
[Sponsors] |
June 1, 2017, 15:29 |
Accessing boundaryField
|
#1 |
Member
Sugajen
Join Date: Jan 2012
Location: Tempe, USA
Posts: 52
Rep Power: 14 |
Hi all,
I am trying to access the boundaryField of velocity and modify that and use it for the next time step calculations. I read in the post New problem in version 4.0! The boundary field become read only! that we have to use boundaryFieldRef inorder to access it, else it throws an error saying the field is read only. I did as suggested but still the values are not reflected on the output. Are Ref fields only for reference and not for next time step or post-processing? Below is my piece of code in the solver that converts a scalarField'Jw' into a vectorField 'U'. Code:
label upMem = mesh.boundaryMesh().findPatchID("upperMembrane"); forAll( U.boundaryFieldRef()[upMem], i) { U.boundaryFieldRef()[upMem][i].component(vector::X) = 0; U.boundaryFieldRef()[upMem][i].component(vector::Y) = 0; U.boundaryFieldRef()[upMem][i].component(vector::Z) = Jw.boundaryFieldRef()[upMem][i]; } Last edited by Sugajen; June 2, 2017 at 14:14. Reason: typo |
|
June 2, 2017, 14:17 |
Solved
|
#2 |
Member
Sugajen
Join Date: Jan 2012
Location: Tempe, USA
Posts: 52
Rep Power: 14 |
I was using noSlip boundary condition for U on the patches where I wanted to change the values. When I changed it to fixed Value (0,0,0), the code that I wrote in the solver was implemented. Hope that helps anyone else with similar issue!
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem accessing material properties in UDF for Multiphase Multispecies | pmtgt | Fluent Multiphase | 3 | January 17, 2021 07:11 |
Accessing node values using a UDF | Nico | FLUENT | 2 | December 20, 2007 02:50 |
How to define a Macro accessing rad intensity | Grey | FLUENT | 0 | May 21, 2007 00:12 |
Problem accessing Temp. Gradient . . . | Satish | FLUENT | 16 | December 16, 2003 13:44 |
Accessing solution data in UDF | Ale | FLUENT | 1 | June 12, 2002 00:25 |