SimScale CAE Forum

VIP Latrine Optimization Challenge – Parametric CAD Model

VIP Latrine Optimization Challenge with Neven Subotic Stiftung (Foundation)

Geometry Modification Tutorial and Guidance


The geometry supplied for this challenge has been created to allow the user to modify most allowable parameters in a simple user interface and without any further modification, produce a geometry to test using CFD on the SimScale simulation platform. Furthermore, a readout of the cost of the design due to any variable change or modification is output to the user. This tutorial will show the user how to modify the geometry using the variables, where the geometry can and cannot be further modified, and how to obtain the cost of the design in the interface.

OnShape document:

Basic Geometry

There are two base designs of the VIP latrine, both consist of four cubicles, a four inline design, and a symmetrical design with two on each side.

Figure 1: Inline design (left) and symmetrical design (right).

There are benefits to both designs, the inline design naturally has a better air flow increasing the air refresh and reducing the amount of contamination to the cubical. The downside is that it has a higher cost due to an increase in building materials.

Both designs consist of the same basic setup, a cubical over a drop hole, where the waste is dropped into the pit located below. The cubical is modeled to be level with the surrounding ground level and the pit below ground.

Advised Workflow

This document comes with two base models, the user is advised to duplicate the chosen base design, rename it appropriately (such as design 1, 2, etc.) and modify these duplicates, always leaving the base designs un-modified for reference and further duplication.

A user should start by inspecting the flow of the base designs in SimScale before making their own modifications, these base simulations have already been done so all that is needed is some basic post-processing online.

The user should then move onto modifying the variables as described below, obtain the cost, and export the design to SimScale for testing. Advance users and users after the innovation award can make further custom modifications, this is advised to happen before the cost calculation is called.

Variables to modify the design

The basis of the parametric model uses a script that passes variable to other geometry operations. It is important for the user to not modify any geometry operations that are fed by a variable as this will break the model, potentially causing poor geometry and difficulty for the user to fix.

The feature that allows users to control the variables is located at the very top of the tree, ensuring that all geometry operations can therefore call any of the available variables.

Figure 2: Showing the Variable Creator feature located at the top of the tree.

Figure 3: A list of available variable the user can modify.

All variables in the variable creator user interface are modifiable, however, some restrictions have been put in place to ensure that the user cannot enter non-sensible values. For example the drop hole cannot be made too small that it is unusable, nor too big for the same reason, and is therefore restricted to set bounds, if a user sees a red field, then they may place their cursor over the field to reveal its bounds.

Figure 4: Example of entering a value out of bounds, and how this is communicated to the user.

The following list details the variables and what they modify.

Drop hole diameter

The drop hole diameter is the hole in which waste enters the pit, its diameter is less to do with ergonomics and more to do with allowing air to pass through for improved ventilation, a larger diameter might mean more flow down the hole, however, negatively, in some scenarios or geometrical setups, it may also allow more air to come back up, thus contaminating the cubicle with odorous gasses which can also many kinds of vermin.

Figure 5: Comparison of drop hole diameter between the upper and lower bounds.

Vent hole diameter

Vent hole diameter is the diameter of the pipe that directly vents the pit, it lead the air passing out of the pit up into the atmosphere. The larger the pipe diameter the higher the volume of air that can pass up the vent,however under some wind conditions and designs this might negatively affect the design by allowing more air down the vent, potentially allowing flow up into the cubical.

Figure 6: Comparison of the vent hole diameter between upper and lower bounds.

Vent height

The vent height controls the height in which the top of the vent pipe protrudes above the highest point of the roof. The longer the pipe the more the cost, however, if a pipe is too short, the velocity of the flow over the pipe might be two low or the odorous gases might return into the building in its wake.

Figure 7: Comparison of the vent height between upper and lower bounds.

Wall vent height and width

The wall vent height and width controls the size of the vents in the walls which are located on the same wall as the entrance to the cubicle. They are designed to allow air to flow into the cubical and induce a flow from the wall vent to the raised pit vent. Size affects the flow rate, once again positively however in some scenarios could negatively affect the flow. Due to increased complexity in masonry, a cost for extra materials is incurred to offset the reduction in cost due to the hole.

Figure 8: Comparison of the wall vent height and width between upper and lower bounds.

Roof angle

