<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style>
<!--
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Tahoma}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif"}
p.msochpdefault, li.msochpdefault, div.msochpdefault
        {margin-right:0in;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Calibri","sans-serif"}
span.emailstyle17
        {font-family:"Calibri","sans-serif";
        color:windowtext}
span.EmailStyle19
        {font-family:"Calibri","sans-serif";
        color:#1F497D}
span.BalloonTextChar
        {font-family:"Tahoma","sans-serif"}
.MsoChpDefault
        {font-size:10.0pt}
@page WordSection1
        {margin:1.0in 1.0in 1.0in 1.0in}
-->
</style><style type="text/css" id="owaParaStyle"></style>
</head>
<body lang="EN-US" link="blue" vlink="purple" fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div><br>
</div>
Hi <span style="color: rgb(31, 73, 125); font-family: Calibri, sans-serif; font-size: 15px;">Pradyumna,</span>
<div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size: 15px;"><br>
</span></font></div>
<div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size: 15px;">Periodicity is pretty robust in nek.  As long as the pair of periodic faces has the same normal</span></font></div>
<div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size: 15px;">vector and are of the same area, then it should work.</span></font></div>
<div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size: 15px;"><br>
</span></font></div>
<div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size: 15px;">Yes - I believe that using the correct Ubar will work for you.</span></font></div>
<div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size: 15px;"><br>
</span></font></div>
<div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size: 15px;">Another point, which I discovered just last week:  If you are applying a shear in usrdat2 (which</span></font></div>
<div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size: 15px;">would be a normal thing to do), you need to make certain you set param(59)=1 in the .usr file.</span></font></div>
<div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size: 15px;"><br>
</span></font></div>
<div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size: 15px;">This turns off the "fast" operator evaluation that is valid only for element that are proper</span></font></div>
<div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size: 15px;">rectilinear bricks.    The code detects such bricks when they are read from the .rea file,</span></font></div>
<div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size: 15px;">but the mechanism uses information that is not touched by standard morphing procedures.</span></font></div>
<div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size: 15px;">I'm working on a fix for this, but for now you should set param(59)=1, which will turn off</span></font></div>
<div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size: 15px;">the fast mode.</span></font></div>
<div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size: 15px;"><br>
</span></font></div>
<div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size: 15px;">Paul</span></font></div>
<div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size: 15px;"><br>
</span></font>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF108362" style="direction: ltr;"><font face="Tahoma" size="2" color="#000000"><b>From:</b> nek5000-users-bounces@lists.mcs.anl.gov [nek5000-users-bounces@lists.mcs.anl.gov] on behalf of nek5000-users@lists.mcs.anl.gov [nek5000-users@lists.mcs.anl.gov]<br>
<b>Sent:</b> Tuesday, September 20, 2016 9:32 AM<br>
<b>To:</b> nek5000-users@lists.mcs.anl.gov<br>
<b>Subject:</b> Re: [Nek5000-users] Drag calculation and mass flow rate with angled meshes<br>
</font><br>
</div>
<div></div>
<div>
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Hi Paul,</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thank you for your reply. I am indeed using the flow rate parameter, that is p54 > 0. From your reply, then can I assume that prescribing the mean velocity should lead to reliable results?
</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">Also it struck me when reading your reply, so I am directly asking you. If the Lx =xmax – xmin is incorrect for an angled domain, then will it in anyway affect the periodic boundary conditions. I still want the
 same periodic conditions, as they were in the orthogonal turbulent channel flow case (periodic about the x-axis direction). That is the velocity profile in the right-most elements should be implanted onto the left-most profile. Will this happen reliably or
 could there be any factors that might cause a problem?</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks and regards, </span></p>
<p class="MsoNormal"><span lang="NL" style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">Pradyumna M K Prasad</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">TU Delft,</span></p>
<p class="MsoNormal"><span style="color:#1F497D">Student: Masters in Aerospace Engineering</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<div>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif""> nek5000-users-bounces@lists.mcs.anl.gov [mailto:nek5000-users-bounces@lists.mcs.anl.gov]
<b>On Behalf Of </b>nek5000-users@lists.mcs.anl.gov<br>
<b>Sent:</b> Tuesday, September 20, 2016 4:04 PM<br>
<b>To:</b> nek5000-users@lists.mcs.anl.gov<br>
<b>Subject:</b> Re: [Nek5000-users] Drag calculation and mass flow rate with angled meshes</span></p>
</div>
</div>
<p class="MsoNormal"> </p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">Hi Pardyumna,</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">Nek supports two fixed flow-rate modes:</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">   .prescribed flow rate</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">   .prescribed average velocity.</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">You toggle between these modes according to the sign of parameter 54.</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">   If p54 < 0, you are prescribing mean velocity</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">   If p54 > 0, you are prescribing flow rate.</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">The flow rate may not work in your case because of the fact that</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">your domain "length"  ( := xmax - xmin) is not the same as your periodic</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">pitch.</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">The mean velocity is computed is:</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">              \int u dV / \int dV</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">and I believe that should work OK.</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">Flow rate needs an estimate of the length of the domain</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">            Q(x) = \int_A u dA = constant (by mass conservation)</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">            Q := (1/Lx) \int_0^Lx  Q(x) dx = (1/Lx) * \int_Omega u dV</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">In your case, Lx is the periodic pitch, and not equal to (xmax-xmin).</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">However, Nek does not know how to find the periodic pitch.  It is using</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">Lx = xmax-xmin, which is incorrect for your geometry.</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">Which one are your using?</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">Best,</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">Paul</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black"> </span></p>
<div>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:12.0pt; font-family:"Times New Roman","serif"; color:black">
<hr size="2" width="100%" align="center">
</span></div>
<div id="divRpF833005">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">From:</span></b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:black">
<a href="mailto:nek5000-users-bounces@lists.mcs.anl.gov" target="_blank">nek5000-users-bounces@lists.mcs.anl.gov</a> [nek5000-users-bounces@lists.mcs.anl.gov] on behalf of
<a href="mailto:nek5000-users@lists.mcs.anl.gov" target="_blank">nek5000-users@lists.mcs.anl.gov</a> [nek5000-users@lists.mcs.anl.gov]<br>
<b>Sent:</b> Tuesday, September 20, 2016 7:24 AM<br>
<b>To:</b> <a href="mailto:nek5000-users@lists.mcs.anl.gov" target="_blank">nek5000-users@lists.mcs.anl.gov</a><br>
<b>Subject:</b> [Nek5000-users] Drag calculation and mass flow rate with angled meshes</span><span style="font-size:12.0pt; font-family:"Times New Roman","serif"; color:black"></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="color:black">Hi Neks, </span></p>
<p class="MsoNormal"><span style="color:black"> </span></p>
<p class="MsoNormal"><span style="color:black">I am trying to run a simulation case similar to the turbulent channel flow case. I initially ran a simulation on the normal turbulent channel flow domain (with the geometry like the fig on the left). I used the
 parameter p55 in the rea file to ensure that the bulk velocity of the flow is 1 in the  domain, and used the parameter p02 to set the
<b>turbulent</b> Reynolds number, Re_tau to my required value of 180. I used the sub-routine drag_calc to find the mean shear on the wall, from which I calculated the shear stress and then the Re_tau and u_tau values. However, recently I was trying the same
 thing on a slightly different domain (fig to the right). </span></p>
<p class="MsoNormal"><span style="color:black">---------------------------------------------------------------------                                                                             ---------------------------------------------------------------------</span></p>
<p class="MsoNormal"><span style="color:black">|                                                                                                              |                                                                            /                                              
                                                                 /                             
<sub>^</sub> Y</span></p>
<p class="MsoNormal"><span style="color:black">|                                                                                                              |                                                                          /                                                
                                                               /                                |</span></p>
<p class="MsoNormal"><span style="color:black">|                                                                                                              |                                                                        /                                                  
                                                             /                                  |_____<sub>></sub>  X</span></p>
<p class="MsoNormal"><span style="color:black">|                                                                                                              |                                                                      /                                                    
                                                           /</span></p>
<p class="MsoNormal"><span style="color:black">|                                                                                                              |                                                                    /                                                      
                                                         /</span></p>
<p class="MsoNormal"><span style="color:black">---------------------------------------------------------------------                                                                  ---------------------------------------------------------------------</span></p>
<p class="MsoNormal"><span style="color:black"> </span></p>
<p class="MsoNormal"><span style="color:black">This domain is almost the same as the first except now there is an angle of 30 degrees in the mesh grid about the z-axis. Please note that the perpendicular distance between the walls normal to the y-direction
<b><i>remains the same</i></b> for both the domains. In this domain if I use the same p55 and p02 parameters that I use for the orthogonal domain, then Re_tau, calculated as described above, is increasing to higher values (~220). If I reduce the parameter p55
 to lesser values, then the Re_tau value is restored to 180. I could not figure out why exactly this was happening, and whether this difference is now because my way of calculating the Re_tau is not valid anymore in the angled domain. Or is the change because
 the mass flow rate is actually higher in the angled domain? If the case is latter, then why is the mass flow rate increasing just due to the angling of the mesh?</span></p>
<p class="MsoNormal"><span style="color:black"> </span></p>
<p class="MsoNormal"><span style="color:black">I went through the sub-routines drag_calc, vol_flow and set_obj (to see if the integral object needs to be changed) in moderate detail, but could not figure out the reasons for this. Any help in this might be appreciated,
 as I want to establish the reason, so that I can trust the accuracy of the results of this simulation.
</span></p>
<p class="MsoNormal"><span style="color:black"> </span></p>
<p class="MsoNormal"><span style="color:black">Thanks and regards,</span></p>
<p class="MsoNormal"><span style="color:black"> </span></p>
<p class="MsoNormal"><span style="color:black">Pradyumna M K Prasad</span></p>
<p class="MsoNormal"><span style="color:black"> </span></p>
<p class="MsoNormal"><span style="color:black">TU Delft,</span></p>
<p class="MsoNormal"><span style="color:black">Student: Masters in Aerospace Engineering</span></p>
<p class="MsoNormal"><span style="color:black"> </span></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:12.0pt; font-family:"Times New Roman","serif"; color:black"> </span></p>
</div>
</div>
</div>
</div>
<br>
<br>
</div>
</div>
</div>
</div>
</body>
</html>