Encyclopaedia Index

RSET

RSET is an Advanced PIL Command which can be used to define a Cartesian or polar grid, or a time subdivision.
Its format is:
RSET(KEY_WORD,ARG1...)

Options are:

RSET(M,...) Set grid dimension and tolerance
RSET(D,...) Set the solution domain
RSET(B,...) Set an object
RSET(X,...) Modify a region in X direction
RSET(Y,...) Modify a region in Y direction
RSET(Z,...) Modify a region in Z direction
RSET(U,...) Set time dependence
RSET(T,...) Modify a time region
RSET(V,...) Set graphic view control
RSET(G,...) Get grid and object information

These will now be explained, in turn.


1. RSET(M,...) Set grid dimension and tolerance(s)

Format:

RSET(M,ni,nj,nk,toler)
ni -- Number of cells in X direction
nj -- Number of cells in Y direction
nk -- Number of cells in Z direction
toler -- Tolerance (optional)

In this instance, the same tolerance is used in all three directions. If the tolerance is not specified, a default value of 0.001 m is used.

If a different tolerance is required in each direction, the following form of the command can be used:

RSET(M,ni,nj,nk,tolx,toly,tolz)
ni -- Number of cells in X direction
nj -- Number of cells in Y direction
nk -- Number of cells in Z direction
tolx,toly,tolz -- Tolerances in X, Y and Z directions

This command matches a grid with dimension (ni,nj,nk) to the solution domain, taking all objects into account.

Region boundaries in all three directions are automatically defined around objects so that all faces of an object lie on or within a distance of the 'tolerance' to region boundaries.

This command 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.

2. 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 Domain.

The default Solution Domain is a 1 metre cube; the default name of the Solution Domain is "CHAM".

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 monochrome screen, the colour index must be 1. Line styles vary from 0 to 4, with 0 for a solid line.


3. 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 object
y0 -- Y position of the low-south-west corner of the object
z0 -- Z position of the low-south-west corner of the object
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.

Any 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 or within a distance of the 'tolerance' to the boundaries of an object (see GRDPWR, NREGX etc.).


4. RSET(X,...) Modify a region in X direction

Format:

RSET(X,ireg,ncell,power) -- set X grid in region ireg
ireg -- the current region number
ncell -- number of cells to be set in the region
power -- the grid distribution power

This command sets the grid distribution inside the specified region.


5. RSET(Y,...) Modify a region in Y direction

Format: RSET(Y,ireg,ncell,power) ---- set Y grid in a region

This command does for the grid in the y-direction what RSET(X,... does in the x-direction.


6. RSET(Z,...) Modify a region in Z direction

Format: RSET(Z,ireg,ncell,power) ---- set Z grid in a region

This command does for the grid in the z-direction what RSET(X,... does in the x-direction.


7. RSET(U,...) Set time dependence

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.


8. RSET(T,...) Modify a time region

Format: RSET(T,ireg,ncell,power) ---- set timesteps in a region

This command does for the time dependence what RSET(X,... does in the x-direction.


9. RSET(V,...) Set graphic view control

Format:

RSET(V,iopt)
iopt -- integer to control the display of objects
iopt = 0 switch off
iopt = 2 switch on

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 appear.

The display colours and line styles are set by RSET(D,... and RSET(B,...


10. RSET(G,...) Get grid and object information

Format:

RSET(G,D,rt1,rt2,rt3,it1,it2,it3) ---- get domain parameters. (see GSET(D,...))
RSET(G,B,rt1,rt2,rt3,rt4,rt5,rt6,it1,it2,it3) ---- get object parameters.
RSET(G,R,name,type,irx1,irx2,iry1,iry2,irz1,irz2) ---- get region numbers for an object.
RSET(G,N,number) ---- get total number of objects.
RSET(G,N,i,type,name,x0,y0,z0,dx,dy,dz,icol,idash) ---- get parameters of the I'th object. (see GSET(B,...))0
RSET(G,V,it1) ---- get display control setting. (see GSET(V,...))

This command may be used to obtain information about the grid and objects which have been defined using other RSET(...) commands.


The RSET commands are employed in the PHOENICS grid-generation menu.