# Question about volScalarField boundaryField set.

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

 May 12, 2014, 10:49 Question about volScalarField boundaryField set. #1 New Member   Join Date: Apr 2014 Posts: 3 Rep Power: 5 Dear FOAMers: I have a question about boundaryField set of a volScalarField object. I have the value of each cell center. So I can set the internalFiled with my existing value. But for the boundaryField, I want to set each boundaryField face center's value equals to cell center's value, which the boundary face belongs to. How could I find the cell ID that a particular boundary face belongs to? I hope the question is described clearly. Thank you! Kelong

 May 12, 2014, 12:33 #2 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Deltares, Delft, The Netherlands Posts: 1,759 Rep Power: 29 Hallo Kelong, Welcome to the forum. If I understand correctly, then your problem is solved by using the zeroGradient boundary condition. Kind regards, Niels __________________ Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.

May 12, 2014, 13:15
#3
New Member

Join Date: Apr 2014
Posts: 3
Rep Power: 5
Quote:
 Originally Posted by ngj Hallo Kelong, Welcome to the forum. If I understand correctly, then your problem is solved by using the zeroGradient boundary condition. Kind regards, Niels
Dear Niels,

Sorry. My question is how to set the boundaryField value of each boundary face with the existing cell centers value. As you know, every boundary face belongs to a cell, I want to set the boundary face value's equals to the cell center's value. So for a boundary face, I need some code to find which cell the boundary face belongs to. And then read the cell center's value and set the boundary face's value.

Kelong

 May 12, 2014, 14:19 #4 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Deltares, Delft, The Netherlands Posts: 1,759 Rep Power: 29 Well, you are still describing a Neumann boundary condition. This is exactly what the Code: `type zeroGradient;` boundary condition does for you. Kind regards, Niels __________________ Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.

 Tags boudary field, volscalarfield

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post sharonyue OpenFOAM Programming & Development 4 April 2, 2014 05:44 immortality Lounge 20 January 5, 2014 18:41 immortality OpenFOAM Post-Processing 30 September 15, 2013 06:16 immortality OpenFOAM Post-Processing 6 April 30, 2013 18:17 allenzhao OpenFOAM Installation 127 January 30, 2009 20:08

All times are GMT -4. The time now is 18:13.