Roof angle can be changed to alter the flow over the cubicle, this will likely affect many things including how the size of the wake and ease of flow around the building, this might also have many effects that are not obvious such as altering the flow of the contaminant from the pipe vent. Although the materials for the roof construction are neglected, the angle of the roof does effect the length of the pipe since the pipe extrusion height is set to a minimum of 0.5m above the highest point on the roof to comply with standards.

Figure 9: Comparison of the Roof Angle and width between 45 degrees and 1 degree.

Pit Depth

The pit depth is usually set to a set depth to comply with standards, however for this competition we are allowing a small range of depths to be used as it would be interesting to determine if different depths impact the performance significantly. This is likely to change the air changes per hour result but might affect the flow of contaminants.

Figure 10: Comparison of the Pid Depth between 2m and 3m.

Pit Separation Depth

The pit separation walls are usually built to the top of the pits, leaving no gaps between them, however, it is of interest to investigate what effects to the cost and flow lowering the separation wall might have. Lowering the top will allow air and contaminant to flow between the pits, likely causing increased flow in the center pits and reduced flow at the sides, however, when flow is not blowing onto the entrance or opposite faces, a flow might be induced across the pits, potentially causing contamination of the last cubical.

Figure 11: Comparison of the Pit Separation Depth between 0m and 1m.

Obtaining the construction cost

As previously mentioned, the geometry has a built in feature to estimate building costs based on the most costly components such as masonry, concrete and PVC. Not all materials are considered, however, the materials that are considered in the cost are both affected by design alterations and are of significant cost. The pit depth for example, will reduce the masonry cost, the excavated material disposal cost and the separation wall cost.

To calculate the costs, the calculator looks at a selection given to it and returns the cost based upon the unit and the price per unit. For example, the pit walls are priced by volume, the feature evaluated the volume and multiplies it by the cost per unit volume.

Figure 12: Cost Calculation Inputs, with default selections.

The calculator does not require the user to change any of the selections unless advance modification has been made to the geometry and additional considerations need to be made.

The output of the calculation is presented in the feature script notices.

Figure 13: Location of the FeatureScript Notice toggle.

Figure 14: FeatureScript Notices displaying a breakdown of each item, the units, unit costs and total costs.

Note: Units and costs are displayed rounded to the nearest integer for a clean output, however, calculations are done on the raw values and therefore sometimes the total cost does not equal the unit by the price per unit exactly.

The total cost to build of your design will be later needed to generate a cost function of your design.

Exporting the design to SimScale

The exporting process can be done directly in SimScale by connecting to your OnShape account, therefore, once your design iteration is finished, and a cost is obtained, please refer to documentation for importing and meshing on the SimScale platform.

Advance geometry modification

Although these parameters for alteration should be enough to explore a large design space, an innovative design is also of interest. The user may be considered for the innovation prize if their design does not necessarily meet the strict guidance, however, the design drastically reduces cost or vastly improves performance without sacrificing the basic function (privacy, usability and hygiene). To this end the user may add or subtract material, being careful to think about materials used (ideally extension of current materials) and manufacturability (simplicity).

An example of such things might be:

  • Baffles in the roof to separate the flow between cubicles (be sure to add additional wall to the cost calculation)
  • Removal of separation walls between some cubicle to share a vent pipe (be sure to correct number of pipes in the cost calculation).
  • Increasing or reducing number of vent pipes (be sure to correct number of pipes in the cost calculation).
1 Like

Please post the webinar recording.

Hi @builtinnovator!

There you go:

Enjoy watching and happy SimScaling!


Thank you for posting the webinar. Where is the supplied geometry?

Hi @builtinnovator,

If you follow the second link you should see the following:

The second and third tab is the geometry, you will need a free community OnShape account.




Just wanted to know the deadline for submission of work?


Hi @ojagtap and thanks for participating in this challenge!

I am sure my colleague Darren (@1318980) can comment on that.

Good luck!


Hi all,

I was wondering how I can find the already made simulations. I mean those mentioned one in β€œthese base simulations have already been done so all that is needed is some basic post-processing online.”

Thanks a lot

Hi Hesham :slight_smile:

My colleague will get back to you asap! Sorry for the inconveniences so far.



1 Like

Hi @ojagtap, the form and submission date will be created shortly, however, I think as a rough date mid-Feb was discussed.

Hi @heshamzahw, the simulations on the base design are linked in this document here:

Just follow the steps to reassign the settings to your design to simulate it, alternatively, you can analyse the base design to understand how you could improve the design (or where you could degrade the design for cost saving).

Any more questions please feel free to ask :slight_smile: