[Nek5000-users] Body Force And USR Questions

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Tue Aug 27 20:11:58 CDT 2013


Hi All,

I hate to ask such lengthy and simple questions, but I'm getting stuck 
and could use a sharp kick...  I read through source code, examples, and 
the docs, but could still use some help...  I have some background with 
SEM study and my own trivial code, so I have some understanding of the 
spatial discretization part of it.  I have a trivial "template" problem 
setup and running.

My problem is understanding what some of the variables are (in context 
of their use in the code), and how to use them in the .usr file to do 
what I want.  I'm trying to simulate a horizontal wind turbine wake 
flow, using the actuator disc method and then the actuator line method.  
I can get some flow results by specifying constant body forces in .usr.  
I have also tried a simple use of what I think is the z-velocity in an 
equation to calculate a body force, and this seems to work also...

I'd like to move on to more complex body force calculations, but need to 
know more about what some of the variables are; how they're calculated, 
and how they are used/called in .usr.  The following is my first pass at 
a list of questions:

1) Spatially, which variables specify the actual GLL point numbers (not 
physical coordinates, but point count in each coordinate direction)?  
Are these ix,iy,iz?  I assume they are numbered per element?

2) Are x,y,z the real physical coordinates in space?  Are they the 
actual domain size?  Are there non-dimensional coordinates also? What 
are the xc,yc,zc variables?

3) Are ux, uy, uz the fluid velocities in the coordinate directions?

4) Can the velocities and forces be specified or referred to at any 
physical location, or only at the GLL points?  In other words, is there 
internal extrapolation going on, or do I need to specify and read my 
forces at GLL points only?  All the subroutines seem to call based on 
ix,iy,iz; when I run the following, it does calculate some forces:

subroutine userf  (ix,iy,iz,ieg)
       include 'SIZE'
       include 'TOTAL'
       include 'NEKUSE'
c
       ffx = 0.
       ffy = 0.
       ffz = 0.

       if ((z>70).AND.(z<71.).AND.(x>60.).AND.(x<90.)
      +.AND.(y>60.).AND.(y<90.)) then

       ffz = -(.5*1.2*(uz**2.)*(4.*.9*(1.-.9)))
c      ffz = (-1000.)
       endif

c      write (6,*) ffz,ieg

       return
       end

However, if I change my spatial selection to:

if ((z==71.).AND.(x>60.).AND.(x<90.)
      +.AND.(y>60.).AND.(y<90.)) then

I get no force output.  If everything is at the GLL locations, are there 
available subroutines to extrapolate to/from physical locations?

5) I assume that the subroutines in .usr are called at each time step?  
Is "istep" the number of the time step?  Is "time" the actual time 
integration time, or the wall clock?  What is "itime"?  Just want to be 
able to calculate physical location of a line moving on the grid based 
on time step...

Thanks,
Murph


-- 

*Murphy Leo O'Dea, PE"Murph"*

PhD Student, Mechanical Engineering

/School Of Engineering And Computer Science/

/Oakland University/

mlodea at oakland.edu <mailto:mlodea at oakland.edu>

http://www.secs.oakland.edu/~mlodea/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20130827/99b5797b/attachment-0001.html>


More information about the Nek5000-users mailing list