# Plane-Averaged dynSmagorinsky

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

 October 26, 2010, 15:11 Plane-Averaged dynSmagorinsky #1 New Member   Matt James Join Date: Jun 2010 Location: Marinette,WI, USA Posts: 25 Rep Power: 7 Hi All, I'm involved in modeling a particular channel flow and have been using a dynamic Smagorinsky large eddy simulation. Through reading some threads and browsing the source, it appears that dynSmagorinsky as packaged with OF-1.6 averages Cd over the entire domain in space. My problem is that it appears I need to use some sort of ad-hoc wall function which is contrary to the point of the dynamic model as described by Germano (1991). In this paper, Cd is averaged over wall-normal planes in a channel flow, yielding a coefficient which is a function of y and t only. It appears the implementation of dynSmag is correct aside from the blanket averaging. I'm struggling to find a way to define the layers which need to be averaged over. Perhaps writing all unaveraged coefficients to a file, and then averaging through a series which corresponds to nodes that lie on the same plane? Sorry for the wordiness.

October 27, 2010, 08:23
#2
Member

Heng Xiao
Join Date: Mar 2009
Location: Zurich, Switzerland
Posts: 58
Rep Power: 8
Hi,

Sorry that I did not follow up our previous exchanges on this subject.

For your question, it is certainly doable, assuming the cells are all "hex" and your mesh can be divided into layers (since you want to average on each layer). The starting point would be the "postChannel" utility. See how the "plane averaging" is done there.

The basic idea as I understand is, the user specify a patch as an initial "front" via dictionary. In your case (I mean, in a typical channel flow case, if you want plane average), this is one walls. You "walk" along the wall normal direction by finding an "opposite face" for each of the face on your current "front". The "opposite face" exist and is unique if your cell is hex. Now, you obtained a new "front". The cells you sweep through is defined as an "region". By continuing this sweeping procedure, you obtained many of these regions. These are the layers you want. In your computation, you average the values on each of these regions (layers). This is done in the "collapse" class/function in "postChannel" utility.

I would recommend that you study the "postChannel" utility in detail, and come back with questinos. Sorry that I would not have time to do that myself, but I would be happy to help!

Resorting to "file" is not a good idea. This is going to kill your efficiency, and it is not elegant ... Just think how elegant OpenFoam is, I would not want to do inelegant things with it!

Best,
Heng

Quote:
 Originally Posted by mdjames Hi All, It appears the implementation of dynSmag is correct aside from the blanket averaging. I'm struggling to find a way to define the layers which need to be averaged over. Perhaps writing all unaveraged coefficients to a file, and then averaging through a series which corresponds to nodes that lie on the same plane? Sorry for the wordiness.

 November 29, 2010, 19:05 #3 New Member   Matt James Join Date: Jun 2010 Location: Marinette,WI, USA Posts: 25 Rep Power: 7 Thanks for the reply, Heng I'm working right now (although I'm having compilation issues) to simply remove the averaging from dynSmagorisnky.C . Apparently it isn't as easy as removing average() from the code. After this, it looks as if I could just copy the code from postChannel.C, replacing the U averaging with cD averaging. I suppose the final scheme would look like this: 1. Read the dict file to declare which patch to use as the starting layer Loop: 1. Calculate cD and cI from U(and D) 2. Call the postChannel-like code to do the layer-averaging, having already pulled the necessary info from the dict file 3. Calculate nuSgs with cD, :endLoop

June 8, 2014, 21:52
#4
Senior Member

Huang Xianbei
Join Date: Sep 2013
Location: CAU,China
Posts: 266
Rep Power: 4
Quote:
 Originally Posted by mdjames Thanks for the reply, Heng I'm working right now (although I'm having compilation issues) to simply remove the averaging from dynSmagorisnky.C . Apparently it isn't as easy as removing average() from the code. After this, it looks as if I could just copy the code from postChannel.C, replacing the U averaging with cD averaging. I suppose the final scheme would look like this: 1. Read the dict file to declare which patch to use as the starting layer Loop: 1. Calculate cD and cI from U(and D) 2. Call the postChannel-like code to do the layer-averaging, having already pulled the necessary info from the dict file 3. Calculate nuSgs with cD, :endLoop
Hi,mdjames:
Have you managed to implement this? I also get stuck in this problem. Any advice is appreciated.

Xianbei

 Tags dynsmagorinsky, les

 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 nishant_hull Open Source Meshers: Gmsh, Netgen, CGNS, ... 23 August 5, 2015 02:09 ouafa Open Source Meshers: Gmsh, Netgen, CGNS, ... 7 May 21, 2010 12:43 Julian K. FLUENT 0 December 21, 2008 06:44 Roland CFX 3 September 13, 2006 08:38 Hbet FLUENT 0 January 18, 2002 08:16

All times are GMT -4. The time now is 03:51.