h3. General Program Information

{float:left|border=2px solid black}
[!1.bmp|width=280px!|AutoCAD Flocculation Tank Program]
{float}
\\
\\

h5. Inputs Needed to Call the Flocculation Tank Program


h5. Inputs Defined Within the Flocculation Tank Program

*Plant{*}{*}{~}origin{~}*
* x: 0m
* y: 0m
* z: 0m

*EN{*}{*}{~}PipeSpec{~}* = 4

*W{*}{*}{~}InletChannel{~}* = 0.245m

*H{*}{*}{~}InletChannel{~}* = 0.3m

*W{*}{*}{~}FlocChannel{~}* = W{~}Sed~/2

*L{*}{*}{~}Sed{~}* = 3.021m

*W{*}{*}{~}Sed{~}* = 1m

*H{*}{*}{~}Sed{~}* = 1.1m

*N{*}{*}{~}FlocChannels{~}* = 2

*T{*}{*}{~}PlantWall{~}* = 0.15m

*T{*}{*}{~}Mp{~}* = 0.15m

*N{*}{*}{~}SedTanks{~}* = 3

*Amp{*}{*}{~}FlocBaffle{~}* = 0.5in

*Per{*}{*}{~}FlocBaffle{~}* = 8.5

*N{*}{*}{~}Baffle{~}* = 1

*X{*}{*}{~}FlocBaffle{~}* = 4in

*T{*}{*}{~}FlocBaffle{~}* = 4mm

*AN{*}{*}{~}FlocBaffle{~}* = 90deg

*N{*}{*}{~}FlocBaffleCol{~}* = 1

*Y{*}{*}{~}FlocBaffle{~}* = 7cm

*W{*}{*}{~}FlocPort{~}* = 0.379m

*L{*}{*}{~}Floc{~}* = (LSed)*(N{~}FlocChannels~)

*H{*}{*}{~}Floc{~}* = H{~}Sed~

*H{*}{*}{~}FlocPort{~}* = 0.75m

*totalfloc{*}{*}{~}dim{~}* =
* x: L{~}Floc~/N{~}FlocChannels~
* y: (N{~}FlocChannels~\*W{~}FlocChannel~) + ((N{~}FlocChannels~ \- 1)*T{~}PlantWall~)
* z: H{~}Floc~

*wall{*}{*}{~}dim{~}* =
* x: totalfloc{~}dim0~ + (2T{~}PlantWall~)
* y: T{~}PlantWall~
* z: totalfloc{~}dim2~

*flocport{*}{*}{~}dim{~}* is composed of a for loop with the range 0 to (N{~}FlocChannels~ \- 2). While in the for loop:

*flocport{*}{*}{~}dim0,i{~}* =
* x: W{~}FlocPort~
* y: T{~}PlantWall~
* z: H{~}FlocPort~

*channelopening{*}{*}{~}dim{~}* =
* x: W{~}InletChannel~
* y: T{~}PlantWall~
* z: H{~}InletChannel~

*floc{*}{*}{~}origin{~}* =
* x: Plant{~}Origin0~
* y: Plant{~}Origin1~ + N{~}SedTanks~(W{~}Sed~ + T{~}PlantWall~)
* z: Plant{~}Origin2~

\*wall{~}origin~ is composed of a for loop with the range 0 to (N{~}FlocChannels~ \- 2). While in the for loop:

*wall{*}{*}{~}origin0,i{~}* =
* x: Plant{~}Origin0~ \- totalfloc{~}dim0~ \- T{~}PlantWall~
* y: Plant{~}Origin1~ + N{~}SedTanks~(W{~}Sed~ + T{~}PlantWall~) + (W{~}FlocChannel~\*(1 + i)) + (T{~}PlantWall~\*i)
* z: Plant{~}Origin2~

*flocport{*}{*}{~}origin{~}* is composed of a for loop with an if statement embedded in the program scrip. The range of the for loop is from 0 to (N{~}FlocChannels~ \- 2)

If round(round(i/2) - (i/2)) = 0 then:

*flocport{*}{*}{~}origin0,i{~}* =
* x: Plant{~}Origin0~ \- W{~}FlocPort~
* y: Plant{~}Origin1~ + N{~}SedTanks(W{~}Sed\~ + T{~}PlantWall~) + (W{~}FlocChannel~\*(1 + i))
* z: Plant{~}Origin2~

If round(round(i/2) - (i/2)) = 1

*flocport{*}{*}{~}origin0,i{~}* =
* x: Plant{~}Origin0~ \- totalfloc{~}dim0~
* y: Plant{~}Origin1~ + N{~}SedTanks(W{~}Sed\~ + T{~}PlantWall~) + (W{~}FlocChannel~\*(1 + i))
* z: Plant{~}Origin2~

\*channelopening{~}origin~ =
* x: floc{~}origin0~ \- totalfloc{~}dim0~
* y: floc{~}origin1~ \- T{~}PlantWall~
* z: floc{~}origin2~ + totalfloc{~}dim2~ \- H{~}InletChannel~

