[Nek5000-users] Pipe with expansion

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Fri Jan 24 06:02:12 CST 2014




Kamal,

1) yes

2) standard approach to seeing vorticity would be something
    like the following in userchk

      parameter (lt=lx1*ly1*lz1*lelt)
      common /myjunk/ vort(lt,3),w1(lt),w2(lt)
      logical ifxyt
      integer ivout  ! flag to turn geometry on/off for VisIt
      save    ivout
      data    ivout /0/


      if (mod(istep,iostep).eq.0) then
         call comp_vort3(vort,w1,w2,vx,vy,vz)

         ifxyt = ifxyo   ! put geometry into first vrt file
         ifxyo = .false.
         if (ivout.eq.0) ifxyo = .true.
         ivout = 1

         call outpost(vort(1,1),vort(1,2),vort(1,3),pr,t,'vrt')

         ifxyo = ifxyt   ! restore ifxyo flag to original state

      endif


If your session name is blah, this piece of code will put
vorticity into a sequence of files vrtblah0.f0000n

You can instead ignore the vrt prefix and the part about the
geometry with a simpler code

      parameter (lt=lx1*ly1*lz1*lelt)
      common /myjunk/ vort(lt,3),w1(lt),w2(lt)

      if (mod(istep,iostep).eq.0) then
         call comp_vort3(vort,w1,w2,vx,vy,vz)
         call outpost(vort(1,1),vort(1,2),vort(1,3),pr,t,'vrt')
      endif

I usually go for this latter approach, but the choice is
totally up to you.

Paul





On Fri, 24 Jan 2014, nek5000-users at lists.mcs.anl.gov wrote:

