<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">Sorry -- I didn't see the code in the first email.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">What I would do is the following:</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"><span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;"> subroutine userbc (ix,iy,iz,iside,ieg)</span><br style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">
<span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">c NOTE ::: This subroutine MAY NOT be called by every process</span><br style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">
<span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;"> include 'SIZE'</span><br style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">
<span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;"> include 'TOTAL'</span><br style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">
<span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;"> include 'NEKUSE'</span><br style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">
<span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;"> </span><br style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">
<span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;"> ux=1.0</span><br style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">
<span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;"> uy=0.0</span><br style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">
<span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;"> uz=0.0</span><br style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">
<span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;"> temp=0.0</span></p>
<p style="margin-top:0;margin-bottom:0"><span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;"> if (y.lt.1) ux=10. ! y is passed in through NEKUSE</span></p>
<p style="margin-top:0;margin-bottom:0"><span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;"></span><span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;"> </span><br style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">
<span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;"> return</span><br style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">
<span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;"> end</span><br style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">
</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> Tuesday, January 2, 2018 8:21:26 AM<br>
<b>To:</b> nek5000-users@lists.mcs.anl.gov<br>
<b>Subject:</b> Re: [Nek5000-users] Different velocity values in different 'v' inlets</font>
<div> </div>
</div>
<div>
<div dir="ltr">Hi all,
<div><br>
</div>
<div>There's an error in the above code with ux = 1.0 having been left after the loop. However, the real issue was, I had to set the loop conditions in both usrbc and usric before starting the sim. That resolved the issue for me.</div>
<div><br>
</div>
<div>Sincerely,</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr">On Tue, Jan 2, 2018 at 4:10 AM <<a href="mailto:nek5000-users@lists.mcs.anl.gov">nek5000-users@lists.mcs.anl.gov</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
You set ux=1.0 after your if-test...?<br>
<br>
On 12/31/2017 07:34 PM, <a href="mailto:nek5000-users@lists.mcs.anl.gov" target="_blank">
nek5000-users@lists.mcs.anl.gov</a> wrote:<br>
> Hi all,<br>
><br>
> I'm trying to simulate a shear-layer which involves two different jets<br>
> emerging at different velocities. The simulation is 2D for now. The<br>
> width of the first jet extends from y=0.0 to y=1.0 and the second<br>
> extends from y=1.0 to y=3.0<br>
><br>
> I generated a mesh using genbox with 'v' BCs for both inlets.<br>
><br>
> In the .usr file I have the following form for usrbc<br>
><br>
> subroutine userbc (ix,iy,iz,iside,ieg)<br>
> c NOTE ::: This subroutine MAY NOT be called by every process<br>
> include 'SIZE'<br>
> include 'TOTAL'<br>
> include 'NEKUSE'<br>
> if (ym1(i,j,k,e).lt.1) then<br>
> ux=10.0<br>
> elseif (ym1(i,j,k,e).gt.1) then<br>
> ux=1.0<br>
> endif<br>
> ux=1.0<br>
> uy=0.0<br>
> uz=0.0<br>
> temp=0.0<br>
> return<br>
> end<br>
><br>
> As you can see I try assigning ux = 10.0 and 1.0 to the different zones.<br>
> However the results show a uniform value of 1.0 across both the inlets.<br>
> What am I missing here?<br>
><br>
> Sincerely,<br>
> --<br>
><br>
> *Amitvikram Dutta*<br>
><br>
> Graduate Research Assistant<br>
><br>
> Fluid Mechanics Research Lab<br>
><br>
> Multi-Physics Interaction Lab<br>
><br>
> University of Waterloo<br>
><br>
><br>
><br>
> _______________________________________________<br>
> Nek5000-users mailing list<br>
> <a href="mailto:Nek5000-users@lists.mcs.anl.gov" target="_blank">Nek5000-users@lists.mcs.anl.gov</a><br>
> <a href="https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users" rel="noreferrer" target="_blank">
https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users</a><br>
><br>
_______________________________________________<br>
Nek5000-users mailing list<br>
<a href="mailto:Nek5000-users@lists.mcs.anl.gov" target="_blank">Nek5000-users@lists.mcs.anl.gov</a><br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users" rel="noreferrer" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users</a><br>
</blockquote>
</div>
<div dir="ltr">-- <br>
</div>
<div class="x_gmail_signature">
<div dir="ltr">
<p dir="ltr"><b><font color="#000033">Amitvikram Dutta</font></b></p>
<p dir="ltr">Graduate Research Assistant</p>
<p dir="ltr">Fluid Mechanics Research Lab</p>
<p>Multi-Physics Interaction Lab</p>
<p dir="ltr">University of Waterloo</p>
</div>
</div>
</div>
</body>
</html>