DISPLAY
When a cartesian coordinate system rotates about an axis normal
to is x-y plane, the x- and y-direction momentum equations have
additional terms representing centrifugal and coriolis acceler-
ations.
In the present case, these terms are supplied by way of In-Form
sources, appropriate to the clockwise rotation about an axis at
x=0 and y=0.
The boundary conditions correspond to rotation of the grid within
a fluid which is wholly at rest, for which the exact solution is
of course:
for the velocities, solid-body rotation relative to the grid in
the anti-clockwise direction; and
for the pressure, absence of pressure gradients.
An interesting result is found, for which the reason is not
perfectly clear: whether the grid is coarse (5*5) or fine
(100*100), pressure gradients are in fact absent only when the
nominal source terms are multiplied by a factor approximately
equal to 1/3.
Velocity and pressure fields for the 100*100 case may be seen by
clicking
here
and
here.
The difference of pressure is 0.74 N/m**2 from bottom-left to
top-right, which should be compared with approximately 100 N/m**2
when the factor is zero and approximately -200 N/m**2 when the
factor is unity.
The reason for this requires to be investigated.
ENDDIS
Echo DISPLAY / USE settings
************************************************************
IRUNN = 1 ;LIBREF = 369
************************************************************
Group 1. Run Title
TEXT(Rotating coordinates )
************************************************************
Group 2. Transience
STEADY=t
************************************************************
Groups 3, 4, 5 Grid Information
nx=5;ny=5
nx=100;ny=100
#unigrid
************************************************************
Group 7. Variables: STOREd,SOLVEd,NAMEd
ONEPHS = t
SOLVE(P1 ,u1 ,v1 )
store(ugrd,vgrd) ! velocity component s of grid
inform7begin
REAL(omega,factor)
omega=10 ! angular velocity
omega=1
factor=0.333 ! multiplication factor for sources
CHAR(form)
form=:omega:*yg ! formula for ugrd
(initial var ugrd is :form:)
form=-:omega:*xg ! formula for vgrd
(initial var vgrd is :form:)
inform7end
************************************************************
Group 9. Material properties
enul=0
************************************************************
Group 11. Initialise Var/Porosity Fields
fiinit(p1)= 0.0
inform11begin
patch(whole,cell,1,nx,1,ny,1,nz,1,1)
form=-:omega:*yg
(initial of u1 at whole is :form:)
form=:omega:*xg
(initial of v1 at whole is :form:)
inform11end
************************************************************
Group 13. Boundary & Special Sources
! pressure fixed to zero at all boundary cells
! and one internal cell
Patch (north, cell,1,nx,ny,ny,1,1,1,1)
coval(north,p1, fixval,0.0)
Patch (south, cell,1,nx,1,1,1,1,1,1)
coval(south,p1,fixval,0.0)
Patch (east, cell,nx,nx,1,ny,1,1,1,1)
coval(east,p1,fixval,0.0)
Patch (west, cell,1,1,1,ny,1,1,1,1)
coval(west,p1, fixval,0.0)
Patch (middle, cell,nx/2,nx/2,ny/2,ny/2,1,1,1,1)
coval(middle,p1, fixval,0.0)
inform13begin
! velocities fixed to negative of grid velocity
! at all boundaries by inform sources using
! the COVAL functiion
patch(unorth,volume,1,nx-1,ny,ny,1,1,1,1)
(source of u1 at unorth is coval(fixval,-ugrd))
patch(usouth,volume,1,nx-1,1,1,1,1,1,1)
(source of u1 at usouth is coval(fixval,-ugrd))
patch(ueast,volume,nx-1,nx-1,1,ny,1,1,1,1)
(source of u1 at ueast is coval(fixval,-ugrd))
patch(uwest,volume,1,1,1,ny,1,1,1,1)
(source of u1 at uwest is coval(fixval,-ugrd))
patch(vnorth,volume,1,nx,ny-1,ny-1,1,1,1,1)
(source of v1 at vnorth is coval(fixval,-vgrd))
patch(vsouth,volume,1,nx,1,1,1,1,1,1)
(source of v1 at vsouth is coval(fixval,-vgrd))
patch(veast,volume,nx,nx,1,ny-1,1,1,1,1)
(source of v1 at veast is coval(fixval,-vgrd))
patch(vwest,volume,1,1,1,ny-1,1,1,1,1)
(source of v1 at vwest is coval(fixval,-vgrd))
! centrifugal and coriolis accelerations created as
! fixed-flux (by default) inform sources
patch (usource,volume,1,nx-1,1,ny,1,1,1,1)
(source of u1 at usource is -factor*omega*(omega*xu+2.0*v1))
patch (vsource,volume,1,nx,1,ny-1,1,1,1,1)
(source of v1 at vsource is -factor*omega*(omega*yv-2.0*u1))
inform13end
************************************************************
Group 15. Terminate Sweeps
LSWEEP = 20
RESFAC = 1.000000E-03
************************************************************
Group 16. Terminate Iterations
lsweep=1000
************************************************************
Group 17. Relaxation
RELAX(P1 ,LINRLX, 5.000000E-01)
relax(u1,falsdt,0.1)
relax(v1,falsdt,0.1)
************************************************************
Group 20. Preliminary Printout
ECHO = T
************************************************************
Group 21. Print-out of Variables
OUTPUT(V1 ,Y,Y,Y,N,Y,Y)
OUTPUT(u1 ,Y,Y,Y,N,Y,Y)
************************************************************
Group 22. Monitor Print-Out
IXMON = nx/2 ; iymon = ny/2
TSTSWP = -1
************************************************************
Group 24. Dumps For Restarts
#maxabs
STOP