#LyX 2.0 created this file. For more info see http://www.lyx.org/
\lyxformat 413
\begin_document
\begin_header
\textclass article
\use_default_options true
\maintain_unincluded_children false
\language english
\language_package default
\inputencoding auto
\fontencoding global
\font_roman default
\font_sans default
\font_typewriter default
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100

\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref false
\papersize default
\use_geometry false
\use_amsmath 1
\use_esint 1
\use_mhchem 1
\use_mathdots 1
\cite_engine basic
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\use_refstyle 1
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header

\begin_body

\begin_layout Title
Finalize Section Cuts and Details & Sedimentation Tank Updates
\end_layout

\begin_layout Author
Songlin Guo
\end_layout

\begin_layout Date
Spring 2014
\end_layout

\begin_layout Part
Finalize Section Cuts
\end_layout

\begin_layout Section*
Problem Defnition
\end_layout

\begin_layout Subsection*
Introduction
\end_layout

\begin_layout Standard
Section cut helps our customers and operators better understand how is AguaClara
 plant look like.
 Also, they provide a detail information for each part of the plant.
 The main task for finalizing section cuts is to check if the code is working
 properly.
 After running through all the codes built up last term, the resulting graphs
 give mirror images which are not as predicted.
 Figure 
\begin_inset CommandInset ref
LatexCommand ref
reference "fig:2D ET-1"

\end_inset

 shows current section cut view for Entrance tank, which has the view of
 positive y direction.
 But actually it gives the mirror image of the y axis if looking from the
 top.
 Figure 
\begin_inset CommandInset ref
LatexCommand ref
reference "fig:2D ET-2"

\end_inset

 gives the right image for the Entrance Tank cut.
 Also another goal for this semester is to create two more section cuts,
 which have the view of 
\begin_inset Quotes eld
\end_inset

Above entrance tank upper wall looking downward inwards into the plant
\begin_inset Quotes erd
\end_inset

 and 
\begin_inset Quotes eld
\end_inset

To the left of the filter's outside wall, looking to the right and inwards
 into the plant
\begin_inset Quotes erd
\end_inset

.
\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
2D Section Cut for Entrance Tank 1
\begin_inset CommandInset label
LatexCommand label
name "fig:2D ET-1"

\end_inset


\end_layout

\end_inset


\begin_inset Graphics
	filename ../../Songlin - Spring 2014 Report3/Report_Design_Team_SectionCut_Spring_2014/Section Cut for ET.PNG
	scale 30

\end_inset


\begin_inset ERT
status open

\begin_layout Plain Layout


\backslash
centering
\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
2D Section Cut for Entrance Tank 2
\begin_inset CommandInset label
LatexCommand label
name "fig:2D ET-2"

\end_inset


\end_layout

\end_inset


\begin_inset Graphics
	filename ../../Songlin - Spring 2014 Report3/Report_Design_Team_SectionCut_Spring_2014/Section Cut for ET 2.PNG
	scale 50

\end_inset


\begin_inset ERT
status open

\begin_layout Plain Layout


\backslash
centering
\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Subsection*
Design Details
\end_layout

\begin_layout Standard
The function that I am going to create in Mathcad is based on those existing
 ones.
 I used the code that has been created in a previous semseter to generate
 the plant layouts, and different section cuts are created in AutoCAD based
 on the code written by the previous team.
 The critical part of our code is the 
\begin_inset Quotes eld
\end_inset

SectionCut
\begin_inset Quotes erd
\end_inset

 function, and we modified it in order to avoid an unexpected layer which
 would be generated after running 
\begin_inset Quotes eld
\end_inset

SPTB
\begin_inset Quotes erd
\end_inset

 command.
 Moreover, I decided creating a command of 
\begin_inset Quotes eld
\end_inset

Enter
\begin_inset Quotes erd
\end_inset

 and used it instead of 
\begin_inset Quotes eld
\end_inset

SP
\begin_inset Quotes erd
\end_inset

 command in order to avoid an unexpected error that happened while running
 the 
\begin_inset Quotes eld
\end_inset

SectionCut
\begin_inset Quotes erd
\end_inset

 function.
 I inserted a line called 
\begin_inset Quotes eld
\end_inset

Flip
\begin_inset Quotes erd
\end_inset

 into SectionCut function in order to give the right image of different
 cuts.
 Finally, I created another two cuts as I mentioned in introduction to finally
 have all the required graphs.
\end_layout

\begin_layout Standard
The way to manually create a section plane is as follows:
\end_layout

\begin_layout Itemize
Command 
\begin_inset Quotes eld
\end_inset

Netload
\begin_inset Quotes erd
\end_inset


\end_layout

\begin_layout Itemize
Select 
\begin_inset Quotes eld
\end_inset

Sectioner.dll
\begin_inset Quotes erd
\end_inset

 module
\end_layout

\begin_layout Itemize
Define two points that will create a section plane
\end_layout

\begin_layout Itemize
Define one point of the section plane direction
\end_layout

\begin_layout Itemize
Select the plane
\end_layout

\begin_layout Itemize
Create section cut with 
\begin_inset Quotes eld
\end_inset

SPTB
\begin_inset Quotes erd
\end_inset

 command
\end_layout

\begin_layout Itemize
Select cut insert point
\end_layout

\begin_layout Itemize
Specify X & Y factor, usually use 1 for each
\end_layout

\begin_layout Itemize
Specify angle, usually use 0 deg
\end_layout

\begin_layout Standard
The longitudinal and transverse section cuts can be produced to illustrate
 details of plant.
 This is very useful for our implementation partners to construct the plants.
 The following list contains the command to create cross section cuts for
 sedimentation tank and flocculator seperately from appropriate view.
 Other section cuts created by previous team for the filter, entrance tank
 and etc.
 will not be listed here.
 These functions can be modified for other specific plants or special designs.
\end_layout

\begin_layout Standard
Longitudinal cuts (section plane which is parallel to x-axis):
\end_layout

\begin_layout Itemize
Inside of sedimentation tanks with section cut in the middle, looking to
 front direction (negative y direction)
\end_layout

\begin_layout Itemize
Inside of flocculator with section cut in the middle, looking to front direction
 (negative y direction)
\end_layout

\begin_layout Standard
Transeverse cuts(section plane which is parallel to y-axis):
\end_layout

\begin_layout Itemize
Inside of sedimentation tanks with section cut in the middle, looking to
 right direction (positive x direction)
\end_layout

\begin_layout Itemize
Inside of flocculator with section cut in the middle, looking to right direction
 (positive x direction)
\end_layout

\begin_layout Section*
Documented Progress
\end_layout

\begin_layout Subsection*
Problems Encountered
\end_layout

\begin_layout Standard
The first problem I faced was automation of 
\begin_inset Quotes eld
\end_inset

3DRotate
\begin_inset Quotes erd
\end_inset

 command.
 The first idea that came to my mind to avoid the mirror image was 
\begin_inset Quotes eld
\end_inset

3DRotate
\begin_inset Quotes erd
\end_inset

.
 I worked pretty well with manual operation in AutoCAD, but I encountered
 a problem when trying to select the rotation axis within the command line.
 AutoCAD didn't allow me to select x, y, or z axis after I typed in 3DRotate
 in command line, and I was not able to automate the command with built
 in Mathcad code.
 
\end_layout

\begin_layout Standard
Another way I tried to avoid the above problem was to use 
\begin_inset Quotes eld
\end_inset

Rotate
\begin_inset Quotes erd
\end_inset

 command to rotate the 2D image.
 Since the 
\begin_inset Quotes eld
\end_inset

Rotate
\begin_inset Quotes erd
\end_inset

 command only allowed me to rotate about the z axis, there was no way to
 have a flipped image of y axis with this command.
 The solution for this was to take advantage of UCS.
 The UCS is the coordinate system in AutoCAD, which can be adjusted with
 
\begin_inset Quotes eld
\end_inset

UCS
\begin_inset Quotes erd
\end_inset

 command.
 I tried to adjust the UCS system before I ran 
