Question about volScalarField boundaryField set.
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 |
Hallo Kelong,
Welcome to the forum. If I understand correctly, then your problem is solved by using the zeroGradient boundary condition. Kind regards, Niels |
Quote:
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 |
Well, you are still describing a Neumann boundary condition. This is exactly what the
Code:
type zeroGradient; Kind regards, Niels |
All times are GMT -4. The time now is 23:41. |