\*Y{~}FlocBaffles~ is composed of a for loop with the range 0 to (N{~}FlocChannels~ \- 1). While in the for loop:

Y{~}FlocBaffles0,j~ = Plant{~}Origin1~ + (N{~}SedTanks*(W{~}Sed\~ + T{~}PlantWall~)) + ((N{~}FlocChannels~ \- j - 1)*(W{~}FlocChannel~ + T{~}PlantWall~))

X{~}FlocBaffles~ =

* i(1):
* i(2):
* i(3):
* i(4):
* i(5):
* i(6):
* i(7):
* i(8):
* i(9):
* i(10):
* i(11):
* i(12):
* i(13):
* i(14):
* i(15):
* i(16):
* i(17):
* i(18):
* i(19):
* i(20):
* j(1):
* j(2):
* j(3):
* j(4):
* j(5):
* j(6):
* j(7):
* j(8):
* j(9):
* j(10):
* j(11):
* j(12):
* j(13):
* j(14):
* j(15):
* j(16):
* j(17):
* j(18):
* j(19):
* j(20):


h3. Technical Program Outline


h5. Floctanktankscript

{float:left|border=2px solid black}
[!2.bmp|width=280px!|AutoCAD Flocculation Tank Program]
{float}
*layer1* \- [Layer{~}new~|AutoCAD Basics Layer] creates a floctank layer that is dark grey.

layer1 <-\- layer{~}new~("floctank",dkgrey)

*Tank1* <-\- creates a tank. See [Tank Help|AutoCAD Tank Program] for details  on the tank function.

Tank1 <-\- Tank(floc{~}origin~, totalfloc{~}dim~, T{~}PlantWall~)

floc{~}origin~ \-
* x: Plant{~}Origin0~
* y: Plant{~}Origin1~ + N{~}SedTanks~(W{~}Sed~ + T{~}PlantWall~)
* z: Plant{~}Origin2~

totalfloc{~}dim~ \-
* x: L{~}Floc~/N{~}FlocChannels~
* y: (N{~}FlocChannels~\*W{~}FlocChannel~) + ((N{~}FlocChannels~ \- 1)*T{~}PlantWall~)
* z: H{~}Floc~

T{~}PlantWall~ = 0.15m

*layerset1* \- [Layer{~}set~|AutoCAD Basics Layer] selects the layer that the user is currently working on.

*layerset1* <\- layer{~}set~("0")

*layerfreeze1* \- [Layer{~}freeze~|AutoCAD Basics Layer] freezes the selected layer.

*layerfreeze1* <\- layer{~}freeze~("floctank")

h5. Floctankwallscript

*local* \- [Layer{~}new~|AutoCAD Basics Layer] creates a new layer "floctankwall" that is dark grey.

*local* <\- layer{~}new~("floctankwall",dkgrey)

local enters a for loop for the range 0 to (N{~}flocChannels~ \- 2).

*local* <\- stack(local,box(wall{~}origin0,i~,wall{~}origin0,i~ + wall{~}dim~),box(flocport{~}origin0,i~,flocport{~}origin0,i~,flocport{~}origin0,i~ + flocport{~}dim0,i~)subtractD(wall{~}origin0,i~,flocport{~}origin0,i~))

*layerset2* \- [Layer{~}set~|AutoCAD Basics Layer] selects the layer that the user is currently working in.

*layerset2* <\- layer{~}set~("0")

*layerthaw2* \- [Layer{~}thaw~|AutoCAD Basics Layer]unlocks the layer "floctank" so that it can be edited.

*layerthaw2* <\- layer{~}thaw~("floctank")

*bigunion1* \- [Union{~}allA~|AutoCAD Basics Unions] selects all of the objects on a page and joins them together to form a single object.

*bigunion1* <\- union{~}allA~

*layerfreeze2* \- [Layer{~}freeze~|AutoCAD Basics Layer] locks the selected layer "floctank" so that no edits can be made.

*layerfreeze2* <\- layer{~}freeze~("floctankwall")

*local* <\- stack(local,layerset2,layerthaw2,bigunion1,layerset2,layerfreeze2)

h5. Floctankchannelopeningscript

*layer3* \- [Layer{~}new~|AutoCAD Basics Layer] creates a new, dark grey, layer "flocchannelhole."

*layer3* <\- layer{~}new~("flocchannelhole",dkgrey)

*box3* \- [Box|AutoCAD Basics Box] takes the input of two points to create a 3D rectangular box.

*box3* <\- box(channelopening{~}origin~,channelopening{~}origin~ + channelopening{~}dim~)

*channelopening{*}{*}{~}origin{~}* =
* x: floc{~}origin0~ \- totalfloc{~}dim0~
* y: floc{~}origin1~ \- T{~}PlantWall~
* z: floc{~}origin2~ + totalfloc{~}dim2~ \- H{~}InletChannel~

*channelopening{*}{*}{~}origin{~}* *+ channelopenining{*}{*}{~}dim{~}*
* x: floc{~}origin0~ \- totalfloc{~}dim0~ + W{~}InletChannel~
* y: floc{~}origin1~
* z: floc{~}origin2~ + totalfloc{~}dim2~