\begin_inset Quotes eld
\end_inset

SPTB
\begin_inset Quotes erd
\end_inset

 command, and the code ran seperately, but did not work if I ran all the
 code at once.
 That means if I adjust the UCS and pause in AutoCAD before I run 
\begin_inset Quotes eld
\end_inset

SPTB
\begin_inset Quotes erd
\end_inset

, it will work.
 Otherwise it will give a mirror image as well.
 
\end_layout

\begin_layout Standard
The final way I tried to solve it was still using the 
\begin_inset Quotes eld
\end_inset

Rotate
\begin_inset Quotes erd
\end_inset

 and 
\begin_inset Quotes eld
\end_inset

UCS
\begin_inset Quotes erd
\end_inset

 command.
 The only way I found to avoid the above problem was to not to adjust UCS
 back after the graph has been created.
 Figure 
\begin_inset CommandInset ref
LatexCommand ref
reference "fig:2D ET-3"

\end_inset

 shows the automated cut for Entrance Tank.
 Notice that the UCS system has z axis pointed downward after the graph
 was created.
 It can be changed back manually but not with automation, otherwise mirror
 image comes out again.
 
\end_layout

\begin_layout Standard
The module 
\begin_inset Quotes eld
\end_inset

SPTB
\begin_inset Quotes erd
\end_inset

 has a problem with angle rotation.
 No matter what degree I tried to rotate, it always gave a graph with about
 1 degree rotation.
 This problem happened becasue 
\begin_inset Quotes eld
\end_inset

SPTB
\begin_inset Quotes erd
\end_inset

 is using radius as rotation angle.
 And I asked Kean who built 
\begin_inset Quotes eld
\end_inset

SPTB
\begin_inset Quotes erd
\end_inset

 to fix the problem for me.
 
\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
2D Section Cut for Entrance Tank 3
\begin_inset CommandInset label
LatexCommand label
name "fig:2D ET-3"

\end_inset


\end_layout

\end_inset


\begin_inset Graphics
	filename ../../Songlin - Spring 2014 Report3/Report_Design_Team_SectionCut_Spring_2014/Section Cut for ET 3.PNG
	scale 30

\end_inset


\begin_inset ERT
status open

\begin_layout Plain Layout


\backslash
centering
\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Subsection*
Accomplishments
\end_layout

\begin_layout Standard
I modified the code created by previous team and made them run correctly,
 and the mirror image problem has been fixed.
 Also, the SPTB module is working correctly now with giving a right rotation
 angle.
 All required section graphs have been created automatically with current
 code, and two more addtional graphs have been created for reference.
 The 
\begin_inset Quotes eld
\end_inset

Appendix
\begin_inset Quotes erd
\end_inset

 section below shows all graphs for section cuts.
 I did not add dimensions to the section cuts because there would be to
 complicated to do the coding.
 For future work, the section cuts will need to be placed in some sor of
 layout view, so that they can be easily presented to the user.
 
\end_layout

\begin_layout Subsection*
Appendix
\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Just above the entrance tank upper wall (outside of the plant) - looking
 downward (negative y direction) inwards into the plant
\end_layout

\end_inset


\begin_inset Graphics
	filename Just above the entrance tank upper wall (outside of the plant).PNG
	scale 50

\end_inset


\begin_inset ERT
status open

\begin_layout Plain Layout


\backslash
centering
\end_layout

\end_inset


\end_layout

\end_inset


\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Entrance tank (through the center of the drainage pipes) - looking upward
 (positive y direction)
\end_layout

\end_inset


\begin_inset Graphics
	filename Entrance tank (through the center of the drainage pipes).PNG
	scale 50

\end_inset


\end_layout

\end_inset


\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Walkway between entrance tank and flocculator (center)
\end_layout

\end_inset


\begin_inset Graphics
	filename Walkway between entrance tank and flocculator (center).PNG
	scale 50

\end_inset


\end_layout

\end_inset


\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Flocculator (center of a channel, avoiding cutting chem barrels and plumbing
 off-center if possible)
