Part 2. Cartesian, polar grid and time setting tutorial
- PIL variables and commands involved
- Set grid and time steps by regions
- Set grid and time steps by objects
1. PIL variables and commands
- Control variables
- Direct setting
- NX XULAST XFRAC
- NY YVLAST YFRAC
- NZ ZWLAST ZFRAC
- LSTEP TFIRST TLAST TFRAC
- NREGX IREGX GRDPWR(X
- NREGY IREGY GRDPWR(Y
- NREGZ IREGZ GRDPWR(Z
- TFIRST NREGT IREGT GRDPWR(T
2. Set grid and time steps by regions
NREGX, IREGX, GRDPWR(X (Same for Y, Z, T)
- NREGX....is the number of regions in the X direction. By default,
every region contains 1 cell and has an extent of 1 metre (or 1
radian if CARTES=F). Default NREGX=1.
- IREGX....is the current region number in the X direction. Note
that the GRDPWR command will only apply to the current region.
See GRDPWR for further details. Default IREGX=1.
- GRDPWR....command to set intervals for the current region in X,
Y or Z, and time dimensions, thus:
- Format: GRDPWR(X,num,ext,pwr)
- num -- Number of cells in the current region
Negative num will set symmetric power law
- ext -- Extent of the current region in meter
- pwr -- Distribution power in the region
Negative pwr will set the power law from the high end.
Example using NREGX, IREGX, GRDPWR(X :
3. Set grid and time steps by objects
Warning: When hand-editing a Q1 file, it is unwise to use both
region and object commands; for the latter imply some of the former,
but not vice versa.
- RSET(D,...) Set the Solution Domain
- Format: RSET(D,name,dx,dy,dz,icol,idash)
- name -- String of up to 8 alpha-numerical characters,
name of the solution domain
- dx -- X size of the solution domain
- dy -- Y size of the solution domain
- dz -- Z size of the solution domain
- icol -- Colour index for displaying the solution domain
- idash -- Line type index for displaying the solution domain
The Solution Domain is the space in which the Cartesian or polar
grid is generated, ie the grid must be contained within the Solution
The default Solution Domain is a 1 metre cube; the default
name of the Solution Domain is "NOTSET". dx, dy and dz must be
greater than zero (even for 1- or 2-D grids).
In a polar domain, dx
represents the total angle in radians.
The colour index varies from
1 to 15 on a colour screen, the colour range is: 1 for white, 2 for
dark blue, ... , 15 for red. On a monocrome screen, the colour index
must be 1. Line styles vary from 0 to 4, with 0 for a solid line.
- RSET(B,...) Set an Object
- Format: RSET(B,name,x0,y0,z0,dx,dy,dz,icol,idash)
- name -- String of up to 8 alpha-numeric characters,
the name of the object
- x0 -- X position of the low-south-west corner of the
- y0 -- Y position of the low-south-west corner of the
- z0 -- Z position of the low-south-west corner of the
- dx -- X size of the object
- dy -- Y size of the object
- dz -- Z size of the object
- icol -- Colour index for displaying the object
- idash -- Line type index for displaying the object
This command is used to define or modify objects. An object can be
either a three-dimensional block, or a two-dimensional panel.
object must be defined within or on the boundary of the solution
domain. Dx, dy and dz must be greater than (or equal to) zero.
Region boundaries are automatically created on the boundaries of an
object (see GRDPWR, NREGX etc.). Up to 50 objects can be defined.
- RSET(M,...) Match Grid
- Format: RSET(M,ni,nj,nk)
- ni -- Number of cells in X direction
- nj -- Number of cells in Y direction
- nk -- Number of cells in Z direction
This command matches a grid with dimension (ni,nj,nk) to the
solution domain, taking all objects into account.
in all three directions are automatically defined around objects so
that all faces of an object lie on region boundaries.
distributes the total number of cells in each direction across
regions in the most uniform way. ni must not be less than number of
regions in the x-direction, likewise for nj and nk.
- RSET(X [RSET(Y, RSET(Z, RSET(T are similar]
RSET(X,...) Cut regions and modify grid in X direction
- Format: RSET(X,L,0,pos) -- cut region at X = pos
- RSET(X,ireg,ncell,power) -- set X grid in region ireg
- pos -- real value or expression, the position where a
region boundary is set
- ireg -- the current region number
- ncell -- number of cells to be set in the region
- power -- the grid distribution power
This command has two functions. The first splits one region into two
at a specified position; the second sets the grid distribution
inside the specified region.
To split a region, the position must be
inside the solution domain, and measured along the x-axis from
If the position coincides with an existing region boundary,
this command has no effect.
- RSET(V,...) Set Graphic View Control
- Format: RSET(V,iopt)
- iopt -- integer to control the display of objects
- iopt = 0 switch off the display
- iopt = 1 switch on geometry
- iopt = 2 switch on geometry and name
This command controls whether or not the Solution Domain and Objects
are shown when a GDRAW or VIEW command is issued. When they are
shown on the screen, their names also appears. The display colour
and line styles are set by RSET(D,... and RSET(B,...
- RSET(U,...) Set uniform time step
- Format: RSET(U,t0,dt,nt)
- t0 -- The starting time
- dt -- The total time duration
- nt -- Number of time steps
This command sets a uniform time-step distribution over the defined
time duration starting at t0.