<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Arial, sans-serif" size="2">
<div>Hi Neks,</div>
<div> </div>
<div>I would like to investigate the mixing of passive scalars in turbulent flows. Therefore, I tried to write a function to compute the scalar dissipation rate. I found someone on the list who did it for temperature and pressure so I tried the same way. Unfortunately,
my gradients seem to be zero all the time. The code i wrote looks like:</div>
<div> </div>
<div> include 'SIZE'</div>
<div> include 'TOTAL'</div>
<div> include 'ZPER'</div>
<div> include 'NEKUSE'</div>
<div> </div>
<div> common /scalar/ dc1dx(lx1*ly1,lz1*lelt) </div>
<div> & , dc1dy(lx1*ly1,lz1*lelt)</div>
<div> & , dc1dz(lx1*ly1,lz1*lelt)</div>
<div> real scalar_diss</div>
<div> scalar_diss = 0.0</div>
<div> </div>
<div> call gradm1(dc1dx, dc1dy, dc1dz, ps(1)) </div>
<div> do i=1,lx1*ly1</div>
<div> do j=1,lz1*lelt</div>
<div> scalar_diss = scalar_diss + (dc1dx(i, j)**2)*2</div>
<div> scalar_diss = scalar_diss + (dc1dy(i, j)**2)*2</div>
<div> scalar_diss = scalar_diss + (dc1dz(i, j)**2)*2</div>
<div> enddo</div>
<div> enddo</div>
<div> write(6,*) scalar_diss</div>
<div> </div>
<div>I looks pretty much the same like in <a href="https://lists.mcs.anl.gov/mailman/htdig/nek5000-users/2010-November/001106.html"><font color="#0000FF"><u>https://lists.mcs.anl.gov/mailman/htdig/nek5000-users/2010-November/001106.html</u></font></a>. The
fields have all the same size (lx1=lx2=lx3 and so on).</div>
<div>My testcase is a small rectangular grid initialized with the passive scalar set to one in the lower half and zero in the upper half. Thus, I would expect some value about 2*number of points. </div>
<div>I hope you can help me. I'm struggling with this for some time now, but could not find my mistake. Maybe it is just my lack of experience with Fortran.</div>
<div> </div>
<div>Thank you</div>
<div>Alex</div>
<div> </div>
<div> </div>
</font>
</body>
</html>