\end_layout

\end_inset


\begin_inset Graphics
	filename Flocculator (center of a channel, avoiding cutting chem barrels and plumbing off-center if possible).PNG
	scale 50

\end_inset


\end_layout

\end_inset


\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Sedimentation tank (down the center of a bay - try to the choose one that
 cuts the filter in an informative way)
\end_layout

\end_inset


\begin_inset Graphics
	filename Sedimentation tank (down the center of a bay - try to the choose one that cuts the filter in an informative way).PNG
	scale 50

\end_inset


\end_layout

\end_inset


\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Filter (through the center of the overflow box if there are two filters)
\end_layout

\end_inset


\begin_inset Graphics
	filename Filter (through the center of the overflow box if there are two filters).PNG

\end_inset


\end_layout

\end_inset


\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Walkway between entrance tank and flocculator (center)
\end_layout

\end_inset


\begin_inset Graphics
	filename Sedimentation tank with plates (down the center of the bay).PNG
	scale 50

\end_inset


\end_layout

\end_inset


\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Just below the last sed tank wall (outside of the plant)
\end_layout

\end_inset


\begin_inset Graphics
	filename Just below the last sed tank wall (outside of the plant).PNG
	scale 40

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
To the left of the filter’s outside wall (outside of the plant)
\end_layout

\end_inset


\begin_inset Graphics
	filename To the left of the filter's outside wall (outside of the plant).PNG
	scale 50

\end_inset


\end_layout

\end_inset


\end_layout

\end_inset


\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Inside the filter box (through the center of a branch)
\end_layout

\end_inset


\begin_inset Graphics
	filename Inside the filter box (through the center of a branch).PNG
	scale 50

\end_inset


\end_layout

\end_inset


\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Between the filter box and the filter’s exit box (avoid cutting the vertical
 siphon pipe or cut it down the center, if possible avoid cutting chemical
 tanks and plumbing off center)
\end_layout

\end_inset


\begin_inset Graphics
	filename Between the filter box and the filter's exit box.PNG
	scale 50

\end_inset


\end_layout

\end_inset


\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Inside the filter’s entrance box (through the center of the most distance
 entrance pipes or to the right of them)
\end_layout

\end_inset


\begin_inset Graphics
	filename Inside the filter’s entrance box (through the center of the most distance entrance pipes or to the right of them).PNG
	scale 50

\end_inset


\end_layout

\end_inset


\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Drain channel (through the center of the siphon pipe exits or to the right
 of them, avoid cutting into the sed tank drain valves if possible)
\end_layout

\end_inset


\begin_inset Graphics
	filename Drain channel.PNG
	scale 50

\end_inset


\end_layout

\end_inset


\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Center of the first hopper of the entrance tank (should take care of flocculator
 and sed tank transversal cuts)
\end_layout

\end_inset


\begin_inset Graphics
	filename Center of the first hopper of the entrance tank (should take care of flocculator and sed tank transversal cuts).PNG
	scale 50

\end_inset


\end_layout

\end_inset


\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
To the right of the furthest wall of the sed/floc tanks (outside the plant)
\end_layout

\end_inset


\begin_inset Graphics
	filename To the right of the furthest wall of the sedfloc tanks (outside the plant).PNG
	scale 50

\end_inset


\end_layout

\end_inset


\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
To the right of the sedimentation tanks with section cut in the middle
\end_layout

\end_inset


\begin_inset Graphics
	filename To the right of the sedimentation tanks with section cut in the middle.PNG
	scale 50

\end_inset


\end_layout

\end_inset


\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Sedimentation tanks with section cut in the middle
\end_layout

\end_inset


\end_layout

\begin_layout Plain Layout
\begin_inset Graphics
	filename Sedimentation tanks with section cut in the middle.PNG
	scale 50

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Part
Sedimentation Tank Updates
\end_layout

\begin_layout Section*
Problem Defnition
\end_layout

\begin_layout Subsection*
Introduction
\end_layout

