Skip to content

Commit

Permalink
Merge branch 'master' into monroews-patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
eak24 authored Dec 12, 2024
2 parents 63d2550 + f74f36a commit b97b3fe
Show file tree
Hide file tree
Showing 34 changed files with 278 additions and 131 deletions.
68 changes: 43 additions & 25 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,27 @@ name: Documentation

on:
push:
branches:
- '**'
tags:
- "v*.*.*"

jobs:
docs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Dependencies
python-version: '3.10'
- name: Setup System Dependencies
run: |
sudo apt-get update
sudo apt-get install -y tzdata rsync
sudo ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime
sudo dpkg-reconfigure -f noninteractive tzdata
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
Expand All @@ -23,35 +31,45 @@ jobs:
run: |
make html
touch _build/html/.nojekyll
- name: Publish Docs Master
- name: Archive Artifacts
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-artifact@v4
with:
name: docs
path: Textbook/_build/html/

deploy:
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: docs
path: ./docs
- name: Publish Docs
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
token: ${{ secrets.ACCESS_TOKEN }}
branch: gh-pages # The branch the action should deploy to.
folder: Textbook/_build/html/ # The folder the action should deploy.
branch: gh-pages
folder: ./docs
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
# - name: Build LaTeX
# run: make latex
# - name: Build PDF
# uses: xu-cheng/latex-action@v2
# with:
# working_directory: _build/latex
# root_file: AguaClaraTextbook.tex
# - name: Upload Release Asset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
# asset_path: _build/latex/AguaClaraTextbook.pdf
# asset_name: AguaClaraTextbook.pdf
# asset_content_type: application/pdf
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./docs
asset_name: docs.zip
asset_content_type: application/zip
43 changes: 0 additions & 43 deletions .github/workflows/test-build.yml

This file was deleted.

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ To publish, first ensure all of your changes have been merged into master by fol
4. `git push origin <tagname>`

Pushing a tag will kick off the automated release workflow which builds the PDF and HTML documentation.

