RO[tate] AX[is] <axis specification> ANG[le] <angle>.... causes the rotation of the plot about an arbitrary axis in 3D.
The axis may be specified in the same way as for VIEW and UP; angles are in degrees, and may be positive or negative.
In order to rotate about the VIEW direction, enter ROT <angle>. For example, ROT AX 1 1 1 ANG 30 will cause a rotation of 30 degrees about the 1 1 1 axis.
NOTE that rotations are cumulative. This command causes an immediate redraw.
------------------------------------- Photon Help ----
Rotates the object in the current graphic window with the mouse. During rotation, the outlines of the object will be shown following the mouse movement.
You can rotate a plot about any axis; and, on rotation, the appropriate V and U directions are automatically reset. You do this via the command:
ROTATE AXIS <direction> ANGLE <degrees>
where you specify the axis direction in the same way as the VIEW and UP directions. The angle is given in degrees: +45 degrees rotates 45 degrees clockwise, conversely, -45 rotates by 45 degrees anticlockwise. For example:
ROT AXIS 1 1 1 ANGLE 45 (rotate by 45 around 1 1 1)
ROT AXIS 1 1 1 ANGLE -45 (and back to original position)
In order to rotate about the current view direction (eg in the plane of the screen), you need only specify the angle, eg:
ROTATE ANG 45
In a case such as this, where you specify only the angle, you must omit the keyword ANGLE.
Rotations are cumulative. The easiest way to undo a series of rotations is to use the UP and VIEW commands to reset the original orientation and viewpoint.
ROTAtional sources....are the centrifugal and coriolis forces which arise when the coordinate system as a whole rotates; they appear as sources of momentum in the equations for U1, U2, V1, V2, W1 and W2.
The sources are provided by coding to be found in open-source subroutine GXROTA, which resides in file GXROTASO.FOR .
This subroutine is called whenever there exists a PATCH of which the name commences with the characters 'ROTA', whether upper or lower case.
The patch must be of PHASEM type. with CO=FIXFLU and VAL=GRND1.
Options are there provided for:
For both coordinate systems, the rotational speed, in radians per second, is set by way of the PIL variable, ANGVEL.
The axis of rotation is defined as follows:
ROTAXA, ROTAYA, ROTAZA for point A; and
ROTAXB, ROTAYB, ROTAZB for point B.
COVAL commands should then be specified for all velocity components.
The PIL commands for a BFC system rotating about the XC axis at 20 radians per second might thus be:
PATCH(ROTA,PHASEM,1,NX,1,NY,1,NZ,1,LSTEP)
COVAL(ROTA,U1,FIXFLU,GRND1)
COVAL(ROTA,V1,FIXFLU,GRND1)
COVAL(ROTA,W1,FIXFLU,GRND1)
ANGVEL=20.0
ROTAXA=0.0;ROTAYA=0.0;ROTAZA=0.0
ROTAXB=1.0;ROTAYB=0.0;ROTAZB=0.0 .
For cylindrical-polar coordinates, the axis of rotation is always the z-axis, i.e. that for which angle x equals zero and distance y equals minus RINNER.
Therefore COVAL commands should be specified for U1(U2) and V1(V2), but not for W1(W2).
ROTAXA, ROTAYA, etc, need not be set.
For BFC=T, it is possible to employ a reduced-pressure system.
This is activated by setting the PIL variable IROTAA=1 (its default value is zero).
This causes the subtraction, from the centrifugal force at each location, of the force which would be present if the body were rotating as a solid body, ie: (radius)*ANGVEL**2 .
When the fluid rotates as a solid body, this produces a uniform (reduced-) pressure field.
In this system, the fluid rotates with the grid. A wall which is stationary in the absolute frame of reference must be given a velocity with the opposite sign to the fluid. If the system is rotating at ANGVEL radians/s, a wall must be given a velocity of -ANGVEL*RADIUS. The setting IURVAL=-1 allows U1 boundary conditions to be set in terms of radians/s directly.
In the VR-Editor, settings for rotating co-ordinate systems are made from the Main Menu - Sources panel.
In cylindrical-polar co-ordinates, it is also possible to create a zone or block of rotating co-ordinate system which does not cover the entire domain.
The cells within this zone are shifted in X by NXDT cells at the start of each time-step. All SOLVEd and STOREd variables, all geometrical quantities and all cut-cell values are so shifted. At the boundaries of the moving zone, the convection and diffusion neighbours are adjusted by +/- ANGVEL*RADIUS.
This allows for the easy representation of a rotating object, such as a fan or propeller, moving relative to the stationary domain. The shift by a whole number of cells means that the X-direction grid must be uniform.
Such a block of cells is defined by the PIL commands;
PATCH(ROTA,PHASEM,1,NX,iy1,iy2,iz1,iz2,1,LSTEP)
COVAL(ROTA,U1,FIXFLU,GRND1)
COVAL(ROTA,V1,FIXFLU,GRND1)
COVAL(ROTA,W1,FIXFLU,GRND1)
ANGVEL=20.0
SPEDAT(SET,ROTOR,NXDT,I,nxdt)
SPEDAT(SET,ROTOR,IY1,I,iy1)
SPEDAT(SET,ROTOR,IY2,I,iy2)
SPEDAT(SET,ROTOR,IZ1,I,iz1)
SPEDAT(SET,ROTOR,IZ2,I,iz2)
The time-step settings must be made consistently with the rotation speed, number of cells, X size of domain and number of cells jumped. The total time for N revolutions is
TLAST= 2*PI * N / ANGVEL
and the number of steps required is
LSTEP = N * NX * 2*PI / (NXDT*XULAST)
Because of the sliding grid, the U1 (and U2) velocities mean different things in different parts of the domain. As a consequence, it is not meaningful to use U1 or U2 to construct vectors or streamlines. It makes more sense to compute the velocity in the absolute frame of reference (TRU1/2), and the velocity relative to the rotating frame (U1RL/U2RL), and use either of those for vectors and streamlines.
This can be done using In-Form to generate the additional velocity components;
(STORED TRU1 is U1)
(STORED TRU1 is U1-ANGVEL*RG with if(iy.ge.iy1.and.iy.le.iy2.and.iz.ge.iz1.and.iz.le.iz2))
(STORED U1RL is U1+ANGVEL*RG)
(STORED U1RL is U1 with if(iy.ge.iy1.and.iy.le.iy2.and.iz.ge.iz1.and.iz.le.iz2))
In the VR-Editor the object type ROTOR implements all the above settings.
wbs