|
[Sponsors] |
December 11, 2008, 03:49 |
Hi All,
How can oppositeCel
|
#1 |
Member
Niklas Winkler
Join Date: Mar 2009
Location: Stockholm, Stockholm, Sweden
Posts: 73
Rep Power: 17 |
Hi All,
How can oppositeCellFace.C found in the doxygen manual be used? I would like to find the face opposite to a known face on the boundary to be able to calculate snGrad for that face. Thanks in advance /NW |
|
December 12, 2008, 03:06 |
Please, anyone?
|
#2 |
Member
Niklas Winkler
Join Date: Mar 2009
Location: Stockholm, Stockholm, Sweden
Posts: 73
Rep Power: 17 |
Please, anyone?
|
|
December 12, 2008, 05:32 |
Hi Niklas,
why don't you us
|
#3 |
New Member
Kerstin
Join Date: Mar 2009
Posts: 16
Rep Power: 17 |
Hi Niklas,
why don't you use <name>.boundaryField()[patchID].snGrad() where 'name' is the name of the field you need snGrad for and patchID is the ID of the patch which can be found using patchID = mesh.boundaryMesh().findPatchID("name") where name is the name of patch, e.g. inlet? Or did I misunderstand you? Kerstin |
|
December 12, 2008, 08:05 |
Hi,
Thanks for the reply!
|
#4 |
Member
Niklas Winkler
Join Date: Mar 2009
Location: Stockholm, Stockholm, Sweden
Posts: 73
Rep Power: 17 |
Hi,
Thanks for the reply! I've tried <name>.boundaryField()[patchID].snGrad(). The problem is that if the BC for PatchID is e.g. set to zeroGradient as in my case the answer it gives is only zero. And my aim is to check the actual boundary condition "value". But, I found that the following line can be used to find the opposite face, a lot of trixing with doxygen, faceList oppFace=mesh.cells()[cellI].opposingFaceLabel(c[i],mesh.faces()); Correct me if I'm wrong, please! So, now snGrad on oppFace is needed!? All the Best /NW |
|
December 12, 2008, 08:25 |
Sorry, label or labelList not
|
#5 |
Member
Niklas Winkler
Join Date: Mar 2009
Location: Stockholm, Stockholm, Sweden
Posts: 73
Rep Power: 17 |
Sorry, label or labelList not faceList!
/NW |
|
December 12, 2008, 08:28 |
Hi Niklas,
if you want to k
|
#6 |
New Member
Kerstin
Join Date: Mar 2009
Posts: 16
Rep Power: 17 |
Hi Niklas,
if you want to know the value of the field at the boundary than try scalarField valueOnPatch = <name>.boundaryField()[patchID]; for any scalar or vectorField valueOnPatch = <name>.boundaryField()[patchID]; for any vector. Then you get a field containing the values of the variable "name" on patch with ID "patchID". I think using oppositeCellFace is not a good choice to compute snGrad. Think about using polyhedras! Which is the opposite face in that case? Have a look in "oppositeCellFace.C". There's a comment written concerning that problem. By the way, snGrad for a zeroGradient-BC gives you "zero" and that's right beause snGrad is the surface normal gradient and setting BC to zeroGradient you define your surface normal gradient to be zero. Kerstin |
|
|
|