CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

Question about volScalarField boundaryField set.

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 12, 2014, 10:49
Question Question about volScalarField boundaryField set.
  #1
New Member
 
Join Date: Apr 2014
Posts: 3
Rep Power: 3
Kelong Wang is on a distinguished road
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
Kelong Wang is offline   Reply With Quote

Old   May 12, 2014, 12:33
Default
  #2
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,603
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
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.
ngj is offline   Reply With Quote

Old   May 12, 2014, 13:15
Default
  #3
New Member
 
Join Date: Apr 2014
Posts: 3
Rep Power: 3
Kelong Wang is on a distinguished road
Quote:
Originally Posted by ngj View Post
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.

Thank you for your reply.

Kelong
Kelong Wang is offline   Reply With Quote

Old   May 12, 2014, 14:19
Default
  #4
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,603
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
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.
ngj is offline   Reply With Quote

Reply

Tags
boudary field, volscalarfield

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
make a dimensionedScalar to be volScalarField sharonyue OpenFOAM Programming & Development 4 April 2, 2014 05:44
correction of Grub after installing Windows XP and 8 immortality Lounge 20 January 5, 2014 18:41
writing execFlowFunctionObjects immortality OpenFOAM Post-Processing 30 September 15, 2013 06:16
a question on why output pressure has set fixedValue as minimum of it? immortality OpenFOAM Post-Processing 6 April 30, 2013 18:17
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08


All times are GMT -4. The time now is 09:35.