<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="text-align:justify;font-family:arial,sans-serif">Hi Neks,</span></div><p class="MsoNormal" style="text-align:justify"></p>
<p class="MsoNormal" style="text-align:justify"> </p>
<p class="MsoNormal" style="text-align:justify">I am trying to use standard
Smagorinsky model to simulate the flow for my case. For that, we have used
comp_gije, comp_sije, mag_tensor_e, cmult, set_grid_spacing subroutines from
the turbChannel example to calculate turbulent or eddy viscosity. (I have
attached the subroutine here).</p>
<p class="MsoNormal" style="text-align:justify"> </p>
<p class="">subroutine eddy_visc(ediff,e)</p>
<p class="">c</p>
<p class="">c Compute eddy
viscosity using dynamic smagorinsky model</p>
<p class="">c</p>
<p class=""> include
'SIZE'</p>
<p class=""> include
'TOTAL'</p>
<p class=""> include
'ZPER'</p>
<p class=""> </p>
<p class=""> real
ediff(nx1*ny1*nz1,nelv),cs</p>
<p class=""> integer e</p>
<p class=""> </p>
<p class=""> common /dynsmg/ sij
(lx1*ly1*lz1,ldim,ldim)</p>
<p class=""> $ , dg2 (lx1*ly1*lz1,lelv)</p>
<p class=""> $ , snrm(lx1*ly1*lz1,lelv)</p>
<p class=""> </p>
<p class=""> real
sij,dg2,snrm</p>
<p class=""> </p>
<p class="">
parameter(lxyz=lx1*ly1*lz1)</p>
<p class=""> </p>
<p class=""> ntot =
nx1*ny1*nz1</p>
<p class=""> </p>
<p class=""> call
comp_gije(sij,vx(1,1,1,e),vy(1,1,1,e),vz(1,1,1,e),e)</p>
<p class=""> call
comp_sije(sij)</p>
<p class=""> </p>
<p class=""> call
mag_tensor_e(snrm(1,e),sij)</p>
<p class=""> call
cmult(snrm(1,e),2.0,ntot)</p>
<p class=""> </p>
<p class=""> call
set_grid_spacing(dg2)</p>
<p class=""> </p>
<p class=""> if
(e.eq.nelv) then ! planar avg and define
nu_tau</p>
<p class=""> cs = 0.10</p>
<p class=""> ntot =
nx1*ny1*nz1*nelv</p>
<p class=""> do
i=1,ntot</p>
<p class=""> cstat
= (cs**2.0)*dg2(i,1)</p>
<p class="">
ediff(i,1) = param(2) + cstat*snrm(i,1)</p>
<p class=""> enddo</p>
<p class=""> endif</p>
<p class=""> </p>
<p class=""> return</p><p class=""></p><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline"> </div> end<p></p><p class=""></p>
<p class="MsoNormal" style="text-align:justify"> </p>
<p class="MsoNormal" style="text-align:justify">However, we faced some
difficulties running our case. We found that when the element distribution is
not uniform between the processors (mod (lelg,lp).ne.0) the code freezes in the
set_grid_spacing subroutine when Dsavg is called. </p>
<p class="MsoNormal" style="text-align:justify">In order to debug this case we
did some tests on TurbChannel example with dynamic Smagorinsky model and we
found that this problem also exists there. Thus, it seems that we will be
having this problem except from the cases that (mod (lelg,lp).eq.0) and we do
not understand the reason for that. </p>
<p class="MsoNormal" style="text-align:justify">Therefore, could you please guide
me so that I can deal with this problem?</p>
<p class="MsoNormal" style="text-align:justify"> </p>
<p class="MsoNormal" style="text-align:justify"></p><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="text-align:justify;font-family:arial,sans-serif">Thanks,</span></div><div class="gmail_default" style="font-family:verdana,sans-serif"><p style="font-family:arial,sans-serif;text-align:justify;margin:0cm 0cm 0pt"><font face="verdana, sans-serif" size="2">Mahzad</font></p><p style="font-family:arial,sans-serif;text-align:justify;margin:0cm 0cm 0pt"><font face="verdana, sans-serif" size="2"><br></font></p><p style="font-family:arial,sans-serif;text-align:justify;margin:0cm 0cm 0pt"><span style="font-family:verdana,sans-serif"><i>PhD</i></span><i style="font-family:verdana,sans-serif"> Mechanical Engineering</i></p><font face="verdana, sans-serif" size="2"><i>Arizona State University</i></font><div style="font-family:arial,sans-serif"><font face="verdana, sans-serif" size="2"><i>School for engineering of matter, transport and energy (SEMTE)</i></font></div><div style="font-family:arial,sans-serif"><font face="verdana, sans-serif" size="2"><i><br></i></font></div><div style="font-family:arial,sans-serif"><font face="verdana, sans-serif" size="2"><i><br></i></font></div></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br clear="all"></div><div><div class="gmail_signature"><div dir="ltr"><p style="text-align:justify;margin:0cm 0cm 0pt"><font face="verdana, sans-serif" size="2">Mahzad
Khoshlessan</font></p><p style="text-align:justify;margin:0cm 0cm 0pt"><font face="verdana, sans-serif" size="2"><br></font></p><p style="text-align:justify;margin:0cm 0cm 0pt"><span style="font-family:verdana,sans-serif;font-size:small"><i>PhD</i></span><i style="font-family:verdana,sans-serif;font-size:small"> Mechanical Engineering</i></p><font face="verdana, sans-serif" size="2">
<i>Arizona State University</i></font><div><font face="verdana, sans-serif" size="2"><i>School for engineering of matter, transport and energy (SEMTE)<br></i></font><div><br></div></div></div></div></div>
</div>