<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Hi Saikat,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">In retrospect, you can also do this directly by changing param(1) -- the density; and changing dt (if you desire to keep</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">    rho*(u^n - u^{n-1}) / dt </p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">constant.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">So, Nek5000 solves:</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">    rho ( du/dt + u.gradu) = remaining terms</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">You can see that modifying rho is all you need to do.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Note that "dt" is an independent parameter -- it is always set</p>
<p style="margin-top:0;margin-bottom:0">to satisfy the governing stability criteria on the explicit treatment</p>
<p style="margin-top:0;margin-bottom:0">of the advection term.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Give this some careful thought...</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">hth</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Paul</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Nek5000-users <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> Sunday, April 1, 2018 3:18:37 AM<br>
<b>To:</b> nek5000-users@lists.mcs.anl.gov<br>
<b>Subject:</b> Re: [Nek5000-users] 'comp_vort3' in 2D</font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">Hi Saikat,</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">Although I don't normally advocated modifying the source,  the best way in this case is probably to modify subroutine advab in navier1.f in /core.   Something like the following should work, where you supply your constant
 through a common block.</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">hth, Paul</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-right:0px; margin-left:0px; font-size:11px; line-height:normal; font-family:Menlo; min-height:13px">
<span style=""></span><br>
</p>
<p style="margin-right:0px; margin-left:0px; font-size:11px; line-height:normal; font-family:Menlo; min-height:13px">
<span style=""></span><br>
</p>
<p style="margin-right:0px; margin-left:0px; font-size:11px; line-height:normal; font-family:Menlo">
<span style="">      common /myscale_factor/  scale_nl</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:11px; line-height:normal; font-family:Menlo; min-height:13px">
<span style=""></span><br>
</p>
<p style="margin-right:0px; margin-left:0px; font-size:11px; line-height:normal; font-family:Menlo">
<span style="">      NTOT1 = lx1*ly1*lz1*NELV</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:11px; line-height:normal; font-family:Menlo">
<span style="">      CALL CONVOP  (TA1,VX)</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:11px; line-height:normal; font-family:Menlo">
<span style="">      call cmult   (ta1,scale_nl,ntot1)</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:11px; line-height:normal; font-family:Menlo">
<span style="">      CALL CONVOP  (TA2,VY)</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:11px; line-height:normal; font-family:Menlo">
<span style="">      call cmult   (ta2,scale_nl,ntot1)</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:11px; line-height:normal; font-family:Menlo">
<span style="">      CALL SUBCOL3 (BFX,BM1,TA1,NTOT1)</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:11px; line-height:normal; font-family:Menlo">
<span style="">      CALL SUBCOL3 (BFY,BM1,TA2,NTOT1)</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:11px; line-height:normal; font-family:Menlo">
<span style="">      IF (ldim.EQ.2) THEN</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:11px; line-height:normal; font-family:Menlo">
<span style="">         CALL RZERO (TA3,NTOT1)</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:11px; line-height:normal; font-family:Menlo">
<span style="">      ELSE</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:11px; line-height:normal; font-family:Menlo">
<span style="">         CALL CONVOP  (TA3,VZ)</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:11px; line-height:normal; font-family:Menlo">
<span style="">         call cmult   (ta3,scale_nl,ntot1)</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:11px; line-height:normal; font-family:Menlo">
<span style="">         CALL SUBCOL3 (BFZ,BM1,TA3,NTOT1)</span></p>
<p style="margin-right:0px; margin-left:0px; font-size:11px; line-height:normal; font-family:Menlo">
<span style="">      ENDIF</span></p>
<p></p>
<p style="margin-right:0px; margin-left:0px; font-size:11px; line-height:normal; font-family:Menlo">
<span style="">C</span></p>
<div><span style=""><br>
</span></div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Nek5000-users <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> Sunday, March 25, 2018 8:47:39 AM<br>
<b>To:</b> nek5000-users<br>
<b>Subject:</b> Re: [Nek5000-users] 'comp_vort3' in 2D</font>
<div> </div>
</div>
<div>
<div dir="ltr">Thanks for the clarification. 
<div><br>
</div>
<div>Saikat</div>
</div>
<div class="x_x_gmail_extra"><br clear="all">
<div>
<div class="x_x_gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr"><span style="background-color:rgb(255,255,255)"><font color="#444444" face="georgia, serif" size="2">Saikat Mukherjee,</font></span></div>
<div dir="ltr"><font color="#444444" face="georgia, serif" size="2">PhD Student,</font></div>
<div dir="ltr"><font color="#444444" face="georgia, serif" size="2">Paul Research Group - <a href="http://www.me.vt.edu/mpaul/" target="_blank">http://www.me.vt.edu/mpaul/</a><br>
</font>
<div><span style="background-color:rgb(255,255,255)"><font color="#444444" face="georgia, serif" size="2">Engineering Science and Mechanics,</font></span></div>
<div><span style="background-color:rgb(255,255,255)"><font color="#444444" face="georgia, serif" size="2">Virginia Tech.</font></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<div class="x_x_gmail_quote">On Sun, Mar 25, 2018 at 4:40 AM, <span dir="ltr"><<a href="mailto:nek5000-users@lists.mcs.anl.gov" target="_blank">nek5000-users@lists.mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="x_x_gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
Hi,<br>
if you look into the code you see that for 2D cases the result it stored in vort(:,1), even though it is of course the z-vorticity.<br>
<br>
00791       if (if3d) then<br>
00792 c        work1=dw/dy ; work2=dv/dz<br>
00793            call dudxyz(work1,w,rym1,sym1,tym1,<wbr>jacm1,1,2)<br>
00794            call dudxyz(work2,v,rzm1,szm1,tzm1,<wbr>jacm1,1,3)<br>
00795            call sub3(vort(1,1),work1,work2,nto<wbr>t)<br>
00796 c        work1=du/dz ; work2=dw/dx<br>
00797            call dudxyz(work1,u,rzm1,szm1,tzm1,<wbr>jacm1,1,3)<br>
00798            call dudxyz(work2,w,rxm1,sxm1,txm1,<wbr>jacm1,1,1)<br>
00799            call sub3(vort(1,2),work1,work2,nto<wbr>t)<br>
00800 c        work1=dv/dx ; work2=du/dy<br>
00801            call dudxyz(work1,v,rxm1,sxm1,txm1,<wbr>jacm1,1,1)<br>
00802            call dudxyz(work2,u,rym1,sym1,tym1,<wbr>jacm1,1,2)<br>
00803            call sub3(vort(1,3),work1,work2,nto<wbr>t)<br>
00804       else<br>
00805 c        work1=dv/dx ; work2=du/dy<br>
00806            call dudxyz(work1,v,rxm1,sxm1,txm1,<wbr>jacm1,1,1)<br>
00807            call dudxyz(work2,u,rym1,sym1,tym1,<wbr>jacm1,1,2)<br>
00808            call sub3(vort,work1,work2,ntot)<br>
00809       endif<br>
<br>
Philipp
<div>
<div class="x_x_h5"><br>
<br>
<br>
On 2018-03-25 00:49, <a href="mailto:nek5000-users@lists.mcs.anl.gov" target="_blank">
nek5000-users@lists.mcs.anl.go<wbr>v</a> wrote:<br>
</div>
</div>
<blockquote class="x_x_gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div>
<div class="x_x_h5">Hello neks,<br>
<br>
I am using 'comp_vort3' for a 2D flow, with a forcing in x direction,<br>
<br>
call comp_vort3 (vort, w1, w2, vx, vy, vz)<br>
<br>
call outpost (vort(1,1), vort(1,2), vort(1,3), pr, t, 'vrt')<br>
<br>
<br>
In this case, the x and y component of vorticity should be trivial, and only z component should remain. However I am getting a non-zero component of x-component, vort(1,1) while vort(1,2) and vort(1,3) are zero.<br>
<br>
However if I add a z-direction, comp_vort3 returns a non-zero value of vort(1,3) and the x and y-components are zero, which should be the case.<br>
<br>
So my question is, in 2D, does comp_vort3 return only one value which is in vort(1,1)? The vorticity fields in both cases look sort of similar.<br>
<br>
Thanks,<br>
Saikat<br>
<br>
<br>
Saikat Mukherjee,<br>
PhD Student,<br>
Paul Research Group - <a href="http://www.me.vt.edu/mpaul/" rel="noreferrer" target="_blank">
http://www.me.vt.edu/mpaul/</a><br>
Engineering Science and Mechanics,<br>
Virginia Tech.<br>
<br>
<br>
</div>
</div>
______________________________<wbr>_________________<br>
Nek5000-users mailing list<br>
<a href="mailto:Nek5000-users@lists.mcs.anl.gov" target="_blank">Nek5000-users@lists.mcs.anl.go<wbr>v</a><br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users" rel="noreferrer" target="_blank">https://lists.mcs.anl.gov/mail<wbr>man/listinfo/nek5000-users</a><br>
<br>
</blockquote>
______________________________<wbr>_________________<br>
Nek5000-users mailing list<br>
<a href="mailto:Nek5000-users@lists.mcs.anl.gov" target="_blank">Nek5000-users@lists.mcs.anl.go<wbr>v</a><br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users" rel="noreferrer" target="_blank">https://lists.mcs.anl.gov/mail<wbr>man/listinfo/nek5000-users</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</body>
</html>