[Nek5000-users] Variable density flows

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Sun Oct 13 14:07:15 CDT 2013


Hi Praveen,

Your clipping implementation will as you have it -- I normally would
do it in a single loop:

      n=nx1*ny1*nz1*nelt
      do i=1,n
         t(i,1,1,1,2)=min(1.,t(i,1,1,1,2))
         t(i,1,1,1,2)=max(0.,t(i,1,1,1,2))
      enddo

You can turn on filtering by setting param(103) in your .rea file.
Setting p103=.05, say, would reduce the energy in the Nth mode by
5% each timestep --- this is usually a good choice.  Sometimes it
pays to bump this up to, say, .1, but usually a better strategy is
to add another mode to the filter, by setting p101 to 1, or 2.
In this case, the filter amplitude for the N-1 mode is alpha/4
when p101=1 and when p101=2, we have amplitudes as:

   a(N) = alpha := p103
   a(N-1) = alpha*(2/3)**2 = 4*alpha/9
   a(N-2) = alpha*(1/3)**2 = alpha/9

which amounts to fitting a parabola through the filter amplitudes so
that the filter strength decays smoothly to zero.

p103 = .05
p101 = 1

are my common choices when lx1=8.  If lx1 < 8, I typically set p101=0
as you're otherwise cutting too deeply into low end of the spectrum.

All this being said, you'll no doubt still need clipping if Sc=100,000.

Paul


----- Original Message -----
From: nek5000-users at lists.mcs.anl.gov
To: nek5000-users at lists.mcs.anl.gov
Sent: Sunday, October 13, 2013 11:39:46 AM
Subject: Re: [Nek5000-users] Variable density flows



OK. I tried clipping and it seems to run atleast. I need to see the results tomorrow in office. 


There is an option to do filtering in nek. If I understood it correctly, on each element, you first interpolate solution to lower degree polynomial and then interpolate it back to higher degree. This kills highly oscillatory components in the solution. Is this implemented for passive scalars also if I enable the filtering in rea file ? 


I implemented clipping passive scalar like this in userchk but is there a better way to do the loops 



do e=1,nelv 
do k=1,nz1 
do j=1,ny1 
do i=1,nx1 
t(i,j,k,e,2) = max(0.0, t(i,j,k,e,2)) 
t(i,j,k,e,2) = min(1.0, t(i,j,k,e,2)) 
enddo 
enddo 
enddo 
enddo 


Thanks 
praveen 



On Sun, Oct 13, 2013 at 7:38 PM, < nek5000-users at lists.mcs.anl.gov > wrote: 



With such a small diffusion coefficient you typically 
are going to need very fine resolution in space. 

Maintaining monotonicity (i.e., no over- / undershoots) in 
an under-resolved scenario is a current research topic. 
For the time being, I typically simply clip when monotonicity 
is critical. 

Paul 




On Sun, 13 Oct 2013, nek5000-users at lists.mcs.anl. gov wrote: 



I am not sure that what you are solving for c is a normalized scalar like a mass fraction Y for example 
If c is not normalized May be the formulation is equivalent to 
C= rho* Y where y is a normalized scalar and rho is the total density.. 

Finally check mass conservation 
By integrating over the volume of the channel, the density equation 
d/dt integral(rho) + integral (u. Grad rho) =error 
And see how error changes over time 

Ammar 

Sent from my iPhone 



On Oct 13, 2013, at 1:46 AM, nek5000-users at lists.mcs.anl. gov wrote: 




On Sun, Oct 13, 2013 at 10:35 AM, < nek5000-users at lists.mcs.anl. gov > wrote: 
You can also try error function like profile with 0 value at the inlet and increases to a peak somewhere and stays constant up to the exit so gradient is0 at the exit 
Insulation normally refers to the diffusive flux (first form) 
Ammar 

Thanks for the tips. I am using a smoothed initial condition for scalar now. However after some time the scalar does not stay within [0,1] which is important. My time step is already small with cfl ~= 0.1. What can I do to get better behaviour of the scalar ? 

The diffusion coefficient for my scalar is quite small, D = 5*10^(-5). 

Regards 
praveen 
______________________________ _________________ 
Nek5000-users mailing list 
Nek5000-users at lists.mcs.anl. gov 
https://lists.mcs.anl.gov/ mailman/listinfo/nek5000-users 

______________________________ _________________ 
Nek5000-users mailing list 
Nek5000-users at lists.mcs.anl. gov 
https://lists.mcs.anl.gov/ mailman/listinfo/nek5000-users 


_______________________________________________
Nek5000-users mailing list
Nek5000-users at lists.mcs.anl.gov
https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users


More information about the Nek5000-users mailing list