Technology

AIDE Update: Textbook Chapter

In the past few months, we have been continuing to develop our design tool, the AguaClara Infrastructure Design Engine (AIDE). To begin publicizing AIDE for broader use, we have prepared a few public-facing documents that give more insight into how the tool works. 

The AguaClara textbook now contains a section that introduces AIDE, explains how we at AguaClara use AIDE, and describes how you can use AIDE to explore AguaClara technologies. The relevant section of the textbook can be found here. This section includes videos that guide you through an exploration of AIDE within Onshape, the CAD program that we use to design AguaClara plants. 

In addition, there are public demos available for various configurable components, which make up our customized water treatment plant designs. These public demos include a CAD model and an explanatory PDF. In the demo model, you can adjust certain parameters and quickly see how the new parameter values affect the physical model. The attached PDF describes the configurable component and defines the relevant parameters. This allows you to know more about the changes you are making and how they fit into the physics of the code integrated into the model.

We encourage you to explore our design tool and welcome feedback through this form.

AguaClara Textbook Introduction

Planned to be a compendium of AguaClara research and design methods, the “AguaClara textbook” titled The Physics of Water Treatment Design has become an indispensable resource of AguaClara design. Over the past several years, many individuals have contributed their time and knowledge in developing what the textbook has become. 

Not simply a narrative of how designs come to be, the textbook also includes design challenges for students taking the Safe Water on Tap course. These challenges are supported by direct links to Onshape 3D Models, the derivations of key principles, a glossary,  parameter convention list, and links to interactive code snippets where users can see directly how changes will affect the design.

The homepage of the textbook

The recent additions mentioned above supplement most chapters, allowing students to have nearly all course documents in one place, as well as a straightforward means to edit the design challenges. Within most chapters, the structure follows a pattern: the introduction to the component followed by derivations, then design, then the Design Challenge, ending with design solutions and future work. This structure allows readers to understand the big picture before working on the design and solving the design challenge.

The design challenges are incorporated into the text to make it easy for students to connect the design challenges to course concepts.

Another feature, designed specifically with readers in mind, is the labeling and tagging of each equation, image, heading, and reference. This allows these features to be linked within the text and can send the reader directly back to where the equation or image was first cited. The tagged headings allow important portions of the text to be cited specifically. This is helpful in guiding students towards the cited concepts in place of page numbers, which are not present in the website version of the text.

This equation is named and is automatically linked when you refer to its name elsewhere in the text. This makes it simple to refer back to other concepts.

Another unique feature of the textbook is the publishing rate of new versions. With a typical textbook, years go by before edits can be made and published. However, in our textbook, once an edit is made, a new version can be available in a few minutes. This rapid turnover means that the information is rarely out of date. The rapid changes also ensure that the textbook is never finished.

The version number can be found in the upper left-hand part of the webpage, it is updated every time a new version is pushed.

Every design change made, and each insight gained, leads to a better, more thorough version. We know that it is a short walk to the edge of knowledge and this textbook lets that be true, in a way impossible through traditional methods. Every set of reviewers makes changes to make the material easier for students and others to understand, and this allows the text to be something that can change depending on the needs of users. Some plans for the future are to simplify the way in which edits are proposed, as well as adding additional sections on plant operation and troubleshooting challenges, along with the tentative completion of several additional sections. Though it will never be truly complete, The Physics of Water Treatment Design is an incredible resource for anyone interested in learning about the AguaClara design philosophy and treatment technology.

Check out the textbook and let us know what you think!


Blog post author: Clare O’Connors

AIDE Bill of Materials

The AguaClara Infrastructure Design Engine (AIDE), our automated water treatment plant design tool, has gone through many iterations since its origins in 2008, when it was based on Mathcad, AutoCAD, Microsoft Word, and LabView. AIDE is now based on Onshape, which has FeatureScript as its built-in programming language that is fully integrated into the CAD environment.

Since our earlier draft of an AguaClara plant, we have been focusing on two major changes. The first was a complete overhaul of the method we use to bring the design algorithms and drawings of subcomponents into higher level assemblies. The second major change was to connect a parts database with our design process so that we could create a bill of materials. A bill of materials is the list of parts required to manufacture a product with their quantities, suppliers, and cost.

An example of a table that shows the output of the bill of materials.

Prices and physical components for each part are taken from part catalogues provided to us by our implementation partners and entered into a database. This database is then integrated into our designs in Onshape, and subsequently each part is automatically assigned a part number upon its entry into the model. This results in the self-generating formation of a bill of materials that includes quantities and prices, as well as a cut list that provides sizes.

The flow of information that results in the bill of materials.

