# Average of patch face values in "corner cells"

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 LinkBack Thread Tools Display Modes
 March 30, 2012, 08:41 Average of patch face values in "corner cells" #1 Senior Member   Arne Stahlmann Join Date: Nov 2009 Location: Hanover, Germany Posts: 209 Rep Power: 8 Hi foamers, I have to do some interpolation/average of boundary values at corner cells. More specific: I'm regarding e.g. a cell (hex mesh element) that is located at the upper right, front corner of my domain. Therefore, three of its faces are lying on boundary patches (inlet, right, top). Within my solver I'm modifying the boundary condition values on these patches every time step. So I first have to find the cells that have three faces connected to patches, and then I need to calculate the average of these three boundary values and assign it to the single faces. Therefore my question: How can I announce the corresponding face labels on the two remaining patches for every patch face? I was thinking of some extensive loops of loops over patches, faces and cells including lists and comparisons, but I hope that there is a faster way which has not yet come to my mind... Any ideas? Arne

 April 3, 2012, 02:11 #2 Senior Member   Arne Stahlmann Join Date: Nov 2009 Location: Hanover, Germany Posts: 209 Rep Power: 8 In case someone might do a similar thing: I found a way based on this rather old thread Retrieving boundary patch values adjacent to a given cell using the functions whichPatch and whichFace that I had not known before. Arne

 April 3, 2012, 05:07 #3 Member   Laurens Van Dyck Join Date: Jul 2011 Location: Netherlands/Germany Posts: 34 Rep Power: 6 Cant you just define the coordinate of that corner and loop over the cells to see which cell center is closest to that point? You could even make it faster by retrieving the cells which neighbor one of those patches and see which one of those is closest to that point. Take the smallest patch and youll have minimum overhead.

 April 3, 2012, 13:48 #4 Senior Member   Arne Stahlmann Join Date: Nov 2009 Location: Hanover, Germany Posts: 209 Rep Power: 8 Hi laurens, thanks for your hint. I already implemented it similar to the way it was mentioned by the link I posted: 1. Start from the boundary patches, 2. find corresponding cells in corners (and intersections), 3. calculate average values based on the corresponding patch face cells and temporarily store them, 4. write them back to the patch faces. Arne

 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 clo OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 33 September 26, 2012 04:04 anand_30 OpenFOAM Meshing & Mesh Conversion 12 December 12, 2011 05:16 m.nichols19 OpenFOAM 12 September 9, 2010 11:56 matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51 SSL FLUENT 2 January 26, 2008 12:55

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

 Contact Us - CFD Online - Top