> Hello Paul,
>
> Thanks for your reply. I am looking into the .usr file for defining the 
> set_obj ().
>
> 1) Could you please tell me what is 'Enter the number of levels ?' in n2to3
>
> is it the number of elements in Z direction ?
>
> 2) As you said about storing the computed vorticity in velocity field to view 
> in VisIT, I found the routine to compute the vorticity but I am stuck about 
> adding it to the velocity filed to VisIT ? could you please tell me how it 
> works or any example which stores vorticity to the .fld file as a separate 
> variable.
>
>
> Thank you
>
> Kamal
>
>
> On 22/01/2014 16:53, nek5000-users at lists.mcs.anl.gov wrote:
>> Axial viscous stress is given by torq_calc -- that's no problem whatsoever. 
>> You get a number as a
>> function of time.
>> 
>> You can even get stresses on multiple subsets of the geometry (e.g., if you 
>> had multiple branches
>> in the domain or multiple cylinders.   The drag, which is a byproduct of 
>> the torque computation (which
>> you can ignore), is given in terms of the viscous and pressure components 
>> separately and as the
>> sum of the two.
>> 
>> You can identify domain boundaries by checking the boundary conditions. 
>> Here, I recommend
>> looking at the set_obj routines in several of the /example cases.
>> 
>> 
>> ________________________________________
>> From: nek5000-users-bounces at lists.mcs.anl.gov 
>> [nek5000-users-bounces at lists.mcs.anl.gov] on behalf of 
>> nek5000-users at lists.mcs.anl.gov [nek5000-users at lists.mcs.anl.gov]
>> Sent: Wednesday, January 22, 2014 9:37 AM
>> To: nek5000-users at lists.mcs.anl.gov
>> Subject: Re: [Nek5000-users] Pipe with expansion
>> 
>> Hello Paul
>> 
>> I was thinking about taking the tangential velocity near to the wall so 
>> that I can figure out my length of the recirculation region.
>> 
>> Is it possible for me to access the boundary elements of the mesh ??? so 
>> that I can take the boundary element and then obtain the velocity at that 
>> point so that I can figure out the length of my recirculation region.
>> 
>> or take the *.fld file and read it to plot the datas I need.
>> 
>> 
>> I also want to calculate the axial viscous force acting on the entire pipe.
>> 
>> which is given by
>> 
>> C_v =  F^v / ( d^2 * rho * U^2 ) =   double integral ( 1/Re * (du / dr) ) 
>> dtheta dz
>> 
>> 
>> On Jan 22, 2014, at 4:07 PM, nek5000-users at lists.mcs.anl.gov wrote:
>> 
>>> Hi Kamal,
>>> 
>>> As I thought about it some more, if you're interested in the local wall 
>>> shear stress
>>> magnitude I'm quite certain you can get this by plotting the magnitude of 
>>> vorticity
>>> on the surface in question.   (Note that the sign of the WSS, which in 
>>> fact is a tensor
>>> or a vector when restricted to a given surface, is lost in this process, 
>>> but that might
>>> not be relevant for your needs.)   If that works, then you can readily 
>>> compute the
>>> vorticity using one of the routines in nek and store the result in a 
>>> velocity field, then
>>> view that field with VisIt.   Of course WSS will require multiplication by 
>>> viscosity.
>>> 
>>> hth,
>>> 
>>> Paul
>>> 
>>> ________________________________________
>>> From: nek5000-users-bounces at lists.mcs.anl.gov 
>>> [nek5000-users-bounces at lists.mcs.anl.gov] on behalf of 
>>> nek5000-users at lists.mcs.anl.gov [nek5000-users at lists.mcs.anl.gov]
>>> Sent: Tuesday, January 21, 2014 10:33 AM
>>> To: nek5000-users at lists.mcs.anl.gov
>>> Subject: Re: [Nek5000-users] Pipe with expansion
>>> 
>>> Hi paul,
>>> 
>>> can I make this to be drag or shear quantities to be return to the a
>>> separate file so that it will easy for me to plot.
>>> 
>>> By the way it gives the integral quantity. Think for example I need to
>>> find the shear stress on the wall  from the inlet to outlet at a
>>> particular time = 2 . How can I do that ?
>>> 
>>> Is there way to find the number of elements in x,y and z direction ?
>>> 
>>> On 21/01/2014 17:32, nek5000-users at lists.mcs.anl.gov wrote:
>>>> Hi Kamal,
>>>> 
>>>> Your integrated drag quantities should be written to the logfile
>>>> (stdout),
>>>> assuming you've set the arguments in the call to be .true.
>>>> 
>>>> Paul
>>>> 
>>>> On Tue, 21 Jan 2014, nek5000-users at lists.mcs.anl.gov wrote:
>>>> 
>>>>> Hi Paul,
>>>>> 
>>>>> I checked the set_obj subroutine and implemented one in my .USR file.
>>>>> The code seem to run without any errors but I don't find where these
>>>>> variables are getting stored.
>>>>> 
>>>>> I use VisIT to visualize my output, even there was no change in it.
>>>>> 
>>>>> do I have to define my own output file and write the variables out ?
>>>>> 
>>>>> Thanks,
>>>>> 
>>>>> Kamal.
>>>>> 
>>>>> 
>>>>> On 20/01/2014 21:52, nek5000-users at lists.mcs.anl.gov wrote:
>>>>>> Hi Kamal,
>>>>>> 
>>>>>> You'll need to compute your own tke by manipulating the
>>>>>> velocity fields.
>>>>>> 
>>>>>> You can get running averages of the requisite quantities
>>>>>> via calls to "avg_all" which is found in navier5.f
>>>>>> 
>>>>>> You can compute shear stress on the wall simply by computing
>>>>>> the drag on the wall, which can be done via a call to torque_calc(),
>>>>>> also found in navier5.f
>>>>>> 
>>>>>> If you cd to /examples and type:
>>>>>>
>>>>>>       grep torq */*.usr
>>>>>> 
>>>>>> you'll find many examples of calls to torque_calc.  You simply
>>>>>> need to prescribe the surfaces on which shear is to be integrated.
>>>>>> 
>>>>>> I typically write a routine "set_obj" to identify such surfaces
>>>>>> on the first call to usrchk.
>>>>>>
>>>>>>       grep set_obj */*.usr
>>>>>> 
>>>>>> will show similar examples.
>>>>>> 
>>>>>> I would recommend trying this for laminar Poiseiulle flow in
>>>>>> a very simple channel just to check that your calls are properly
>>>>>> set.
>>>>>> 
>>>>>> Best,
>>>>>> 
>>>>>> Paul
>>>>>> 
>>>>>> 
>>>>>> On Mon, 20 Jan 2014, nek5000-users at lists.mcs.anl.gov wrote:
>>>>>> 
>>>>>>> Hi Paul,
>>>>>>> 
>>>>>>> Thanks and that helped.
>>>>>>> 
>>>>>>> Where can I find the variables like Turbulent KE , shear stress on
>>>>>>> the wall. ?
>>>>>>> 
>>>>>>> Do i have to activate some parameters for calculating them ?
>>>>>>> 
>>>>>>> If I had to plot them.
>>>>>>> 
>>>>>>> Thanks,
>>>>>>> Kamal
>>>>>>> 
>>>>>>> 
>>>>>>> On Jan 20, 2014, at 5:41 AM, nek5000-users at lists.mcs.anl.gov wrote:
>>>>>>> 
>>>>>>>> Kamal,
>>>>>>>> 
>>>>>>>> Looks good.
>>>>>>>> 
>>>>>>>> I'm guessing that one further refinement would be:
>>>>>>>> 
>>>>>>>> if (z.gt.z0) scale = 1 + (smax-1)*(z-z0)/(z1-z0)
>>>>>>>> if (z.gt.z1) scale = smax
>>>>>>>> 
>>>>>>>> which would yield
>>>>>>>>
>>>>>>>>   scale = 1 when z=z0
>>>>>>>>   scale = smax when z >= z1
>>>>>>>> 
>>>>>>>> Paul
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> On Sun, 19 Jan 2014, nek5000-users at lists.mcs.anl.gov wrote:
>>>>>>>> 
>>>>>>>>> Hi paul,
>>>>>>>>> 
>>>>>>>>> The code works fine, but there should be a small change thats has
>>>>>>>>> to be done
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> if (z.gt.z0) scale = 1 + (z /(z1-z0 )))
>>>>>>>>> if (z.gt.z1) scale = smax
>>>>>>>>> 
>>>>>>>>> This creates a perfect diverging pipe.
>>>>>>>>> 
>>>>>>>>> Thanks for the help paul.
>>>>>>>>> 
>>>>>>>>> Kamal
>>>>>>>>> 
>>>>>>>>> On Jan 20, 2014, at 12:09 AM, nek5000-users at lists.mcs.anl.gov wrote:
>>>>>>>>> 
>>>>>>>>>> Hi paul,
>>>>>>>>>> 
>>>>>>>>>> If I am not wrong,
>>>>>>>>>> I make a mesh with three straight pipes( inlet, divergent,
>>>>>>>>>> outlet ) connected together via n2to3 so that I know the element
>>>>>>>>>> connectivity places of the divergent section (z0,z1) and use the
>>>>>>>>>> section what you gave
>>>>>>>>>> 
>>>>>>>>>> Thank you for the code
>>>>>>>>>> 
>>>>>>>>>> Kamal
>>>>>>>>>> 
>>>>>>>>>> On Jan 19, 2014, at 8:45 PM, nek5000-users at lists.mcs.anl.gov wrote:
>>>>>>>>>> 
>>>>>>>>>>> Kamal,
>>>>>>>>>>> 
>>>>>>>>>>> I would do the following in usrdat2():
>>>>>>>>>>>
>>>>>>>>>>>    n=nx1*ny1*nz1*nelt
>>>>>>>>>>>
>>>>>>>>>>>    do i=1,n
>>>>>>>>>>>       x=xm1(i,1,1,1)
>>>>>>>>>>>       y=ym1(i,1,1,1)
>>>>>>>>>>>       z=ym1(i,1,1,1)
>>>>>>>>>>>       scale = 1.
>>>>>>>>>>>       if (z.gt.z0) scale = smax*(z-z0/(z1-z0)
>>>>>>>>>>>       if (z.gt.z1) scale = smax
>>>>>>>>>>>       xm1(i,1,1,1) = scale*x
>>>>>>>>>>>       ym1(i,1,1,1) = scale*y
>>>>>>>>>>>    enddo
>>>>>>>>>>> 
>>>>>>>>>>> Paul
>>>>>>>>>>> 
>>>>>>>>>>> Make certain that z1 and z0 correspond to z values
>>>>>>>>>>> that precisely coincide with element interfaces.
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> On Sun, 19 Jan 2014, nek5000-users at lists.mcs.anl.gov wrote:
>>>>>>>>>>> 
>>>>>>>>>>>> Hi Paul,
>>>>>>>>>>>> 
>>>>>>>>>>>> I looked into the Peris example but It is so what same like
>>>>>>>>>>>> the stenosis example with a Cosine deformation.
>>>>>>>>>>>> 
>>>>>>>>>>>> In my case it is a pipe with conical divergent. I tried to
>>>>>>>>>>>> play around the variables Xm1, Ym1 and Zm1 but the mapping
>>>>>>>>>>>> doesn't go well.
>>>>>>>>>>>> 
>>>>>>>>>>>> Could you please help me with this.
>>>>>>>>>>>> 
>>>>>>>>>>>> Thank you,
>>>>>>>>>>>> 
>>>>>>>>>>>> Kamal
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> On Jan 18, 2014, at 7:26 PM, nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>> wrote:
>>>>>>>>>>>> 
>>>>>>>>>>>>> Hi Paul,
>>>>>>>>>>>>> 
>>>>>>>>>>>>> I looked at the Helix and stenosis example but they are using
>>>>>>>>>>>>> cosine functions to deform
>>>>>>>>>>>>> 
>>>>>>>>>>>>> I tried to use a tangent function but it bends the whole pipe.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> I dint look at peris example .
>>>>>>>>>>>>> 
>>>>>>>>>>>>> I will take a look at it and let you know.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Thank you
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Kamal
>>>>>>>>>>>>> 
>>>>>>>>>>>>> On Jan 18, 2014, at 7:22 PM, nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Kamal,
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Have you looked at the peris example?  The usr file there
>>>>>>>>>>>>>> shows how to deform
>>>>>>>>>>>>>> a pipe geometry.
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Paul
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> From: nek5000-users-bounces at lists.mcs.anl.gov
>>>>>>>>>>>>>> [nek5000-users-bounces at lists.mcs.anl.gov] on behalf of
>>>>>>>>>>>>>> nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>> [nek5000-users at lists.mcs.anl.gov]
>>>>>>>>>>>>>> Sent: Saturday, January 18, 2014 12:17 PM
>>>>>>>>>>>>>> To: nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>> Subject: Re: [Nek5000-users] Pipe with expansion
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Dear Paul,
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> I tried many ways to map my straight pipe geometry but it
>>>>>>>>>>>>>> does not seem to work properly
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> I used something like
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> X = X + Z * tan ( alpha )
>>>>>>>>>>>>>> Y = Y + Z* tan (alpha )
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> even that dint work. could please help me with this
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Thank you
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Kamal.
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> On Jan 17, 2014, at 2:24 PM, nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Hi Paul,
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Thanks paul. I tried working with the diverging mesh
>>>>>>>>>>>>>>> modification.
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> I tried to use this form of equation to modify the mesh
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> z = mx + b
>>>>>>>>>>>>>>> z = ny  + c
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> x = ( z - b ) / m
>>>>>>>>>>>>>>> y = (z - c)  / n
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Do you think would work ? or is there any other way to
>>>>>>>>>>>>>>> input that ?
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Kamal
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> On 17/01/2014 14:14, nek5000-users at lists.mcs.anl.govwrote:
>>>>>>>>>>>>>>>> Kamal,
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 1) To check for convergence, run your simulation for
>>>>>>>>>>>>>>>> increasing polynomial orders ( lx1 in the SIZE file) and
>>>>>>>>>>>>>>>> measure some consistent quantity (drag, TKE, etc).  You
>>>>>>>>>>>>>>>> can plot this quantity against lx1 and this should give
>>>>>>>>>>>>>>>> you a good picture of how you are converging (without
>>>>>>>>>>>>>>>> needing to change the physical mesh).
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 2) If you weren't using temperature in your simulation,
>>>>>>>>>>>>>>>> you could do put the following code snippet in your userchk
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> c-------------------------------------------
>>>>>>>>>>>>>>>> integer i, ntot
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> ntot = nx1*ny1*nz1*nelv  ! total number of points in
>>>>>>>>>>>>>>>> simulation (on THIS processor)
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> do i = 1,ntot
>>>>>>>>>>>>>>>> t(i,1,1,1,1) = 0.5*(vx(i,1,1,1)**2 + vy(i,1,1,1)**2 +
>>>>>>>>>>>>>>>> vz(i,1,1,1)**2)
>>>>>>>>>>>>>>>> enddo
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> ifto = .true.
>>>>>>>>>>>>>>>> c-------------------------------------------
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> I've assumed here that your density is unity. This
>>>>>>>>>>>>>>>> computed kinetic energy point-wise and stores it in the
>>>>>>>>>>>>>>>> temperature field. The part "ifto = .true." tells Nek to
>>>>>>>>>>>>>>>> output the temperature field whenever it outputs a field
>>>>>>>>>>>>>>>> file.  You could then view this in visit just like you
>>>>>>>>>>>>>>>> would the velocity field.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Hope this helps!
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Josh
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> On Wed, Jan 15, 2014 at 9:52 AM,
>>>>>>>>>>>>>>>> <nek5000-users at lists.mcs.anl.gov> wrote:
>>>>>>>>>>>>>>>> Hi Paul,
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> I will try that mapping, I created a straight pipe to do
>>>>>>>>>>>>>>>> some simulations.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 1) Is there a way to check my spectral convergence, so
>>>>>>>>>>>>>>>> that I can do some mesh convergence study?
>>>>>>>>>>>>>>>> 2) Is there a way to plot the kinetic energy in the flow ?
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Thank you,
>>>>>>>>>>>>>>>> Kamal
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> On 15/01/2014 12:14, nek5000-users at lists.mcs.anl.gov wrote:
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Hi Kamal,
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> For the geometry you describe, I would apply mesh morphing
>>>>>>>>>>>>>>>> to a standard straight pipe.  You can create such a pipe
>>>>>>>>>>>>>>>> using a subset of the mkmesh script provided in the expansion
>>>>>>>>>>>>>>>> example.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> If your transition region is conical, then I woud make
>>>>>>>>>>>>>>>> certain that the change in slope occurs at element
>>>>>>>>>>>>>>>> boundaries,
>>>>>>>>>>>>>>>> i.e., as in the half cross-section depicted below:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>                            _______________
>>>>>>>>>>>>>>>>                           /|      |      |
>>>>>>>>>>>>>>>>                         /  |      |      |
>>>>>>>>>>>>>>>>                       /|   |      |      |
>>>>>>>>>>>>>>>>     ________________/  |   |      |      |
>>>>>>>>>>>>>>>>     |     |     |   |  |   |      |      |
>>>>>>>>>>>>>>>>     |     |     |   |  |   |      |      |
>>>>>>>>>>>>>>>> +-----+-----+---+--+---+------+------+----> z
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Paul
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> On Wed, 15 Jan 2014, nek5000-users at lists.mcs.anl.gov wrote:
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Hi Paul,
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> I looked at the example and it looks very helpful, but for
>>>>>>>>>>>>>>>> a sudden expansion we have only two parts (i.e) the inlet
>>>>>>>>>>>>>>>> pipe and the outlet pipe. Whereas in a diverging pipe we
>>>>>>>>>>>>>>>> have three section (i.e,) The inlet pipe, Diverging
>>>>>>>>>>>>>>>> section and the outlet pipe.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Is it possible for me to create a 2D diverging section
>>>>>>>>>>>>>>>> using mesh modification and revolve it around the centre
>>>>>>>>>>>>>>>> axis to get a 3d diverging pipe ?
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> or should I apply the mesh modification directly to the 3d
>>>>>>>>>>>>>>>> sudden expansion pipe using usrdat2() ?
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>>>>> Kamal
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> On 14/01/2014 21:09, nek5000-users at lists.mcs.anl.gov wrote:
>>>>>>>>>>>>>>>> Hi Paul,
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Thanks a lot for the update. I will take a look at as soon
>>>>>>>>>>>>>>>> as possible and keep you updated with it.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Thank you,
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Kamal
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> On Jan 14, 2014, at 9:04 PM,
>>>>>>>>>>>>>>>> nek5000-users at lists.mcs.anl.gov wrote:
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Kamal,
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> I've added an example for a step-type expansion in a pipe.
>>>>>>>>>>>>>>>> New example directory
>>>>>>>>>>>>>>>> is nek5_svn/examples/expansion, with a README.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> If you want a standard diffuser, I would use
>>>>>>>>>>>>>>>> mesh-morphing, as outlined in the
>>>>>>>>>>>>>>>> nek primer, which can be found on this page:
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> http://nek5000.mcs.anl.gov/index.php/UG#Documentation
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> I've also automated our turbulent outflow bc treatment --
>>>>>>>>>>>>>>>> one simply provides an
>>>>>>>>>>>>>>>> expansion factor (typically ~ 1.5) and two persistent
>>>>>>>>>>>>>>>> arrays to turb_outflow(), which
>>>>>>>>>>>>>>>> is now in navier5.f.    This can be useful when very
>>>>>>>>>>>>>>>> strong vortices are leaving the
>>>>>>>>>>>>>>>> domain, which is possible for certain diffuser flow
>>>>>>>>>>>>>>>> conditions (and others).
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Paul
>>>>>>>>>>>>>>>> ________________________________________
>>>>>>>>>>>>>>>> From: nek5000-users-bounces at lists.mcs.anl.gov
>>>>>>>>>>>>>>>> [nek5000-users-bounces at lists.mcs.anl.gov] on behalf
>>>>>>>>>>>>>>>> ofnek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>>>> [nek5000-users at lists.mcs.anl.gov]
>>>>>>>>>>>>>>>> Sent: Monday, January 13, 2014 3:35 AM
>>>>>>>>>>>>>>>> To: nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>>>> Subject: [Nek5000-users] Creating a Mesh
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Hi
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Can some one please help me in this because I am new to nek
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 1) How can I create a .rea for a specific geometry say ' A
>>>>>>>>>>>>>>>> sudden
>>>>>>>>>>>>>>>> expansion pipe ' or a ' Diverging pipe '
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 2) What tool I should use to create that mesh.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Thank you
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> kamal
>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>> Nek5000-users mailing list
>>>>>>>>>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>> Nek5000-users mailing list
>>>>>>>>>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>> Nek5000-users mailing list
>>>>>>>>>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>> Nek5000-users mailing list
>>>>>>>>>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>> Nek5000-users mailing list
>>>>>>>>>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>> Nek5000-users mailing list
>>>>>>>>>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>> Josh Camp
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> "All that is necessary for the triumph of evil is that
>>>>>>>>>>>>>>>> good men do nothing" -- Edmund Burke
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>> Nek5000-users mailing list
>>>>>>>>>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>> Nek5000-users mailing list
>>>>>>>>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>> Nek5000-users mailing list
>>>>>>>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>> Nek5000-users mailing list
>>>>>>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>>>>>>> 
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Nek5000-users mailing list
>>>>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Nek5000-users mailing list
>>>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>>>> _______________________________________________
>>>>>>>>> Nek5000-users mailing list
>>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>>>> 
>>>>>>>> _______________________________________________
>>>>>>>> Nek5000-users mailing list
>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>> _______________________________________________
>>>>>>> Nek5000-users mailing list
>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>> 
>>>>>> _______________________________________________
>>>>>> Nek5000-users mailing list
>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>> _______________________________________________
>>>>> Nek5000-users mailing list
>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>> 
>>>> _______________________________________________
>>>> Nek5000-users mailing list
>>>> Nek5000-users at lists.mcs.anl.gov
>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>> _______________________________________________
>>> Nek5000-users mailing list
>>> Nek5000-users at lists.mcs.anl.gov
>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>> _______________________________________________
>>> Nek5000-users mailing list
>>> Nek5000-users at lists.mcs.anl.gov
>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>> _______________________________________________
>> Nek5000-users mailing list
>> Nek5000-users at lists.mcs.anl.gov
>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>> _______________________________________________
>> Nek5000-users mailing list
>> Nek5000-users at lists.mcs.anl.gov
>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>
> _______________________________________________
> Nek5000-users mailing list
> Nek5000-users at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>