The bill of materials will be incredibly useful in the development of general cost estimates and is especially powerful due to its ability to adapt the price to automatically reflect any changes that are made in the design. With our current plant, it takes under a minute to generate a new design that includes a material cost estimate. We have been meeting with one of our implementation partners, Agua para el Pueblo, to get their feedback on new designs. During this process, we continue to incorporate their suggestions into the design. Below is a quote from an Agua Para el Pueblo engineer, Aminta Núñez Galdámez, describing how the bill of materials affects their work.


Spanish

... sacar cantidades de obras y hacer fichas unitarias de costos, es un trabajo un poco tedioso, pero se necesita hacer para conocer los costos reales de la planta, y mi meta era poder reducir estos esfuerzos para APP. Esto va a reducir estos tiempos y también será más sencillo estimar costos para diferentes tamaño de plantas, algunas personas interesadas en plantas para su comunidad, juntas de agua o donantes nos consultan cuanto podria costar una planta y nosotros sacamos estimados en base a nuestra experiencia, pero con las actualizaciones de AIDE podemos tener estimados de costos más certeros.
— Aminta Núñez Galdámez, Agua Para el Pueblo

English

... creating a bill of materials and unit cost sheets is pretty tedious work, but necessary to obtain the actual cost of the plant, and my goal was to reduce the time needed by APP to obtain this information. The bill of materials (through AIDE) will reduce that time and it will also be easier to estimate costs for different sized plants. People who are interested in plants for their community, community water boards, and donors ask us how much a plant might cost and we create an estimate based on our experience, but with these AIDE updates, we can have cost estimates that are much more accurate.
— Aminta Núñez Galdámez, Agua Para el Pueblo

Please stay in touch and watch out for further updates on our progress!


  • Blog Post Author: Izumi Matsuda

AIDE Minimum Viable Product Completion

After years of work by incredible students at AguaClara Cornell, the AIDE v2 MVP is finally ready! What is AIDE, and what is an MVP? The AguaClara Infrastructure Design Engine is AguaClara’s automated water treatment plant design tool. The first version used Mathcad and AutoCAD, but the second uses Onshape, FeatureScript, and Python, as detailed in the first blog post. Since then, the Minimum Viable Product, a version with just enough features to be usable by the first customers, has been finished!

The MVP contains a number of features implemented via a 3-level design. Most important is the ability to configure the entire plant or individual components using hydraulic calculations which update the geometry appropriately. This enables a user to modify a 3D model of an AguaClara Plant by changing the flow rate and temperature input parameters. These parameters cascade through a series of calculations for each unit process, with results of one set of equations informing the inputs for another.

The first functional AguaClara plant model in AIDE v2, consisting of an entrance tank, flocculator, and sedimentor, responds to changes to design flow rate and temperature.

The MVP is for 0.6 to 6 Liters per second (Lps) (roughly equivalent to 10-100 gallons per minute (gpm)) plants and includes the entrance tank, flocculator, and sedimentor as that is the simplest configuration of multiple unit processes which AguaClara Reach plans to build. There is also the option to change more obscure design inputs, such as maximum velocity gradient through the flocculator, but that is not shown in the GIF above.

After the model is parameterized, it can be passed into the documentation engine, which replaces variables with their measurements from the model! To test this, you can paste this URL into the documentation engine, and select either English or Spanish, and ‘PDF’ from the dropdowns.

LFOM.png

The last piece of AIDE is validation. Testing first occurs before the model is built to catch any preliminary errors in the FeatureScript hydraulic functions. Then, Python is used to validate the model output. For example, given an Linear Flow Orifice Meter (LFOM) the tool verifies that the maximum design flow rate is correct within a tolerance and checks that the flow is linear across each row.

A table of LFOM variables which were replaced by their values from the model.

A table of LFOM variables which were replaced by their values from the model.

The last piece of AIDE is validation. Testing first occurs before the model is built to catch any preliminary errors in the FeatureScript hydraulic functions. Then, Python is used to validate the model output. For example, given an Linear Flow Orifice Meter (LFOM) the tool verifies that the maximum design flow rate is correct within a tolerance and checks that the flow is linear across each row.

FeatureScript tests the kinematic viscosity function.

FeatureScript tests the kinematic viscosity function.

Maximum LFOM flow rate calculation.

Maximum LFOM flow rate calculation.

Graph of LFOM linearity.

Graph of LFOM linearity.

So what’s next after completing the MVP? The flow rate range will be extended to at least 60 Lps (1,000 gpm) and the model will incorporate other plant components, like the filter and chemical dose controller. But first, the MVP needs to be validated and any bugs fixed. If you’d like to help (no experience or technical skills required!), please fill out this form and we will reach out in January when we begin beta testing.


  • Blog Post Author: Fletcher Chapin

AIDE 3-Level Design Process and Structure

New Process and Structure for Automating AguaClara Plant Designs

The AguaClara Infrastructure Design Engine (AIDE) project team has made great progress this year on AIDE v2 as discussed in two previous blog posts: AIDE Introduction and AIDE Progress Update. The previous blog posts focused on what the AIDE team is working on and their progress towards a minimum viable product (MVP). This post is focused on how the AIDE tool works to efficiently process and structure designs.

In early iterations of AIDE v2, there were distinct separations between the AIDE subteams where one team worked on hydraulic calculations and the other team worked on drawing the plant model. The process of passing information along from one team to another was a difficult challenge to overcome; 3-level design, a new organization to AIDE that uses hydraulic design and build features coupled with design part studios, has made strides in solving this issue. The 3-levels of the design are:

  1. Hydraulic Design Feature (HDF)

  2. Design Part Studio (DPS)

  3. Build Feature (BF)

This solution takes full advantage of Onshape, a cloud-based computer-aided design (CAD) software. Onshape allows users to work in Part or Feature Studios. A Part Studio is useful in developing components and modeling geometry. A Feature Studio contains FeatureScript, a programming language designed by Onshape that allows the design of custom features. For example, the hydraulic calculations which were used to design plant components have traditionally been done in Mathcad or Python, but are now done in FeatureScript within an HDF.

Example functions in the Linear Flow Orifice Meter (LFOM) HDF

Example functions in the Linear Flow Orifice Meter (LFOM) HDF

A DPS directly references the variables and outputs from the HDF and combines it with geometric constraints to set the dimensions of the model. Finally, a BF is the entry point for the user. Here, parameters such as flow rate and temperature in addition to expert inputs like head loss are defined.

Demonstration of the LFOM Build Feature

Demonstration of the LFOM Build Feature

Expert inputs are design constraints and fabrication choices intended to be entered by experienced users. Each has a default value, but anything within an acceptable range can be input. One example of an expert input is the thickness of walls within different components. This variable could be any number without impacting plant performance but relies on the judgement of a structural engineer and is a function of whether the plant is built of concrete or stainless steel. Other examples include treatment process targets such as flocculator collision potential and plate settler capture velocity. The ability to easily change these inputs in a dialog box and then see the resulting plant design will enable AIDE to become a powerful educational tool. Expert inputs are passed between levels of the design using SuperDerive and the overrides string, which is a JSON representation of the expert inputs.

This new integrated design approach has helped to speed up the process of creating unit processes and the team is working hard to meet our goal of a full design for plants in the range of 1-5 L/s by the end of the year.


Blog Post Authors: Fletcher Chapin, Nicole Wang, Tigran Mehrabyan

AguaClara Infrastructure Design Engine (AIDE) Progress Update

The AguaClara Infrastructure Design Engine (AIDE) project team has made great progress this summer on AIDE v2. As discussed in the AIDE Introduction, the team is developing software to rapidly design custom AguaClara water treatment plants over a wide range of flow rates for AguaClara Reach’s (ACR’s) global implementation partners. The project team working this summer focused on three primary components of the AIDE tool - FeatureScript programming of the hydraulic design, Onshape drawings of the plant components, and Python automation which creates plant specifications and documentation. 

The FeatureScript team finished writing the supporting fluid functions required for hydraulic calculations. Now, they are working on developing hydraulic design features which perform the necessary calculations for specific plant processes. Several components, including the flocculator and sedimentation tank, are complete. The team is now tackling one of the most complex components, the filter. This design is complex due to the two operating states of the process (filter and backwash), flow distribution challenges associated with the stacked rapid sand filter, and detailed design of the backwash siphon. 

The Onshape team completed development of the models for the flocculator, sedimentation tanks, and filter, and is currently finishing the chemical dosing components for 12-60 Liters per second (Lps) AguaClara plants (roughly equivalent to 200-1,000 gallons per minute (gpm)). A new entrance tank designed to reduce splashing and to aid in grit removal was also created based on operational feedback from Agua Para el Pueblo (APP) field staff. 

An Onshape model of the flocculator.

An Onshape model of the flocculator.

A picture of a flocculator from an AguaClara plant in Honduras

A picture of a flocculator from an AguaClara plant in Honduras

The number of flocculator channels increases with the treatment capacity of the plant.

The number of flocculator channels increases with the treatment capacity of the plant.

More models will need to be created for smaller (1-5 Lps, 20-80 gpm) and larger (greater than 60 Lps, 1,000 gpm) flow rates. The Onshape team has already developed a new sedimentation tank design for smaller AguaClara plants, as shown below.

Sedimentation tank designs created in Onshape with the capacity to treat 60 Lps (1,000 gpm) on the left and 1 Lps (20 gpm) on the right.

Sedimentation tank designs created in Onshape with the capacity to treat 60 Lps (1,000 gpm) on the left and 1 Lps (20 gpm) on the right.

Details of the sedimentation tank design created in Onshape for 1-5 Lps (20-80 gpm) plants.

Details of the sedimentation tank design created in Onshape for 1-5 Lps (20-80 gpm) plants.

Using Sphinx, an auto-documentation tool, the Python team translated the AguaClara plant specifications from Spanish (the original language in which the specifications were written) to English. This will make it more efficient for ACR (a US-based nonprofit with primarily English-speaking members) to maintain and update the plant specifications moving forward. Ultimately, the documentation engine will allow AIDE users to seamlessly switch from English to different languages based on user preference. A lightweight Django app is used to accept a preferred target language from the user and an Onshape URL specific to the plant model, and output a PDF version of the specifications for the user. To enable this, a Documenter feature was developed in Onshape which specifies values of variables used in the reStructuredText templates which Sphinx uses to build this documentation.

An excerpt from the Sedimentation Chapter of the plant specifications. Variables shown in red will be replaced by unique values determined through FeatureScript and Onshape, then provided to the AIDE user.

An excerpt from the Sedimentation Chapter of the plant specifications. Variables shown in red will be replaced by unique values determined through FeatureScript and Onshape, then provided to the AIDE user.

Upcoming work for the team includes end-to-end integration so that users can access the full suite of AguaClara technology. Integration work will begin with smaller pieces, such as incorporating the documentation website into the AIDE model as an Onshape widget. When AIDE is complete, ACR’s website will host a form that collects user-inputs and constraints then directs them to the appropriate Onshape model. 

ACR implementation partners, including APP in Honduras and Gram Vikas in India, have recently expressed interest in designs for small-scale plants. In response to these requests, ACR is prioritizing the completion of smaller plant designs within the AIDE tool, while the final version of the tool will include a broader range of flow rates in the AguaClara technology suite.

Stay tuned for progress updates as work continues this fall!


Blog Post Authors: Nicole Wang and Fletcher Chapin

An Introduction to the AguaClara Infrastructure Design Engine (AIDE)

This summer, a team of AguaClara Cornell students and AguaClara Reach members are working on Version 2 (v2) of the AguaClara Infrastructure Design Engine (AIDE). AIDE v2 software will generate a complex plant design and corresponding documentation, given minimal input parameters.

AIDE team photos.jpg

AguaClara Cornell students and AguaClara Reach members are working remotely this summer. The team uses video conferencing to work together.

Version 1 of the Design Engine was initially developed in 2008 and was dependent on proprietary software (Mathcad and AutoCAD). AIDE v2 uses open source, free software, allowing users to access AguaClara plant designs directly in their browser. It will accomplish this via Onshape, a cloud-based computer-aided design software, and its built-in programming language, FeatureScript. Documentation and specifications for the plant design will be available through an Onshape widget, which will connect to a Python-based website.

mathcad snip.png
filter snip.png

AIDE Version 1: A snippet of design code in Mathcad (left) and a screenshot of a filter design in AutoCAD (right).

The primary goal for this summer is to complete a minimum viable product (MVP) of AIDE v2. The MVP for this summer entails generating the full geometry of a Linear Flow Orifice Meter (LFOM), flocculator, sedimentation tank, and filter based on the user’s input of plant flow rate and several other hydraulic inputs, physical constraints, and user preferences. This requires a coordinated effort between the three AIDE subteams: Onshape, FeatureScript, and Python. The Onshape team has already completed a large portion of the plant’s primary treatment process components and will now be focusing on plant-wide integration and optimizing component geometry. The FeatureScript subteam will be writing design logic which incorporates hydraulic calculations into a plant hierarchy; this will allow for both component-by-component and  full-plant design. The Python subteam will be working on automating the creation of plant documentation which downloads the values of the Onshape model’s parameters, updates the documentation with those values, and translates between languages. 

python snip.png
FS snip.png
onshape filter sno).png

AIDE Version 2: A snippet of design code in Python (left), a snippet of design code in FeatureScript (right), and a screenshot of a filter design in Onshape (bottom).

The development of AIDE v2 will allow AguaClara Reach to better serve our Implementation Partners by rapidly designing custom AguaClara treatment systems, and as a result, increasing global access to safe water on tap. Continue to check our blog for updates throughout the summer!


Blog Post Authors: Nicole Wang and Fletcher Chapin