*layerset3* \- [Layer{~}set~|AutoCAD Basics Layer] selects the layer that the user is currently working in.

*layerset3* <\- layer{~}set~("0")

*layerthaw3* \- [Layer{~}thaw~|AutoCAD Basics Layer]unlocks the layer "floctankwall" so that it can be edited.

*layerthaw3* <\- layer{~}thaw~("floctankwall")

*viewtop* \- [Viewtop1|AutoCAD Basics Views] rotates the object so that it is viewed from the top.

*viewtop* <\- viewtop1

*subtract3* \- [SubtractD|AutoCAD Basics Subtractions] uses two points to identify which object to subtract from.

*p1* = floc{~}origin~
* x: Plant{~}Origin0~
* y: Plant{~}Origin1~ + N{~}SedTanks~(W{~}Sed~ + T{~}PlantWall~)
* z: Plant{~}Origin2~

*p2* =
* x: floc{~}origin0~ \- totalfloc{~}dim0~
* y: floc{~}origin1~ \- T{~}PlantWall~
* z: floc{~}origin2~ + totalfloc{~}dim2~ \- H{~}InletChannel~

*bigunion* \- [Union{~}allA~|AutoCAD Basics Unions] selects all of the objects on a page and joins them together to form a single object.

*bigunion* <\- union{~}allA~

*layerfreeze3* \- [Layer{~}freeze~|AutoCAD Basics Layer] locks the selected layer "floctankwall" so that no edits can be made.

*layerfreeze3* <\- layer{~}freeze~("floctankwall")

h5. Floctankbafflescript

*local* \- [Layer{~}new~|AutoCAD Basics Layer] creates a new light purple layer "baffle."

*local* <\- layer{~}new~("baffle",ltpurple)

for loop for the range 0 to (rows(X{~}FlocBaffles~) \-1)

*a* <\- a + 1 if X{~}FlocBafflest,j~ is not equal to 0.

for loop for the range 0 to (x(j) - 1)

*baffle{*}{*}{~}origini{~}* <\- (p1 + p2)

*p1*:
* x: Plant{~}Origin0~ \- L{~}Sed~
* y: 0
* z: Plant{~}Origin2~

*p2*:
* x: X{~}FlocBafflesi,j~
* y: Y{~}FlocBaffles0,j~
* z: Z{~}FlocBafflesi,j~

*baffle{*}{*}{~}lengthi{~}* <\- L{~}FlocBafflesi,j~

*local* <\- stack(local,lamina(baffle{~}origini~,Amp{~}FlocBaffle~,W{~}FlocChannel~,baffle{~}lengthi~,T{~}FlocBaffle~,Per{~}FlocBaffle~,AN{~}FlocBaffle~,N{~}Baffle~,N{~}FlocBaffleCol~,X{~}FlocBaffle~,Y{~}FlocBaffle~))

h5. Flocktankendscript

*layerset* \- [Layer{~}set~|AutoCAD Basics Layer] selects the layer that the user is currently working in.

*layerset* <\- layer{~}set~("0")

*layerfreeze* \- [Layer{~}freeze~|AutoCAD Basics Layer] locks the layer "baffle" so that no edits can be made.

*layerfreeze* <\- \*layer{~}freeze~("baffle")

*FlocTank* = stack(Floctanktankscript,Floctankwallscript,Floctankchannelopeningscript,Floctankbafflescript,Floctankendscript)

\\
\\
{float:left|border=2px solid black}
[!3.bmp|width=280px!|AutoCAD Flocculation Tank Program]
{float}
*box1* \- creates a box

box1 <-\- box(wall{~}origin~, )

\\
\\
{float:left|border=2px solid black}
[!4.bmp|width=280px!|AutoCAD Flocculation Tank Program]
{float}
*box2* \-

box2 <-\- box(flochole{~}origin~, )

\\
\\
{float:left|border=2px solid black}
[!5.bmp|width=280px!|AutoCAD Flocculation Tank Program]
{float}
*subtract0* \-

subtract0 <-\- subtractD( , )

\\
\\
{float:left|border=2px solid black}
[!6.bmp|width=280px!|AutoCAD Flocculation Tank Program]
{float}
*union1* \-

union1 <-\- unionC( , )

\\
\\
{float:left|border=2px solid black}
[!7.bmp|width=280px!|AutoCAD Flocculation Tank Program]
{float}
*box3*\-

box3 <-\- box( , )

\\
\\
{float:left|border=2px solid black}
[!8.bmp|width=280px!|AutoCAD Flocculation Tank Program]
{float}
*subtract1* \-

subtract1 <-\- subtractD( , )

\\
\\
{float:left|border=2px solid black}
[!9.bmp|width=280px!|AutoCAD Flocculation Tank Program]
{float}
*bigunion* \-

bigunion <-\- union{~}allA~

\\
\\
{float:left|border=2px solid black}
[!10.bmp|width=280px!|AutoCAD Flocculation Tank Program]
{float}
*layerset* \-

layerset <-\- layer{~}set("0")

*layerfreeze1* \-

layer{~}freeze~("floctank")

\\
\\