
[Sponsors] 
October 13, 2015, 01:56 
Explicitly filtered LES

#1 
Member
Mike
Join Date: Apr 2011
Location: Canada
Posts: 83
Rep Power: 15 
Hi,
I have worked on conventional LES schemes for incomp flow for more than five years but I do not have any experience for explicitly filtered LES methods. Can any one guide me to conceptually realize what it does? I know in that context, the filtering is independent from the computational grid. Can you explain how it is done? Thanks a lot 

October 13, 2015, 05:37 

#2  
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,793
Rep Power: 71 
Quote:
Hello, you can find several papers in the LES field that detailed such tasks.. do you have some more specific questions? 

October 13, 2015, 09:06 

#3 
Member
Mike
Join Date: Apr 2011
Location: Canada
Posts: 83
Rep Power: 15 
Hi Flippo,
I want to know how it is implemented. There are several papers from Moin's group who work on the gridindependent LES. But before going to that level, how is it implemented in basics? If I want to convert my implicit LES code to explicit LES code, how should I do it? give me some clue. 

October 13, 2015, 09:59 

#4  
Member
Kaya Onur Dag
Join Date: Apr 2013
Posts: 94
Rep Power: 13 
Quote:
I am a newbie in the field and here is my understanding In LES you resolve the large eddies thus you resolve the energy transfer in between large eddies. However, since you can't just ignore the energy transfer from large to small eddies(which are the ones that you can't resolve), you need to model the energy transfer that would have been there if you had the smaller eddies as well. In general this is an energy sucking system since energy transfer is usually from large to small eddies. The tricky thing is, there is already a numerical dissipation ( say from your low order finite difference approximation ). Also you can suck some energy by defining a viscosity like term such as SubGridScale viscosity and model this with Smagorinsky model. This would be the explicit, (in my mind the actual LES). If you say that your numerical dissipation is the energy that you want to take away, and not model any SGS visc. terms, then you're doing implicit LES. If you calculate and suck the energy via say Smagorinsky model then you're doing explicit LES. (I don't know why they call these explicitimplicit. In my mind there is only one LES in which you model the energy transfer) I think with implicit LES the bad part is obvious, you don't know how much and and where your energy is being sucked. The good thing is that you don't model and also you perhaps avoid overdissipation of the energy. FMDenaro please correct me if I am wrong. 

October 13, 2015, 10:44 

#5  
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,793
Rep Power: 71 
Quote:
Hi, your idea of LES is not fully correct...for example, implicit/explicit filtering is a different issue from implicit LES (ILES) .... but it would be a good idea to open a new post instead of discussing here.. 

October 13, 2015, 10:48 

#6  
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,793
Rep Power: 71 
Quote:
http://www.cfdonline.com/Forums/sea...archid=2455080 

October 14, 2015, 03:55 

#7  
Member
Mike
Join Date: Apr 2011
Location: Canada
Posts: 83
Rep Power: 15 
Quote:
Thanks for your comment but I don't think your explanation is fully correct. BTW, my question was how explicit LES (in which the definition of SGS stress is different from its conventional definition) is IMPLEMENTED. 

October 14, 2015, 03:58 

#8  
Member
Mike
Join Date: Apr 2011
Location: Canada
Posts: 83
Rep Power: 15 
Quote:
Thanks for your comment but I don't think your explanation is fully correct. BTW, my question was how explicit LES (in which the definition of SGS stress is different from its conventional definition) is IMPLEMENTED. The idea is to make the LES grid independent. 

October 14, 2015, 04:09 

#9 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,793
Rep Power: 71 
yes, using explicit filter is the only way to get gridindependent solutions in LES. The key is to distinguish the filter width delta (you choose and fix constant) from the computational size h. This way, the ratio delta/h goes to infinity for vanishing h.


October 14, 2015, 04:55 

#10  
Member
Kaya Onur Dag
Join Date: Apr 2013
Posts: 94
Rep Power: 13 
Quote:
below my smagorinsky implementation. disregard complex arrays and ffts. this is for a pseudospectral code Code:
subroutine get_SGSdissipation() implicit none REAL*8 :: filter_coef REAL(C_DOUBLE), DIMENSION(Nx,Ny,Nz) :: temp_3dreal,nuSGS,S_xx,S_xy,S_xz,S_yy,S_yz,S_zz ! S_xx  !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx/2+1; temp_3dh(i,j,k) = 0.5D0*(dudxh(i,j,k) + dudxh(i,j,k));end do; end do; end do !$OMP END PARALLEL DO CALL FFTW_EXECUTE_DFT_c2r(pifft1,temp_3dh,S_xx) ! dudxh > dudx !NON NORMALIZED YET ..use as temp_3dreal/nop ! S_xy  !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx/2+1; temp_3dh(i,j,k) = 0.5D0*(dudyh(i,j,k) + dvdxh(i,j,k));end do; end do; end do !$OMP END PARALLEL DO CALL FFTW_EXECUTE_DFT_c2r(pifft1,temp_3dh,S_xy) ! dudxh > dudx !NON NORMALIZED YET ..use as temp_3dreal/nop ! S_xz  !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx/2+1; temp_3dh(i,j,k) = 0.5D0*(dudzh(i,j,k) + dwdxh(i,j,k));end do; end do; end do !$OMP END PARALLEL DO CALL FFTW_EXECUTE_DFT_c2r(pifft1,temp_3dh,S_xz) ! dudxh > dudx !NON NORMALIZED YET ..use as temp_3dreal/nop ! S_yy  !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx/2+1; temp_3dh(i,j,k) = 0.5D0*(dvdyh(i,j,k) + dvdyh(i,j,k));end do; end do; end do !$OMP END PARALLEL DO CALL FFTW_EXECUTE_DFT_c2r(pifft1,temp_3dh,S_yy) ! dudxh > dudx !NON NORMALIZED YET ..use as temp_3dreal/nop ! S_yz  !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx/2+1; temp_3dh(i,j,k) = 0.5D0*(dvdzh(i,j,k) + dwdyh(i,j,k));end do; end do; end do !$OMP END PARALLEL DO CALL FFTW_EXECUTE_DFT_c2r(pifft1,temp_3dh,S_yz) ! dudxh > dudx !NON NORMALIZED YET ..use as temp_3dreal/nop ! S_zz  !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx/2+1; temp_3dh(i,j,k) = 0.5D0*(dwdzh(i,j,k) + dwdzh(i,j,k));end do; end do; end do !$OMP END PARALLEL DO CALL FFTW_EXECUTE_DFT_c2r(pifft1,temp_3dh,S_zz) ! dudxh > dudx !NON NORMALIZED YET ..use as temp_3dreal/nop ! $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ! $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx S_xx(i,j,k)=S_xx(i,j,k)/nop S_xy(i,j,k)=S_xy(i,j,k)/nop S_xz(i,j,k)=S_xz(i,j,k)/nop S_yy(i,j,k)=S_yy(i,j,k)/nop S_yz(i,j,k)=S_yz(i,j,k)/nop S_zz(i,j,k)=S_zz(i,j,k)/nop end do; end do; end do !$OMP END PARALLEL DO !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx nuSGS(i,j,k) = sqrt(2.0D0*( S_xx(i,j,k)**2.0D0 + S_xy(i,j,k)**2.0D0 + S_xz(i,j,k)**2.0D0 & + S_xy(i,j,k)**2.0D0 + S_yy(i,j,k)**2.0D0 + S_yz(i,j,k)**2.0D0 & + S_xz(i,j,k)**2.0D0 + S_yz(i,j,k)**2.0D0 + S_zz(i,j,k)**2.0D0 )) end do; end do; end do !$OMP END PARALLEL DO if (eps_sgs_on==1) then !Pope, Eq.13.122/123  2 stage calculation.. see below! !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx SijSij2(i,j,k) = (nuSGS(i,j,k)**2.0D0) end do; end do; end do !$OMP END PARALLEL DO endif ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% filter_coef=((filter_length*Cs)**2.0D0)/(Hscale) !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx nuSGS(i,j,k)= nuSGS(i,j,k)*filter_coef end do; end do; end do !$OMP END PARALLEL DO if (eps_sgs_on==1) then !Pope, Eq.13.122/123 Pr=0.0D0 eps_f=0.0D0 !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx Pr = Pr + nuSGS(i,j,k)*SijSij2(i,j,k) eps_f = eps_f + SijSij2(i,j,k)*1.0D0/Re end do; end do; end do !$OMP END PARALLEL DO Pr = Pr/(Nx*Ny*Nz) eps_f=eps_f/(Nx*Ny*Nz) endif ! &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&  X  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx temp_3dreal(i,j,k) = 2.0D0*nuSGS(i,j,k)*S_xx(i,j,k) end do; end do; end do !$OMP END PARALLEL DO CALL FFTW_EXECUTE_DFT_r2c(pfft1,temp_3dreal,temp_3dh) ! temp_3dh: nu_SGS * S_xx !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx/2+1 sgsDifxn(i,j,k) = kx0(i)*xmap*i_*temp_3dh(i,j,k) ! x derivative of (nu_SGS*S_xx) enddo;enddo;enddo !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx temp_3dreal(i,j,k) = 2.0D0*nuSGS(i,j,k)*S_xy(i,j,k) end do; end do; end do !$OMP END PARALLEL DO CALL FFTW_EXECUTE_DFT_r2c(pfft1,temp_3dreal,temp_3dh) ! temp_3dh: nu_SGS * S_xy !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx/2+1 sgsDifxn(i,j,k) = sgsDifxn(i,j,k)+ky0(j)*ymap*i_*temp_3dh(i,j,k) ! sum into sgsDifx with y derivative of (nu_SGS*S_xy) enddo;enddo;enddo !$OMP END PARALLEL DO !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx temp_3dreal(i,j,k) = 2.0D0*nuSGS(i,j,k)*S_xz(i,j,k) end do; end do; end do !$OMP END PARALLEL DO CALL FFTW_EXECUTE_DFT_r2c(pfft1,temp_3dreal,temp_3dh) ! temp_3dh: nu_SGS * S_xz call d_temp3dh_dz() ! inspace z derivative of temp_3dh !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx/2+1 sgsDifxn(i,j,k) = sgsDifxn(i,j,k)+temp_3dh(i,j,k) ! sum into sgsDifx with z derivative of (nu_SGS*S_xz) enddo;enddo;enddo !$OMP END PARALLEL DO ! &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&  Y  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx temp_3dreal(i,j,k) = 2.0D0*nuSGS(i,j,k)*S_xy(i,j,k) end do; end do; end do !$OMP END PARALLEL DO CALL FFTW_EXECUTE_DFT_r2c(pfft1,temp_3dreal,temp_3dh) ! temp_3dh: nu_SGS * S_xy !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx/2+1 sgsDifyn(i,j,k) = kx0(i)*xmap*i_*temp_3dh(i,j,k) ! x derivative of (nu_SGS*S_xy) enddo;enddo;enddo !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx temp_3dreal(i,j,k) = 2.0D0*nuSGS(i,j,k)*S_yy(i,j,k) end do; end do; end do !$OMP END PARALLEL DO CALL FFTW_EXECUTE_DFT_r2c(pfft1,temp_3dreal,temp_3dh) ! temp_3dh: nu_SGS * S_yy !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx/2+1 sgsDifyn(i,j,k) = sgsDifyn(i,j,k)+ky0(j)*ymap*i_*temp_3dh(i,j,k) ! sum into sgsDify with y derivative of (nu_SGS*S_yy) enddo;enddo;enddo !$OMP END PARALLEL DO !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx temp_3dreal(i,j,k) = 2.0D0*nuSGS(i,j,k)*S_yz(i,j,k) end do; end do; end do !$OMP END PARALLEL DO CALL FFTW_EXECUTE_DFT_r2c(pfft1,temp_3dreal,temp_3dh) ! temp_3dh: nu_SGS * S_yz call d_temp3dh_dz() ! inspace z derivative of temp_3dh !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx/2+1 sgsDifyn(i,j,k) = sgsDifyn(i,j,k)+temp_3dh(i,j,k) ! sum into sgsDify with z derivative of (nu_SGS*S_yz) enddo;enddo;enddo !$OMP END PARALLEL DO ! &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&  Z  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx temp_3dreal(i,j,k) = 2.0D0*nuSGS(i,j,k)*S_xz(i,j,k) end do; end do; end do !$OMP END PARALLEL DO CALL FFTW_EXECUTE_DFT_r2c(pfft1,temp_3dreal,temp_3dh) ! temp_3dh: nu_SGS * S_xz !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx/2+1 sgsDifzn(i,j,k) = kx0(i)*xmap*i_*temp_3dh(i,j,k) ! x derivative of (nu_SGS*S_xz) enddo;enddo;enddo !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx temp_3dreal(i,j,k) = 2.0D0*nuSGS(i,j,k)*S_yz(i,j,k) end do; end do; end do !$OMP END PARALLEL DO CALL FFTW_EXECUTE_DFT_r2c(pfft1,temp_3dreal,temp_3dh) ! temp_3dh: nu_SGS * S_yz !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx/2+1 sgsDifzn(i,j,k) = sgsDifzn(i,j,k)+ky0(j)*ymap*i_*temp_3dh(i,j,k) ! sum into sgsDifz with y derivative of (nu_SGS*S_yz) enddo;enddo;enddo !$OMP END PARALLEL DO !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=1,Nx temp_3dreal(i,j,k) = 2.0D0*nuSGS(i,j,k)*S_zz(i,j,k) end do; end do; end do !$OMP END PARALLEL DO CALL FFTW_EXECUTE_DFT_r2c(pfft1,temp_3dreal,temp_3dh) ! temp_3dh: nu_SGS * S_zz call d_temp3dh_dz() ! inspace z derivative of temp_3dh !$OMP PARALLEL DO PRIVATE(i,j,k) do k=1,Nz; do j=1,Ny; do i=Nx/2,Nx/2+1 sgsDifzn(i,j,k) = sgsDifzn(i,j,k)+temp_3dh(i,j,k) ! sum into sgsDify with z derivative of (nu_SGS*S_zz) enddo;enddo;enddo !$OMP END PARALLEL DO ! ### cancel oddball ### j=Ny/2+1; do k =1,Nz; do i=1,Nx/2+1 sgsDifxn(i,j,k) = (0.0D0,0.0D0) sgsDifyn(i,j,k) = (0.0D0,0.0D0) sgsDifzn(i,j,k) = (0.0D0,0.0D0) enddo; enddo i = Nx/2+1 do k = 1,Nz; do j=1,Ny sgsDifxn(i,j,k) = (0.0D0,0.0D0) sgsDifyn(i,j,k) = (0.0D0,0.0D0) sgsDifzn(i,j,k) = (0.0D0,0.0D0) enddo; enddo 

October 14, 2015, 05:27 

#11 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,793
Rep Power: 71 
The implementation of the Smagorinsky SGS modelling is the same both for implicit and explicit filtering, the only care is to take the filter width delta instead of the computational grid h


October 14, 2015, 05:48 

#12 
Member
Mike
Join Date: Apr 2011
Location: Canada
Posts: 83
Rep Power: 15 
Thanks a lot Kaya,
But as Flippo said, I do not have a problem for implementing the SGS model. My question is how to and in what order we should apply the filtering and solve the equation to make it EXPLICITLY Filtered LES. For example, in the conventional approach, I would say one way can be like this: "based on the most updated velocity field, calculate the SGS stress and then absorb it into the coefficients (through the source term or diffusion terms) and then solve the system of equations and find the new velocity field" Can you give me such explanation? Thanks 

October 14, 2015, 06:38 

#13 
Member
Kaya Onur Dag
Join Date: Apr 2013
Posts: 94
Rep Power: 13 
FMDenaro, I appreciate, now I see why I wasn't thinking right
saeedi I am using a projection method for pressure decoupling and If I were to apply an explicit filter I would use this order I'd take my previous updated velocity ( u^n ) and apply an explicit filter and use this for residual stress modelling. For the other terms ( say for diffusive,convective ) I'd keep using nonfiltered velocity filed for computation and after computing terms I'd apply the same filter in the sum and compute the intermediate velocity. After project that filtered intermediate velocity field to a divergent free one with pressure. Might not be the best way ever.. At the end I don't use an explicit filter since my code is spectral, so I can say that I have a builtin sharp spectral cut off filter. 

October 14, 2015, 06:47 

#14 
Member
Kaya Onur Dag
Join Date: Apr 2013
Posts: 94
Rep Power: 13 
I just opened the Pope's book for clarification of myself
Previously I thought implicit LES was the same thing as 'no model' LES (Boris 1992) which has been referred as implicit LES around me. I think its better to use 'implicit filtered LES' and 'no model LES' to avoid confusions in between two 

October 14, 2015, 06:59 

#15  
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,793
Rep Power: 71 
Quote:
An example, very simple, using the 1D Burgers equation: unfiltered equation: u^n+1  u^n + Int [tn, tn+1] d/dx u^2/2 dt = 0 filtered equation; u_bar^n+1  u_bar^n + Int [tn, tn+1] d/dx (u^2)_bar/2 dt = 0 The key is now in decomposition of the nonlinear term: u_bar^n+1  u_bar^n + Int [tn, tn+1] d/dx (u_bar^2)_bar/2 dt = Int [tn, tn+1] d/dx (u_bar^2u^2)_bar/2 dt the RHS being the unresolved term to be modelled. Therefore, in the numerica procedure the time integral is discretized by some formula and you get the final scheme in which u_bar^2 means the numerically values on the grid and (u_bar^2)_bar means that you perform an explicit filtering (for example a tophat) on the quadratic product. As a result, the computed update u_bar^n+1 is a consequence of the explicit filtering. It will be therefore used in the SGS model 

October 14, 2015, 07:00 

#16  
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,793
Rep Power: 71 
Quote:
yes, usually we use "implicit filtering" and "implicit LES" to distinguish the issues 

October 14, 2015, 11:58 

#17 
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,685
Rep Power: 66 
Generally, implicit LES refers to LES with no SGS model. Then there's filtering. Where implicit filtering means the filtering is handled by the computational grid and explicit filtering the filter width is explicitly specified.
As for the answer to the original question of how is explicitly filtered LES implemented, it is implemented when you define your SGS in your code. Once you have chosen what your SGS is and with what filter, then implementation naturally follows (except for actual programming/coding challenges). It is like asking how central differencing is implemented. Once we all agree on what the SGS model actually is, then the rest is a coding problem. Of course the SGS model will operate on the filtered velocities and that is where eventually you need to a filter width; and you have many choices for that width. I think it's best to refer to these things as they are: i.e. implicit LES should just be stated as LES with no SGS and instead of saying implicitly filtered LES just say LES with SGS but no explicit filter. But CFD is prone to massive confusion in naming convention. A good example is hybrid RANSLES, it's most common usage today means the polar opposite of how hybrid RANSLES was meant to be done. I don't like using implicit/explicit as part of names for a particular scheme, it's okay to use in a discussion. The problem is what people are referring to when they say implicit or explicit without specifying what is implicit/explicit. Heck, they could even be talking about implicit versus explicit timestepping. It needs to be clearly stated and not assumed! 

Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Strain rate calculation for explicitly filtered constant smagorinsky model  cfdmms  Main CFD Forum  2  December 2, 2013 14:09 
Filtered navier stokes equation..LES::  Palani Velladurai  Main CFD Forum  7  September 6, 2013 02:51 
Actual filtered LES equations for combustion  Rickard.Solsjo  OpenFOAM  0  March 18, 2011 08:26 
Some Questions about LES.  Bin Li  Main CFD Forum  2  February 20, 2004 09:58 
LES and Favre averaged and Filtered.  Jo Blake  Main CFD Forum  5  July 2, 2003 07:37 