Different velocity values in different 'v' inlets
Hi all, I'm trying to simulate a shear-layer which involves two different jets emerging at different velocities. The simulation is 2D for now. The width of the first jet extends from y=0.0 to y=1.0 and the second extends from y=1.0 to y=3.0 I generated a mesh using genbox with 'v' BCs for both inlets. In the .usr file I have the following form for usrbc subroutine userbc (ix,iy,iz,iside,ieg) c NOTE ::: This subroutine MAY NOT be called by every process include 'SIZE' include 'TOTAL' include 'NEKUSE' if (ym1(i,j,k,e).lt.1) then ux=10.0 elseif (ym1(i,j,k,e).gt.1) then ux=1.0 endif ux=1.0 uy=0.0 uz=0.0 temp=0.0 return end As you can see I try assigning ux = 10.0 and 1.0 to the different zones. However the results show a uniform value of 1.0 across both the inlets. What am I missing here? Sincerely, -- *Amitvikram Dutta* Graduate Research Assistant Fluid Mechanics Research Lab Multi-Physics Interaction Lab University of Waterloo
What is the variable e in userbc? On 31 Dec 2017, at 19:35, "[email protected] <mailto:[email protected]> " <[email protected] <mailto:[email protected]> > wrote: Hi all, I'm trying to simulate a shear-layer which involves two different jets emerging at different velocities. The simulation is 2D for now. The width of the first jet extends from y=0.0 to y=1.0 and the second extends from y=1.0 to y=3.0 I generated a mesh using genbox with 'v' BCs for both inlets. In the .usr file I have the following form for usrbc subroutine userbc (ix,iy,iz,iside,ieg) c NOTE ::: This subroutine MAY NOT be called by every process include 'SIZE' include 'TOTAL' include 'NEKUSE' if (ym1(i,j,k,e).lt.1) then ux=10.0 elseif (ym1(i,j,k,e).gt.1) then ux=1.0 endif ux=1.0 uy=0.0 uz=0.0 temp=0.0 return end As you can see I try assigning ux = 10.0 and 1.0 to the different zones. However the results show a uniform value of 1.0 across both the inlets. What am I missing here? Sincerely, -- Amitvikram Dutta Graduate Research Assistant Fluid Mechanics Research Lab Multi-Physics Interaction Lab University of Waterloo _______________________________________________ Nek5000-users mailing list [email protected] <mailto:[email protected]> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
Usually this is the element number. For example: subroutine userbc(i,j,k,eg) integer e,eg real myux(lxl1,ly1,lz1,lelt) common /mystuff/ myux e = gllel( eg ) ! Convert global element number to element number local to this rank ux = myux(i,j,k,e) etc. return end would assign your own ux() ["myux"] array values to the boundary points wherever a Dirichlet condition ("v ") has been assigned. hth, Paul ________________________________ From: Nek5000-users <[email protected]> on behalf of [email protected] <[email protected]> Sent: Sunday, December 31, 2017 1:18:06 PM To: [email protected] Subject: Re: [Nek5000-users] Different velocity values in different 'v' inlets What is the variable e in userbc? On 31 Dec 2017, at 19:35, "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> wrote: Hi all, I'm trying to simulate a shear-layer which involves two different jets emerging at different velocities. The simulation is 2D for now. The width of the first jet extends from y=0.0 to y=1.0 and the second extends from y=1.0 to y=3.0 I generated a mesh using genbox with 'v' BCs for both inlets. In the .usr file I have the following form for usrbc subroutine userbc (ix,iy,iz,iside,ieg) c NOTE ::: This subroutine MAY NOT be called by every process include 'SIZE' include 'TOTAL' include 'NEKUSE' if (ym1(i,j,k,e).lt.1) then ux=10.0 elseif (ym1(i,j,k,e).gt.1) then ux=1.0 endif ux=1.0 uy=0.0 uz=0.0 temp=0.0 return end As you can see I try assigning ux = 10.0 and 1.0 to the different zones. However the results show a uniform value of 1.0 across both the inlets. What am I missing here? Sincerely, -- Amitvikram Dutta Graduate Research Assistant Fluid Mechanics Research Lab Multi-Physics Interaction Lab University of Waterloo _______________________________________________ Nek5000-users mailing list [email protected]<mailto:[email protected]> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
You set ux=1.0 after your if-test...? On 12/31/2017 07:34 PM, [email protected] wrote:
Hi all,
I'm trying to simulate a shear-layer which involves two different jets emerging at different velocities. The simulation is 2D for now. The width of the first jet extends from y=0.0 to y=1.0 and the second extends from y=1.0 to y=3.0
I generated a mesh using genbox with 'v' BCs for both inlets.
In the .usr file I have the following form for usrbc
subroutine userbc (ix,iy,iz,iside,ieg) c NOTE ::: This subroutine MAY NOT be called by every process include 'SIZE' include 'TOTAL' include 'NEKUSE' if (ym1(i,j,k,e).lt.1) then ux=10.0 elseif (ym1(i,j,k,e).gt.1) then ux=1.0 endif ux=1.0 uy=0.0 uz=0.0 temp=0.0 return end
As you can see I try assigning ux = 10.0 and 1.0 to the different zones. However the results show a uniform value of 1.0 across both the inlets. What am I missing here?
Sincerely, --
*Amitvikram Dutta*
Graduate Research Assistant
Fluid Mechanics Research Lab
Multi-Physics Interaction Lab
University of Waterloo
_______________________________________________ Nek5000-users mailing list [email protected] https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
Hi all, 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. Sincerely, On Tue, Jan 2, 2018 at 4:10 AM <[email protected]> wrote:
You set ux=1.0 after your if-test...?
On 12/31/2017 07:34 PM, [email protected] wrote:
Hi all,
I'm trying to simulate a shear-layer which involves two different jets emerging at different velocities. The simulation is 2D for now. The width of the first jet extends from y=0.0 to y=1.0 and the second extends from y=1.0 to y=3.0
I generated a mesh using genbox with 'v' BCs for both inlets.
In the .usr file I have the following form for usrbc
subroutine userbc (ix,iy,iz,iside,ieg) c NOTE ::: This subroutine MAY NOT be called by every process include 'SIZE' include 'TOTAL' include 'NEKUSE' if (ym1(i,j,k,e).lt.1) then ux=10.0 elseif (ym1(i,j,k,e).gt.1) then ux=1.0 endif ux=1.0 uy=0.0 uz=0.0 temp=0.0 return end
As you can see I try assigning ux = 10.0 and 1.0 to the different zones. However the results show a uniform value of 1.0 across both the inlets. What am I missing here?
Sincerely, --
*Amitvikram Dutta*
Graduate Research Assistant
Fluid Mechanics Research Lab
Multi-Physics Interaction Lab
University of Waterloo
_______________________________________________ Nek5000-users mailing list [email protected] https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
_______________________________________________ Nek5000-users mailing list [email protected] https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
-- *Amitvikram Dutta* Graduate Research Assistant Fluid Mechanics Research Lab Multi-Physics Interaction Lab University of Waterloo
Sorry -- I didn't see the code in the first email. What I would do is the following: subroutine userbc (ix,iy,iz,iside,ieg) c NOTE ::: This subroutine MAY NOT be called by every process include 'SIZE' include 'TOTAL' include 'NEKUSE' ux=1.0 uy=0.0 uz=0.0 temp=0.0 if (y.lt.1) ux=10. ! y is passed in through NEKUSE return end ________________________________ From: Nek5000-users <[email protected]> on behalf of [email protected] <[email protected]> Sent: Tuesday, January 2, 2018 8:21:26 AM To: [email protected] Subject: Re: [Nek5000-users] Different velocity values in different 'v' inlets Hi all, 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. Sincerely, On Tue, Jan 2, 2018 at 4:10 AM <[email protected]<mailto:[email protected]>> wrote: You set ux=1.0 after your if-test...? On 12/31/2017 07:34 PM, [email protected]<mailto:[email protected]> wrote:
Hi all,
I'm trying to simulate a shear-layer which involves two different jets emerging at different velocities. The simulation is 2D for now. The width of the first jet extends from y=0.0 to y=1.0 and the second extends from y=1.0 to y=3.0
I generated a mesh using genbox with 'v' BCs for both inlets.
In the .usr file I have the following form for usrbc
subroutine userbc (ix,iy,iz,iside,ieg) c NOTE ::: This subroutine MAY NOT be called by every process include 'SIZE' include 'TOTAL' include 'NEKUSE' if (ym1(i,j,k,e).lt.1) then ux=10.0 elseif (ym1(i,j,k,e).gt.1) then ux=1.0 endif ux=1.0 uy=0.0 uz=0.0 temp=0.0 return end
As you can see I try assigning ux = 10.0 and 1.0 to the different zones. However the results show a uniform value of 1.0 across both the inlets. What am I missing here?
Sincerely, --
*Amitvikram Dutta*
Graduate Research Assistant
Fluid Mechanics Research Lab
Multi-Physics Interaction Lab
University of Waterloo
_______________________________________________ Nek5000-users mailing list [email protected]<mailto:[email protected]> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
_______________________________________________ Nek5000-users mailing list [email protected]<mailto:[email protected]> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users -- Amitvikram Dutta Graduate Research Assistant Fluid Mechanics Research Lab Multi-Physics Interaction Lab University of Waterloo
participants (1)
-
nek5000-users@lists.mcs.anl.gov