# Technical Reports
We are using [sphinx_ext_substitution](https://github.com/NordicHPC/sphinx_ext_substitution) to replace keywords. This enables accessing the last part of the map to find a specific variable. For example, $..lfom.rowN, will find all of the variables where the map ends with lfom.rowN. If more than one option is available sphinx_ext_substitution will throw an error. The solution is to add more detail to the map name and perhaps specify the entrance tank or filter.

Expand All @@ -25,5 +26,5 @@ The gh-pages branch will have the html files and folder structure

Create a readme in the plant


# Working in Visual Studio Code and in the cmd line
# Running locally
We use [act](https://github.com/nektos/act) to run the workflow locally. After installing act, run `act --container-architecture linux/amd64` in the root directory to see a list of workflows that can be run locally.
Binary file removed Technical_Report/Tech Report Figures.pptx
Binary file not shown.
3 changes: 2 additions & 1 deletion Textbook/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ _build/
.idea/

.DS_store
.history
.history
act.exe
229 changes: 229 additions & 0 deletions Textbook/Filtration/EStaRS_Design.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
.. raw:: html

<embed>
<link rel="canonical" href="https://aguaclara.github.io/Textbook/Filtration/EStaRS_Design.html" />
<script src="https://hypothes.is/embed.js" async></script>
</embed>

.. _title_estars:

*****************************************
Enclosed Stacked Rapid Sand Filter Design
*****************************************



The Enclosed Stacked Rapid Sand filter, EStaRS, is a compact filter built inside a rectangular tank. Open Stacked Rapid Sand, OStaRS, construction methods require that a person be able to work inside the filter to finish the waterproofing of the concrete walls and to install the pipe modules for the inlets and outlets. The minimum filter area for OStaRS is approximately 1 square meter. Given a backwash velocity of 11 mm/s that corresponds to a minimum flow of about 11 L/s. It is always best to have at least 2 filters operating in parallel so that the filters can be backwashed when the plant is operating at less than 50% of the design flow rate. Thus EStaRS filters will be used for plants with flows less than about 20 L/s.

The first EStaRS filters were built in corrugated pipes. Previous problems with EStaRS filters included air entrainment and fabrication problems with the filter internal piping. Corrugated pipes that are available for filter body diameters greater than 60 centimeters that are available in Honduras have very thin inner walls that are not thick enough for strong welds. This requires use of a gasket seal for passing the trunk lines through the filter body. The corrugated pipes are also more difficult to attach the required end caps on the filter body. For these reasons we do not recommend using corrugated pipes for the filter body.

Air entrainment may be a problem in the inlet pipes. If air is carried into the filter the head loss through the filter will increase rapidly. Byron Zuniga reports that he was unable to get an effective backwash at the San Juan Guarita plant based on the observation that the head loss increased rapidly after backwash even though there was no evidence of turbidity release during backwash. This observation is consistent with air being entrained in the inlet pipes and carried into the filter where it rapidly fills the pores of the sand and thus prevents water from flowing through those pores. It isn't known how this problem was resolved. A possible solution to air entrainment is to design the inlet pipes to act like tube settlers so that the air can return to the inlet tank.

The 4 corrugated pipe EStaRS that were in operation in Central America as of 2021 have winged pipes with orifices for the inlets. There are no reports of problems with sand entering the inlet pipes and thus that appears to be a success. This does require the use of a gate valve for the backwash pipe to ensure that the transition from backwash to filtration mode doesn't happen too quickly. During this transition there is reverse flow from the filter into the inlet pipes and if that flow rate is too high it could carry sand into the inlet branches.

Air venting from trunks
=======================

The trunks are initially filled with air.
The trunks must have a water seal to ensure that air is never sucked into the filter during backwash.
The trunk entry into the filter body is thus at a local high point and air that accumulates in the top of the trunk and the top of the branches has no way to get out except by flowing into the sand. It is not yet know if this is a problem or if the initial venting into sand is sufficient.

Vent options
------------

If the air in the high points of the inlet and outlet piping is determined to be a problem, here are possible solutions.

#. tube straight up to top of inlet tank (will suck air during backwash)
#. tube that connects into the top of the filter body (during filtration air will travel up the tubes and vent into the top of the filter body. During backwash water will take this shortcut to bypass the sand. It could work if the tubes are small enough that the bypass during backwash is small)
#. Use sloped section of trunk line to act as tube settler to remove bubbles that are entrained in the inlet. This doesn't solve the problem of air that is in the local high spot of trunks.

If a vent is needed it seems that the only option is to connect air release tubes to the top of the filter.

Elevation considerations
========================

The head loss through the sand during backwash is equal to the settled depth of sand. This means that the water level in the top inlet pipe will drop by an amount equal to the depth of the sand. That means that the bottom of the inlet tank must be ABOVE the top of the sand + the OD of the trunk + head loss in the backwash trunk inlet.

Rectangular tank
================

As of 2024 the best option for fabricating EStaRS filters seems to be from HDPE sheets welded together to create rectangular tanks. The rectangular tank option eliminates the challenges of providing support to the branches in the round EStaRS.

Structural analysis
-------------------

Sheet span
^^^^^^^^^^

The structural analysis begins by estimating the maximum distance between support rings, :math:`B_{ring}`, for a sheet of material that is exposed to a constant pressure. An arbitrary width section of the sheet is analyzed as if it were a simple beam. The moment of inertia, :math:`I`, for a rectangle is

.. math::
:label: I_for_rectangle
I = \frac{1}{12} bT_{sheet}^3
where
* :math:`b` is the arbitrary width of the sheet,
* :math:`T_{sheet}` is the sheet thickness.

The maximum bending moment :math:`M` at the midpoint of a uniformly loaded beam with load :math:`w` per unit length and span :math:`B_{ring}` is:

.. math::
:label: M_for_sheet
M= \frac{wB_{ring}^2}{8}
where
* :math:`w` = total load per unit length due to water pressure
* :math:`B_{ring}` = unsupported span of the beam.

The total load per unit length is given by

.. math::
:label: uniform_P_load
w = Pb
where
* :math:`P` = pressure obtained from statics
The stress in the beam is given by:

.. math::
:label: stress_for_beam
\sigma = \frac{Mc}{I}
where:
* :math:`c` = distance to the outermost fiber from the neutral axis
For a sheet we have:

.. math::
:label: sheet_distance_outermost_fiber
c = \frac{T_{sheet}}{2}
The stress in the sheet can be obtained by substituting equations :eq:`I_for_rectangle`, :eq:`M_for_sheet`, :eq:`uniform_P_load`, :eq:`sheet_distance_outermost_fiber` into :eq:`stress_for_beam` to obtain:

.. math::
:label: stress_for_beam2
\sigma = \frac{\frac{T_{sheet}}{2}}{\frac{1}{12} bT_{sheet}^3} \frac{PbB_{ring}^2}{8}
As expected the arbitrary width of the beam section of the wall drops out of the equation. Simplifying we obtain:

.. math::
:label: stress_for_beam3
\sigma = \frac{3PB_{ring}^2}{4T_{sheet}^2}
The maximum span, :math:`B_{ring}`, is thus

.. math::
:label: max_ring_B
B_{ring_{max}} = T_{sheet}\sqrt{\frac{4 \sigma}{3P}}
Equation :eq:`max_ring_B` sets the maximum distance between support rings for a tank.

Maximum unsupported depth
^^^^^^^^^^^^^^^^^^^^^^^^^

The maximum depth of water not requiring a support ring can be calculated by replacing the pressure term with the depth of water and solving equation :eq:`max_ring_B` for the depth of water. In this case the beam length, :math:`B_{ring_{max}}`, is equal to the tank width, :math:`W_{tank}`.

.. math::
:label: max_unsupported_width
W_{tank} = T_{sheet}\sqrt{\frac{4 \sigma}{3\rho g H_{water}}}
Solving equation :eq:`max_unsupported_width` for the water depth we obtain:

.. math::
:label: max_unsupported_depth
H_{water} = \frac{4 \sigma T_{sheet}^2}{3\rho g W_{tank}^2}
Support rings
^^^^^^^^^^^^^

The support rings will extend around the perimeter of the filter. Each support ring carries the load based on the pressure at the ring elevation. That pressure is applied over the spacing of the support rings to create the load per length of the beam.


.. math::
:label: I_for_beam
I = \frac{1}{12} W_{beam}H_{beam}^3
where
* :math:`W_{beam}` is the width of the beam,
* :math:`H_{beam}` is the beam height.

The maximum bending moment, :math:`M`, at the midpoint of a uniformly loaded beam with load, :math:`w`, per unit length and span, :math:`W_{tank}`, is:

.. math::
:label: M_for_beam
M= \frac{wW_{tank}^2}{8}
where
* :math:`w` = total load per unit length due to water pressure
* :math:`W_{tank}` = unsupported span of the beam.

The total load per unit length is given by

.. math::
:label: ring_uniform_P_load
w = PB_{ring}
where:
* :math:`B_{ring}` = the center to center spacing of the beams


For a beam the distance to the outermost fiber from the centroid is:

.. math::
:label: beam_distance_outermost_fiber
c = \frac{H_{beam}}{2}
The stress in the ring beam can be obtained by substituting equations :eq:`I_for_beam`, :eq:`M_for_beam`, :eq:`ring_uniform_P_load`, :eq:`beam_distance_outermost_fiber` into equation :eq:`stress_for_beam` to obtain:

.. math::
:label: stress_for_ring_beam_mess
\sigma = \frac{\frac{H_{beam}}{2}}{\frac{1}{12} W_{beam}H_{beam}^3} \frac{PB_{ring}W_{tank}^2}{8}
Simplifying equation :eq:`stress_for_ring_beam_mess` we obtain:

.. math::
:label: stress_for_ring_beam
\sigma = \frac{3 P B_{ring} W_{tank}^2}{4 W_{beam} H_{beam}^2}
The most efficient use of material would be to make this ring beam as tall as possible. The minimum thickness of the beam could be the sheet thickness used for the tank. Begin by solving for the beam height, :math:`H_{beam}`.

.. math::
:label: ring_beam_height
H_{beam}= W_{tank} \sqrt{\frac{3 P B_{ring} }{4 W_{beam} \sigma}}
If the beam height is limited by other constraints then we can increase the beam width, :math:`W_{beam}`.

.. math::
:label: ring_beam_width
W_{beam} = \frac{3 P B_{ring} W_{tank}^2}{4 \sigma H_{beam}^2}
Solution strategy
-----------------

Beginning at the bottom of the filter:

#. Calculate the pressure at the very bottom taking into account that the sand water mix has a specific gravity of approximately 2 for silica sand with a porosity of 0.4.
#. Use equation :eq:`max_ring_B` to find the maximum ring spacing. Determine a ring spacing that can fit between inlet and outlet pipes.
#. Determine the actual elevation of the first ring.
#. Calculate the pressure at the elevation of the first ring.
#. Use equation :eq:`ring_beam_height` to find the required ring beam height.
#. If necessary double or triple the beam thickness based on equation :eq:`ring_beam_width`.

Repeat calculations for each subsequent ring beam until you reach the location where no ring supports are needed as defined by equation :eq:`max_unsupported_depth`.
Loading

0 comments on commit b97b3fe

Please sign in to comment.