|
[Sponsors] |
how to get Face Normal vector and Face Center ? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 27, 2018, 02:42 |
how to get Face Normal vector and Face Center ?
|
#1 |
Senior Member
krishna kant
Join Date: Feb 2016
Location: Hyderabad, India
Posts: 133
Rep Power: 10 |
Hi All,
My doubt is very simple please forgive me if I am making it complicated by my words. If anything is unclear then please ask. I need to solve this problem asap. I am making a dual grid solver. In which I need to interpolate fields in between the two grids. I need to determine which cells of the finer grid are inside a given cell of the coarser grid. what I want to do is check which cell centroid of the coarser cell and finer cell lies on the same side of a given face plane. So I want to do is "multiply face normal to the difference of the cell centroid and face center". I have a cell loop like this : forAll(fluidRegions[0].cells(), cellI) I am getting the face list for the given cell by this: const cell& faces = fluidRegions[0].cells()[cellI]; Inside the above cell loop I have another cell loop for the other mesh as: forAll(solidRegions[0].cells(), cellI1) inside this loop i have my face loop in which I am finding the normal and do my calculation, forAll( faces, iface ) //face loop vector faceINormal = fluidRegions[0].Sf()[faces[i]] / fluidRegions[0].magSf()[faces[i]] ; //way I am finding the normal Any help or suggestion will be deeply appreciated. Last edited by kk415; July 11, 2018 at 06:18. |
|
July 11, 2018, 06:21 |
|
#2 |
Senior Member
krishna kant
Join Date: Feb 2016
Location: Hyderabad, India
Posts: 133
Rep Power: 10 |
I am getting error in the values of normal. Also the value of normal changes each time I run the program.
|
|
|
|