On Fri, 24 Jan 2014, nek5000-users at lists.mcs.anl.gov wrote:

> Hello Paul,
>
> Thanks for your reply. I am looking into the .usr file for defining the 
> set_obj ().
>
> 1) Could you please tell me what is 'Enter the number of levels ?' in n2to3
>
> is it the number of elements in Z direction ?
>
> 2) As you said about storing the computed vorticity in velocity field to view 
> in VisIT, I found the routine to compute the vorticity but I am stuck about 
> adding it to the velocity filed to VisIT ? could you please tell me how it 
> works or any example which stores vorticity to the .fld file as a separate 
> variable.
>
>
> Thank you
>
> Kamal
>
>
> On 22/01/2014 16:53, nek5000-users at lists.mcs.anl.gov wrote:
>> Axial viscous stress is given by torq_calc -- that's no problem whatsoever. 
>> You get a number as a
>> function of time.
>> 
>> You can even get stresses on multiple subsets of the geometry (e.g., if you 
>> had multiple branches
>> in the domain or multiple cylinders.   The drag, which is a byproduct of 
>> the torque computation (which
>> you can ignore), is given in terms of the viscous and pressure components 
>> separately and as the
>> sum of the two.
>> 
>> You can identify domain boundaries by checking the boundary conditions. 
>> Here, I recommend
>> looking at the set_obj routines in several of the /example cases.
>> 
>> 
>> ________________________________________
>> From: nek5000-users-bounces at lists.mcs.anl.gov 
>> [nek5000-users-bounces at lists.mcs.anl.gov] on behalf of 
>> nek5000-users at lists.mcs.anl.gov [nek5000-users at lists.mcs.anl.gov]
>> Sent: Wednesday, January 22, 2014 9:37 AM
>> To: nek5000-users at lists.mcs.anl.gov
>> Subject: Re: [Nek5000-users] Pipe with expansion
>> 
>> Hello Paul
>> 
>> I was thinking about taking the tangential velocity near to the wall so 
>> that I can figure out my length of the recirculation region.
>> 
>> Is it possible for me to access the boundary elements of the mesh ??? so 
>> that I can take the boundary element and then obtain the velocity at that 
>> point so that I can figure out the length of my recirculation region.
>> 
>> or take the *.fld file and read it to plot the datas I need.
>> 
>> 
>> I also want to calculate the axial viscous force acting on the entire pipe.
>> 
>> which is given by
>> 
>> C_v =  F^v / ( d^2 * rho * U^2 ) =   double integral ( 1/Re * (du / dr) ) 
>> dtheta dz
>> 
>> 
>> On Jan 22, 2014, at 4:07 PM, nek5000-users at lists.mcs.anl.gov wrote:
>> 
>>> Hi Kamal,
>>> 
>>> As I thought about it some more, if you're interested in the local wall 
>>> shear stress
>>> magnitude I'm quite certain you can get this by plotting the magnitude of 
>>> vorticity
>>> on the surface in question.   (Note that the sign of the WSS, which in 
>>> fact is a tensor
>>> or a vector when restricted to a given surface, is lost in this process, 
>>> but that might
>>> not be relevant for your needs.)   If that works, then you can readily 
>>> compute the
>>> vorticity using one of the routines in nek and store the result in a 
>>> velocity field, then
>>> view that field with VisIt.   Of course WSS will require multiplication by 
>>> viscosity.
>>> 
>>> hth,
>>> 
>>> Paul
>>> 
>>> ________________________________________
>>> From: nek5000-users-bounces at lists.mcs.anl.gov 
>>> [nek5000-users-bounces at lists.mcs.anl.gov] on behalf of 
>>> nek5000-users at lists.mcs.anl.gov [nek5000-users at lists.mcs.anl.gov]
>>> Sent: Tuesday, January 21, 2014 10:33 AM
>>> To: nek5000-users at lists.mcs.anl.gov
>>> Subject: Re: [Nek5000-users] Pipe with expansion
>>> 
>>> Hi paul,
>>> 
>>> can I make this to be drag or shear quantities to be return to the a
>>> separate file so that it will easy for me to plot.
>>> 
>>> By the way it gives the integral quantity. Think for example I need to
>>> find the shear stress on the wall  from the inlet to outlet at a
>>> particular time = 2 . How can I do that ?
>>> 
>>> Is there way to find the number of elements in x,y and z direction ?
>>> 
>>> On 21/01/2014 17:32, nek5000-users at lists.mcs.anl.gov wrote:
>>>> Hi Kamal,
>>>> 
>>>> Your integrated drag quantities should be written to the logfile
>>>> (stdout),
>>>> assuming you've set the arguments in the call to be .true.
>>>> 
>>>> Paul
>>>> 
>>>> On Tue, 21 Jan 2014, nek5000-users at lists.mcs.anl.gov wrote:
>>>> 
>>>>> Hi Paul,
>>>>> 
>>>>> I checked the set_obj subroutine and implemented one in my .USR file.
>>>>> The code seem to run without any errors but I don't find where these
>>>>> variables are getting stored.
>>>>> 
>>>>> I use VisIT to visualize my output, even there was no change in it.
>>>>> 
>>>>> do I have to define my own output file and write the variables out ?
>>>>> 
>>>>> Thanks,
>>>>> 
>>>>> Kamal.
>>>>> 
>>>>> 
>>>>> On 20/01/2014 21:52, nek5000-users at lists.mcs.anl.gov wrote:
>>>>>> Hi Kamal,
>>>>>> 
>>>>>> You'll need to compute your own tke by manipulating the
>>>>>> velocity fields.
>>>>>> 
>>>>>> You can get running averages of the requisite quantities
>>>>>> via calls to "avg_all" which is found in navier5.f
>>>>>> 
>>>>>> You can compute shear stress on the wall simply by computing
>>>>>> the drag on the wall, which can be done via a call to torque_calc(),
>>>>>> also found in navier5.f
>>>>>> 
>>>>>> If you cd to /examples and type:
>>>>>>
>>>>>>       grep torq */*.usr
>>>>>> 
>>>>>> you'll find many examples of calls to torque_calc.  You simply
>>>>>> need to prescribe the surfaces on which shear is to be integrated.
>>>>>> 
>>>>>> I typically write a routine "set_obj" to identify such surfaces
>>>>>> on the first call to usrchk.
>>>>>>
>>>>>>       grep set_obj */*.usr
>>>>>> 
>>>>>> will show similar examples.
>>>>>> 
>>>>>> I would recommend trying this for laminar Poiseiulle flow in
>>>>>> a very simple channel just to check that your calls are properly
>>>>>> set.
>>>>>> 
>>>>>> Best,
>>>>>> 
>>>>>> Paul
>>>>>> 
>>>>>> 
>>>>>> On Mon, 20 Jan 2014, nek5000-users at lists.mcs.anl.gov wrote:
>>>>>> 
>>>>>>> Hi Paul,
>>>>>>> 
>>>>>>> Thanks and that helped.
>>>>>>> 
>>>>>>> Where can I find the variables like Turbulent KE , shear stress on
>>>>>>> the wall. ?
>>>>>>> 
>>>>>>> Do i have to activate some parameters for calculating them ?
>>>>>>> 
>>>>>>> If I had to plot them.
>>>>>>> 
>>>>>>> Thanks,
>>>>>>> Kamal
>>>>>>> 
>>>>>>> 
>>>>>>> On Jan 20, 2014, at 5:41 AM, nek5000-users at lists.mcs.anl.gov wrote:
>>>>>>> 
>>>>>>>> Kamal,
>>>>>>>> 
>>>>>>>> Looks good.
>>>>>>>> 
>>>>>>>> I'm guessing that one further refinement would be:
>>>>>>>> 
>>>>>>>> if (z.gt.z0) scale = 1 + (smax-1)*(z-z0)/(z1-z0)
>>>>>>>> if (z.gt.z1) scale = smax
>>>>>>>> 
>>>>>>>> which would yield
>>>>>>>>
>>>>>>>>   scale = 1 when z=z0
>>>>>>>>   scale = smax when z >= z1
>>>>>>>> 
>>>>>>>> Paul
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> On Sun, 19 Jan 2014, nek5000-users at lists.mcs.anl.gov wrote:
>>>>>>>> 
>>>>>>>>> Hi paul,
>>>>>>>>> 
>>>>>>>>> The code works fine, but there should be a small change thats has
>>>>>>>>> to be done
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> if (z.gt.z0) scale = 1 + (z /(z1-z0 )))
>>>>>>>>> if (z.gt.z1) scale = smax
>>>>>>>>> 
>>>>>>>>> This creates a perfect diverging pipe.
>>>>>>>>> 
>>>>>>>>> Thanks for the help paul.
>>>>>>>>> 
>>>>>>>>> Kamal
>>>>>>>>> 
>>>>>>>>> On Jan 20, 2014, at 12:09 AM, nek5000-users at lists.mcs.anl.gov wrote:
>>>>>>>>> 
>>>>>>>>>> Hi paul,
>>>>>>>>>> 
>>>>>>>>>> If I am not wrong,
>>>>>>>>>> I make a mesh with three straight pipes( inlet, divergent,
>>>>>>>>>> outlet ) connected together via n2to3 so that I know the element
>>>>>>>>>> connectivity places of the divergent section (z0,z1) and use the
>>>>>>>>>> section what you gave
>>>>>>>>>> 
>>>>>>>>>> Thank you for the code
>>>>>>>>>> 
>>>>>>>>>> Kamal
>>>>>>>>>> 
>>>>>>>>>> On Jan 19, 2014, at 8:45 PM, nek5000-users at lists.mcs.anl.gov wrote:
>>>>>>>>>> 
>>>>>>>>>>> Kamal,
>>>>>>>>>>> 
>>>>>>>>>>> I would do the following in usrdat2():
>>>>>>>>>>>
>>>>>>>>>>>    n=nx1*ny1*nz1*nelt
>>>>>>>>>>>
>>>>>>>>>>>    do i=1,n
>>>>>>>>>>>       x=xm1(i,1,1,1)
>>>>>>>>>>>       y=ym1(i,1,1,1)
>>>>>>>>>>>       z=ym1(i,1,1,1)
>>>>>>>>>>>       scale = 1.
>>>>>>>>>>>       if (z.gt.z0) scale = smax*(z-z0/(z1-z0)
>>>>>>>>>>>       if (z.gt.z1) scale = smax
>>>>>>>>>>>       xm1(i,1,1,1) = scale*x
>>>>>>>>>>>       ym1(i,1,1,1) = scale*y
>>>>>>>>>>>    enddo
>>>>>>>>>>> 
>>>>>>>>>>> Paul
>>>>>>>>>>> 
>>>>>>>>>>> Make certain that z1 and z0 correspond to z values
>>>>>>>>>>> that precisely coincide with element interfaces.
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> On Sun, 19 Jan 2014, nek5000-users at lists.mcs.anl.gov wrote:
>>>>>>>>>>> 
>>>>>>>>>>>> Hi Paul,
>>>>>>>>>>>> 
>>>>>>>>>>>> I looked into the Peris example but It is so what same like
>>>>>>>>>>>> the stenosis example with a Cosine deformation.
>>>>>>>>>>>> 
>>>>>>>>>>>> In my case it is a pipe with conical divergent. I tried to
>>>>>>>>>>>> play around the variables Xm1, Ym1 and Zm1 but the mapping
>>>>>>>>>>>> doesn't go well.
>>>>>>>>>>>> 
>>>>>>>>>>>> Could you please help me with this.
>>>>>>>>>>>> 
>>>>>>>>>>>> Thank you,
>>>>>>>>>>>> 
>>>>>>>>>>>> Kamal
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> On Jan 18, 2014, at 7:26 PM, nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>> wrote:
>>>>>>>>>>>> 
>>>>>>>>>>>>> Hi Paul,
>>>>>>>>>>>>> 
>>>>>>>>>>>>> I looked at the Helix and stenosis example but they are using
>>>>>>>>>>>>> cosine functions to deform
>>>>>>>>>>>>> 
>>>>>>>>>>>>> I tried to use a tangent function but it bends the whole pipe.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> I dint look at peris example .
>>>>>>>>>>>>> 
>>>>>>>>>>>>> I will take a look at it and let you know.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Thank you
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Kamal
>>>>>>>>>>>>> 
>>>>>>>>>>>>> On Jan 18, 2014, at 7:22 PM, nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Kamal,
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Have you looked at the peris example?  The usr file there
>>>>>>>>>>>>>> shows how to deform
>>>>>>>>>>>>>> a pipe geometry.
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Paul
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> From: nek5000-users-bounces at lists.mcs.anl.gov
>>>>>>>>>>>>>> [nek5000-users-bounces at lists.mcs.anl.gov] on behalf of
>>>>>>>>>>>>>> nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>> [nek5000-users at lists.mcs.anl.gov]
>>>>>>>>>>>>>> Sent: Saturday, January 18, 2014 12:17 PM
>>>>>>>>>>>>>> To: nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>> Subject: Re: [Nek5000-users] Pipe with expansion
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Dear Paul,
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> I tried many ways to map my straight pipe geometry but it
>>>>>>>>>>>>>> does not seem to work properly
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> I used something like
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> X = X + Z * tan ( alpha )
>>>>>>>>>>>>>> Y = Y + Z* tan (alpha )
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> even that dint work. could please help me with this
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Thank you
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Kamal.
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> On Jan 17, 2014, at 2:24 PM, nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Hi Paul,
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Thanks paul. I tried working with the diverging mesh
>>>>>>>>>>>>>>> modification.
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> I tried to use this form of equation to modify the mesh
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> z = mx + b
>>>>>>>>>>>>>>> z = ny  + c
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> x = ( z - b ) / m
>>>>>>>>>>>>>>> y = (z - c)  / n
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Do you think would work ? or is there any other way to
>>>>>>>>>>>>>>> input that ?
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Kamal
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> On 17/01/2014 14:14, nek5000-users at lists.mcs.anl.govwrote:
>>>>>>>>>>>>>>>> Kamal,
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 1) To check for convergence, run your simulation for
>>>>>>>>>>>>>>>> increasing polynomial orders ( lx1 in the SIZE file) and
>>>>>>>>>>>>>>>> measure some consistent quantity (drag, TKE, etc).  You
>>>>>>>>>>>>>>>> can plot this quantity against lx1 and this should give
>>>>>>>>>>>>>>>> you a good picture of how you are converging (without
>>>>>>>>>>>>>>>> needing to change the physical mesh).
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 2) If you weren't using temperature in your simulation,
>>>>>>>>>>>>>>>> you could do put the following code snippet in your userchk
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> c-------------------------------------------
>>>>>>>>>>>>>>>> integer i, ntot
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> ntot = nx1*ny1*nz1*nelv  ! total number of points in
>>>>>>>>>>>>>>>> simulation (on THIS processor)
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> do i = 1,ntot
>>>>>>>>>>>>>>>> t(i,1,1,1,1) = 0.5*(vx(i,1,1,1)**2 + vy(i,1,1,1)**2 +
>>>>>>>>>>>>>>>> vz(i,1,1,1)**2)
>>>>>>>>>>>>>>>> enddo
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> ifto = .true.
>>>>>>>>>>>>>>>> c-------------------------------------------
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> I've assumed here that your density is unity. This
>>>>>>>>>>>>>>>> computed kinetic energy point-wise and stores it in the
>>>>>>>>>>>>>>>> temperature field. The part "ifto = .true." tells Nek to
>>>>>>>>>>>>>>>> output the temperature field whenever it outputs a field
>>>>>>>>>>>>>>>> file.  You could then view this in visit just like you
>>>>>>>>>>>>>>>> would the velocity field.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Hope this helps!
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Josh
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> On Wed, Jan 15, 2014 at 9:52 AM,
>>>>>>>>>>>>>>>> <nek5000-users at lists.mcs.anl.gov> wrote:
>>>>>>>>>>>>>>>> Hi Paul,
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> I will try that mapping, I created a straight pipe to do
>>>>>>>>>>>>>>>> some simulations.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 1) Is there a way to check my spectral convergence, so
>>>>>>>>>>>>>>>> that I can do some mesh convergence study?
>>>>>>>>>>>>>>>> 2) Is there a way to plot the kinetic energy in the flow ?
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Thank you,
>>>>>>>>>>>>>>>> Kamal
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> On 15/01/2014 12:14, nek5000-users at lists.mcs.anl.gov wrote:
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Hi Kamal,
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> For the geometry you describe, I would apply mesh morphing
>>>>>>>>>>>>>>>> to a standard straight pipe.  You can create such a pipe
>>>>>>>>>>>>>>>> using a subset of the mkmesh script provided in the expansion
>>>>>>>>>>>>>>>> example.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> If your transition region is conical, then I woud make
>>>>>>>>>>>>>>>> certain that the change in slope occurs at element
>>>>>>>>>>>>>>>> boundaries,
>>>>>>>>>>>>>>>> i.e., as in the half cross-section depicted below:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>                            _______________
>>>>>>>>>>>>>>>>                           /|      |      |
>>>>>>>>>>>>>>>>                         /  |      |      |
>>>>>>>>>>>>>>>>                       /|   |      |      |
>>>>>>>>>>>>>>>>     ________________/  |   |      |      |
>>>>>>>>>>>>>>>>     |     |     |   |  |   |      |      |
>>>>>>>>>>>>>>>>     |     |     |   |  |   |      |      |
>>>>>>>>>>>>>>>> +-----+-----+---+--+---+------+------+----> z
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Paul
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> On Wed, 15 Jan 2014, nek5000-users at lists.mcs.anl.gov wrote:
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Hi Paul,
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> I looked at the example and it looks very helpful, but for
>>>>>>>>>>>>>>>> a sudden expansion we have only two parts (i.e) the inlet
>>>>>>>>>>>>>>>> pipe and the outlet pipe. Whereas in a diverging pipe we
>>>>>>>>>>>>>>>> have three section (i.e,) The inlet pipe, Diverging
>>>>>>>>>>>>>>>> section and the outlet pipe.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Is it possible for me to create a 2D diverging section
>>>>>>>>>>>>>>>> using mesh modification and revolve it around the centre
>>>>>>>>>>>>>>>> axis to get a 3d diverging pipe ?
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> or should I apply the mesh modification directly to the 3d
>>>>>>>>>>>>>>>> sudden expansion pipe using usrdat2() ?
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>>>>> Kamal
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> On 14/01/2014 21:09, nek5000-users at lists.mcs.anl.gov wrote:
>>>>>>>>>>>>>>>> Hi Paul,
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Thanks a lot for the update. I will take a look at as soon
>>>>>>>>>>>>>>>> as possible and keep you updated with it.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Thank you,
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Kamal
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> On Jan 14, 2014, at 9:04 PM,
>>>>>>>>>>>>>>>> nek5000-users at lists.mcs.anl.gov wrote:
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Kamal,
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> I've added an example for a step-type expansion in a pipe.
>>>>>>>>>>>>>>>> New example directory
>>>>>>>>>>>>>>>> is nek5_svn/examples/expansion, with a README.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> If you want a standard diffuser, I would use
>>>>>>>>>>>>>>>> mesh-morphing, as outlined in the
>>>>>>>>>>>>>>>> nek primer, which can be found on this page:
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> http://nek5000.mcs.anl.gov/index.php/UG#Documentation
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> I've also automated our turbulent outflow bc treatment --
>>>>>>>>>>>>>>>> one simply provides an
>>>>>>>>>>>>>>>> expansion factor (typically ~ 1.5) and two persistent
>>>>>>>>>>>>>>>> arrays to turb_outflow(), which
>>>>>>>>>>>>>>>> is now in navier5.f.    This can be useful when very
>>>>>>>>>>>>>>>> strong vortices are leaving the
>>>>>>>>>>>>>>>> domain, which is possible for certain diffuser flow
>>>>>>>>>>>>>>>> conditions (and others).
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Paul
>>>>>>>>>>>>>>>> ________________________________________
>>>>>>>>>>>>>>>> From: nek5000-users-bounces at lists.mcs.anl.gov
>>>>>>>>>>>>>>>> [nek5000-users-bounces at lists.mcs.anl.gov] on behalf
>>>>>>>>>>>>>>>> ofnek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>>>> [nek5000-users at lists.mcs.anl.gov]
>>>>>>>>>>>>>>>> Sent: Monday, January 13, 2014 3:35 AM
>>>>>>>>>>>>>>>> To: nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>>>> Subject: [Nek5000-users] Creating a Mesh
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Hi
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Can some one please help me in this because I am new to nek
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 1) How can I create a .rea for a specific geometry say ' A
>>>>>>>>>>>>>>>> sudden
>>>>>>>>>>>>>>>> expansion pipe ' or a ' Diverging pipe '
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 2) What tool I should use to create that mesh.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Thank you
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> kamal
>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>> Nek5000-users mailing list
>>>>>>>>>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>> Nek5000-users mailing list
>>>>>>>>>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>> Nek5000-users mailing list
>>>>>>>>>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>> Nek5000-users mailing list
>>>>>>>>>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>> Nek5000-users mailing list
>>>>>>>>>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>> Nek5000-users mailing list
>>>>>>>>>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>> Josh Camp
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> "All that is necessary for the triumph of evil is that
>>>>>>>>>>>>>>>> good men do nothing" -- Edmund Burke
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>> Nek5000-users mailing list
>>>>>>>>>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>> Nek5000-users mailing list
>>>>>>>>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>> Nek5000-users mailing list
>>>>>>>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>> Nek5000-users mailing list
>>>>>>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>>>>>>> 
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Nek5000-users mailing list
>>>>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Nek5000-users mailing list
>>>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>>>> _______________________________________________
>>>>>>>>> Nek5000-users mailing list
>>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>>>> 
>>>>>>>> _______________________________________________
>>>>>>>> Nek5000-users mailing list
>>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>> _______________________________________________
>>>>>>> Nek5000-users mailing list
>>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>>>> 
>>>>>> _______________________________________________
>>>>>> Nek5000-users mailing list
>>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>> _______________________________________________
>>>>> Nek5000-users mailing list
>>>>> Nek5000-users at lists.mcs.anl.gov
>>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>>>> 
>>>> _______________________________________________
>>>> Nek5000-users mailing list
>>>> Nek5000-users at lists.mcs.anl.gov
>>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>> _______________________________________________
>>> Nek5000-users mailing list
>>> Nek5000-users at lists.mcs.anl.gov
>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>>> _______________________________________________
>>> Nek5000-users mailing list
>>> Nek5000-users at lists.mcs.anl.gov
>>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>> _______________________________________________
>> Nek5000-users mailing list
>> Nek5000-users at lists.mcs.anl.gov
>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>> _______________________________________________
>> Nek5000-users mailing list
>> Nek5000-users at lists.mcs.anl.gov
>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>
> _______________________________________________
> Nek5000-users mailing list
> Nek5000-users at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>


More information about the Nek5000-users mailing list