General Program Information
Inputs Needed to Call the Grit Function
gritorigin -
*x: tankorigin0 - tankdim0 - tankthick
*y: [[tank{~}origin1~ + (num{~}tanks~tank{~}dim1~) + (num{~}tanks~tank{~}thick~) + numfloc{~}tanks~floc{~}dim1~ + (numfloc{~}tanks~ - 1)tank{~}thick~]- 1flocdim1/2]
*z: tankorigin2 + flocinleth
gritdim - user input
walkwaywidth -
Δxgrit = walkwaywidth
Δygrit \= tankthick + flocdim1/2 + walkwaywidth - gritdim1 - 2gritthick
Δzgrit \= tankdim2 - channeldim2 - platformthick - flocinleth
gritthick -
platformthick -
gritpipeinr -
gritrad - user input
gritriserh - user input
gritholes - user input
gritdisp1 - user input
gritdisp2 - user input
Inputs Defined within the Grit Function
pipe2.origin
*x: origin0 - firstdisp - ElbowRadius(2R1)
*y: origin1
*z: origin2 + ElbowRadius(2R1)
pipe3.origin
*x: origin0 - firstdisp - 2ElbowRadius(2R1)
*y: origin1
*z: origin2 + Δz - ElbowRadius(2R1) - SocketDepth(2R1)
pipe4.origin
*x: origin0 - Δx - 2thicktank - tankdim0 - ShortTeeLength(2R1) - SocketDepth(2R1)
*y: origin1 + Δy + thicktank + tankdim1/2
*z: origin2 + Δz + thickplatform + tankdim2/2 + TeeLength(2R1)/2
pipe5.origin
*x: origin0 - Δx - 2thicktank - tankdim0 - ShortTeeLength(2R1)- SocketDepth(2R1)
*y: origin1 + Δy + thicktank + tankdim1/2
*z: origin2 + Δz - SocketDepth(2R1)
pipe6.origin
*x: origin0 - Δx - thicktank - tankdim0
*y: origin1 + Δy + thicktank + tankdim1/2
*z: origin2 + Δz + platformthick + tankdim2/2
pipe7.origin
*x: origin0 - Δx - thicktank - tankdim0 + seconddisp + CrossLength(2R1)
*y: origin1 + Δy + thicktank + tankdim1/2
*z: origin2 + Δz + platformthick + tankdim2/2
tank.origin
*x: origin0 - Δx - thicktank
*y: origin1 + Δy + thicktank
*z: origin2 + Δz + thickplatform
origin
tank.dim
Δx
Δy
Δz
thick.tank
thick.platform
R1
R.hole
H.riser
num.holes
firstdisp
seconddisp
Inputs Defined within the Grit-2 Function
pipe1length = gritdisp1
pipe2length = Δzgrit - 3ElbowRadius(2gritpipeinr) - SocketDepth(2gritpipeinr)
pipe3length = 2 + (Δy{~}grit~ + grit{~}thick~ + grit{~}dim1~/2)^2^5 - 2ElbowRadius(2gritpipeinr)
pipe4length = gritdim2/2
pipe5length = platformthick + pipe4length - TeeLength(2gritpipeinr)/2
pipe6length = gritdisp2
pipe7length = 2SocketDepth(2gritpipeinr)
origin = gritorigin
grittankorigin =
*x: origin0 - Δxgrit - gritthick
*y: origin1 + Δygrit + gritthick
*z: origin2 + Δzgrit + platformthick
pipe2origin =
*x: origin0 - pipe1length - ElbowRadius(2gritpipeinr)
*y: origin1
*z: origin2 + ElbowRadius(2gritpipeinr)
Technical Program Outline
NOTE All dimensions, axis and angles are defined from a top view
layer1 - Creates a 'grit-pipe' layer for all of the pipes in the program
layer1 <-- layernew("grit-pipe", blue)
Pipe1 - Creates a pipe with an origin at the variable "origin". See Pipe Help for details on the pipe function.
Pipe1 <-- Pipe(origin, R1, firstdisp)
pipe1 length = gritdisp1
Rotate1 - the rotate3d function is used to rotate the pipe about the y axis, with the origin as the pivot, -90 degrees. Information about the rotate3d function can be found in the basics help page
Pipe2
pipe2 origin =
- x:origin 0 - pipe1 length - ElbowRadius
- y:origin 1
- z:origin 2 + ElbowRadius
pipe2 length = Δz grit - 3ElbowRadius - SocketDepth (See frontview picture in general section if not clear)
Notes: ElbowRadius is the radius of curvature of an elbow. In the script it is given as a function of the inner pipe radius. This function is defined in the Pipe Database program
SocketDepth is the connection depth for pieces such as elbows and tees which connect with pipes. In the script it is given as a function of the inner pipe radius. This function is defined in the Pipe Database program
Pipe3
pipe3 origin =
- x:origin 0 - pipe1 length - 2ElbowRadius
- y:origin 1
- z:origin 2 + pipe2 length + 2ElbowRadius
pipe3 length = (See topview picture in general section if not clear)
( (Δx grit + 2grit thick + ShortTeeLength + SocketDepth - ElbowRadius - pipe1 length) 2 + (Δy grit + grit thick + (grit dim1/2) ) 2) 0.5 - 2ElbowRadius
Note: ShortTeeLength is the length of the shorter piece of a tee; it is the distance from the center of the longer piece of the tee to just before the connection piece. To clarify this see the tee help page.In the script it is given as a function of the inner pipe radius. This function is defined in the Pipe Database program
Rotate2 - the rotate3d function is used to rotate pipe3 about the y axis, with its own origin as the pivot point, -90 degrees.
layer2 creates a new layer "grit-elbow" for all the elbows in the program
layer3 freezes the "grit-pipe" layer. When a layer is frozen, you can neither see nor alter the objects set under that layer. You only want to work with one layer at a time to avoid interference with other objects. Some elbows and pipes for example over overlap at times and this sidesteps that problem.
elbow1 See Elbow Help for details on the elbow function.
elbow1 origin =
- x: origin 0 - pipe1 length - ElbowRadius
- y: origin 1
- z: origin 2
Note: The pipes are currently frozen, but are shown in the image to illustrate location
Rotate3 the rotate3d function is used to rotate elbow1 90 degrees about the z axis, with the above labeled rotation point as the pivot point.
rotation point = (not an actual variable in the script)
Rotate4 the rotate3d function is used to rotate elbow1 -90 degrees about the x axis. The rotation point is the same as the one used in Rotate3
elbow2
elbow2 origin =
Rotate5 the rotate3d function is used to rotate elbow1 90 degrees about the x axis, with the above labeled rotation point as the pivot point.
rotation point = (not an actual variable in the script)
layer4 thaws the "grit-pipe" layer
Rotate6
elbow3
elbow3 ~ origin~ = (pipe5 has not been created yet but see frontview picture in general section for clarification)
Rotate7 the rotate3d function is used to rotate elbow1 \90 degrees about the z axis, with the above labeled rotation point as the pivot point. The resulting image is seen below on the left.
Rotate8 the rotate3d function is used to rotate elbow1 -90 degrees about the x axis. The rotation point is the same as the one used in Rotate7. The resulting image is seen above on the right.
Rotate9
layer5 sets the current layer to "grit-pipe"
layer6 freezes "grit-elbow"