\begin_layout Standard
Plate settlers are currently suffering sagging in the sedimentation tank
 due to gravity.
 In order to avoid the sagging, a group of longitudinal and transverse pipes
 will be placed under those plates 
\begin_inset CommandInset ref
LatexCommand ref
reference "fig:2D ST-0-1"

\end_inset

.
 I am looking for a way to draw those pipes automatically in AutoCad with
 Mathcad code.
 Figure 
\begin_inset CommandInset ref
LatexCommand ref
reference "fig:2D ST-1-1"

\end_inset

 shows current sedimentation tank without support pipes, and Figure 
\begin_inset CommandInset ref
LatexCommand ref
reference "fig:2D ST-2-1"

\end_inset

 shows the sedimentation tank with support pipes added in.
\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Supporting Pipe System
\begin_inset CommandInset label
LatexCommand label
name "fig:2D ST-0-1"

\end_inset


\end_layout

\end_inset


\begin_inset Graphics
	filename Site.jpg
	scale 50

\end_inset


\begin_inset ERT
status open

\begin_layout Plain Layout


\backslash
centering
\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Original Sedimentation Tank
\begin_inset CommandInset label
LatexCommand label
name "fig:2D ST-1-1"

\end_inset


\end_layout

\end_inset


\begin_inset Graphics
	filename Original Sedimentation Tank.PNG
	scale 50

\end_inset


\begin_inset ERT
status open

\begin_layout Plain Layout


\backslash
centering
\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Sedimentation Tank with Plate Settler Pipe Supports
\begin_inset CommandInset label
LatexCommand label
name "fig:2D ST-2-1"

\end_inset


\end_layout

\end_inset


\begin_inset Graphics
	filename Sedimentation Tank with Plate Settler Pipe Supports.PNG
	scale 50

\end_inset


\begin_inset ERT
status open

\begin_layout Plain Layout


\backslash
centering
\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Subsection*
Design Details
\end_layout

\begin_layout Standard
The function I created is based on two input parameters, the maximum space
 between two transverse pipes and support pipe diameter.
 Once the maximum space has been chosen, the function will automatically
 calculate out the real space between transverse pipes according to the
 length of the sedimentation tank.
 And then, the function will also create longitudinal supporting pipes at
 proper location in the sedimentation tank.
 Note that, I have three functions for creating transverse pipes (Front,
 Middle, End) because the first group transverse pipe is never moving, and
 the last group of transverse pipes' location is dependant on how many longitudi
nal pipes there are in the sedimentation tank.
\end_layout

\begin_layout Section*
Documented Progress
\end_layout

\begin_layout Subsection*
Problems Encountered
\end_layout

\begin_layout Standard
I faced a problem with finding the correct number of longitudinal and transverse
 pipes because the number of those pipes are dependant on how big the sedimentat
ion tank is.
 I solved the problem by creating a function in Mathcad.
 The way I did this was by calculating an estimated number by giving a nominal
 distance between pipes, and then I roundup this number to an integer, and
 recalculated the actual distance between pipes.
 Figure 23 shows how the function finds the correct number of longitudinal
 pipes for the sedimentation tank.
\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Caption

\begin_layout Plain Layout
Supporting Pipes In the Sedimentation Tank
\begin_inset CommandInset label
LatexCommand label
name "fig:2D ST-3-1"

\end_inset


\end_layout

\end_inset


\begin_inset Graphics
	filename Supporting Pipes In the Sedimentation Tank.PNG
	scale 50

\end_inset


\begin_inset ERT
status open

\begin_layout Plain Layout


\backslash
centering
\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Subsection*
Accomplishments
\end_layout

\begin_layout Standard
I successfully created a function to draw the plate settler support pipes
 automatically.
 The function only requires two input parameters, which are the maximum
 space between two transverse pipes and the pipe diameter.
 The function is able to adjust the number of longitudinal and transverse
 we need, according to the maximum space input.
 The final drawing can be seen in Figure 
\begin_inset CommandInset ref
LatexCommand ref
reference "fig:2D ST-2-1"

\end_inset

 above.
 
\end_layout

\end_body
\end_document
