Thursday, June 18, 2020

Another web app to estimate the soil water retention curve

I created another simple web application to estimate the soil water retention curve from basic particle size distribution data. I used the equations developed by Zapata et al. (2000). The water retention curve can be exported as before and the previous app can be used to estimate hydraulic conductivity and oxygen diffusion coefficient of the soil after fitting to the vanGenuchten model.

Link : https://rukshan-azoor-psd.anvil.app/

I have also embedded the app below:  


Saturday, June 13, 2020

Building a web app with nothing but (a bit of) Python

My knowledge of Python (the programming language) is not extensive. I have used it a few times to streamline some of my research activities that include data handling and processing. I find Python easy to get into without much programming experience and sources like Stack Overflow help very much to do this. So when I came across a web platform called Anvil that claims to let you build fully functional web apps with nothing but Python, I decided to give it a try. I was pleasantly surprised, and happy with the web application that I was able to build with a relatively basic knowledge of Python and nothing else. My code may not be the most efficient, but it gets the job done.

I decided to build an app within my area of research. It is an app to estimate soil hydraulic properties and oxygen diffusion coefficients at different degrees of saturation, based on water retention properties of the soil. I used equations from literature and those developed in my own research to do this. Two water retention curve parameters (van Genuchten α and n) and the soil porosity are used as inputs and the hydraulic conductivity function and oxygen diffusion coefficient characteristic are generated using the equations. I used the Plotly library built into Anvil to generate three plots for the generated functions and the water retention curve. I also built in an option to export the generated data as a text file that can be used for further analysis.

I was able to do this with the free plan that Anvil offers. Anvil also has a paid subscription plan that has more Python libraries and more options for development support and deployment. I believe it is a great product with exciting capabilities.

My first web app can be accessed at :  https://rukshan-azoor-wrc.anvil.app/




Saturday, November 23, 2019

Backfill for underground infrastructure: Soil strength or corrosivity? Which do we choose?

This post is inspired by one of my research findings published recently. My PhD research involved the evaluation of underground corrosion from a unique viewpoint combining the two traditionally separate fields of soil mechanics and electrochemistry.

Corrosion requires both water and oxygen to occur, and in the case of underground corrosion, soil supplies these reactants for the reactions to proceed. It follows that the ability of the soil to store and supply water and oxygen will to some extent, govern the rate of corrosion of metal buried in soil. It is known that there is a critical level of moisture at which corrosion is soil is maximized. Too much water will stifle corrosion because the supply of oxygen to metal is severely limited under waterlogged conditions.

As part of my research, we investigated these mechanisms in detail. Buried infrastructure such as pipelines and storage tanks fail due to corrosion, causing large economic losses and environmental damage due to leaks and bursts, exposing contents such as oil and gas to the surrounding environments. An understanding of underground corrosion and its prevention helps increase longevity of such buried assets and is a step towards sustainable development. While corrosion and its prevention are handled by electrochemical practitioners, the installation of buried infrastructure and backfilling is under the purview of geotechnical engineers. Given that the problem of underground corrosion overlaps both these fields, its study should be an interdisciplinary effort.

Our experiments showed that the critical level of moisture for corrosion is related to a relationship known as the soil water retention curve, or the soil water characteristic curve. Combining results from several electrochemical experiments and soil tests we were able to identify the behavior of water in soil that governs corrosion. We saw that in different soil types, the continuity of air and water phases change differently with the degree of water saturation, and that the transition point at which the air phase becomes occluded coincides with the critical degree of saturation for corrosion (where corrosion is maximized) for each soil type. What was more interesting was that this critical water content for corrosion is the same as the optimum water content for soil compaction. It has been shown that the same mechanisms for air entrapment occurs at the optimum water content during soil compaction.

This finding is important because, it is usual practice among geotechnical engineers to compact soil to its optimum water content to maximize its strength. In the installation of buried infrastructure and the subsequent compaction of backfill, if this usual practice is followed, we will be inadvertently creating the most conducive conditions for corrosion of the buried metallic asset. So, the question is whether we increase our soil strength, of the rate of deterioration of the buried metal. One possible solution is to compact soil in the drier side of the optimum water content. But there may be other factors at play that need to be considered. What is more important is to identify that this problem is interdisciplinary in nature and needs to be solved that way. Corrosion engineers need to be aware of this in planning prevention techniques such as cathodic protection, and geotechnical engineers need to know the effect of soil compaction on the corrosion of buried metallic infrastructure.

Like many of our modern problems, underground corrosion needs to be viewed and solved by taking a multidisciplinary approach. Confining our engineering efforts to the traditionally isolated fields is likely to worsen the problem rather than solving it, and our knowledge and forces need to combine to achieve sustainable progress.

The point of maximum corrosion was identified as the degree of saturation at the inflection point of the water retention curve also coincident with the degree of saturation at the optimum moisture  content (OMC) in the compaction curve

Sunday, August 26, 2018

More turquoise water

Back in 2014 I was fascinated by the bright turquoise water that emerged from a base excavation at the Aruwakkalu limestone mine in Sri Lanka. I was doing my undergraduate internship at the time and was so intrigued that I researched into the phenomenon and wrote a blog post explaining how the turquoise colour emerges due to selective scattering of light caused by calcium carbonate crystals. A picture that I took was also featured in the Mining magazine. Four years later I came across the striking turquoise water again.

I am currently a visiting research student at the University of British Columbia, Canada and recently visited some glacial lakes in British Columbia. I got to see once again, the bright turquoise colour that intrigued me 4 years ago. The reason behind the turquoise colour is the same selective scattering of light. This is caused however, not by calcium carbonate crystals but by glacial flour/rock flour, which is the name given to very fine rock particles generated by glacial erosion, and remain suspended in the water. The lakes I visited were the three Jofrre lakes and Garibaldi lake, where I even went for a relaxing swim. Some pictures that I took at the lakes are below.

Upper Joffre Lake

Middle Joffre Lake

Garibaldi Lake

Garibaldi Lake


Tuesday, September 5, 2017

Astrophotography on a budget

Astrophotography is thought to be an expensive hobby to pursue involving lots of high-tech and expensive equipment. I was under the same impression and was concerned of this steep entry barrier. Then I came across this blog-Lonely Speck by Ian Norman, who in my opinion, is a very creative photographer and does an excellent job of explaining the basics of photographing the stars. This blog got me started and I started reading online forums and learning about the hobby.

I gathered that new sensors in most cameras-even entry level ones are perfectly capable of capturing the milky way. Any DSLR or compact camera with manual controls can be used to gather enough light over a long exposure to shoot the night sky. So I bought my first DSLR, a Canon 1300D and a basic tripod for about 500AUD. This is an entry level camera and is one of the cheapest DSLRs in the market. Some blog posts and YouTube videos later I set off in search of dark skies.  

After a couple of attempts I am very happy with my results and have even got better results than some photos that I drew inspiration from. I'm still learning and hoping to improve on my methods and results. The usual process I follow to shoot the stars is, waiting for a day with clear skies, checking the moon phase, the position of the milky way and selecting a dark location without much light pollution.  The pictures below are some of my best shots taken up to now, with a little description on the story behind the shot. 

My first attempt at shooting the Milky Way. The stars are out of focus and not a very good image, but was a valuable learning experience. Location:Paradise beach Gippsland



These three shots were taken at Silvan Dam Olinda. The first using the 18mm kit lens and the other two using a 50mm prime lens at f2.0 borrowed from a friend.  

My first shot of the galactic core taken at the Cape Schanck beach. It was a misty day with plenty of moonlight to illuminate the landscape. But the milky way was very faint. 

Clearly visible galactic core taken at Olinda

Another shot of the galactic core taken at Wilsons Prom under moonlight.
This shot was also taken at Wilsons Prom after the moon set. This was the best naked eye view of the Milky Way I've experienced up to now. 
This shot taken at Olinda is one of my favorites because of the unintentional effect of light painting. A car passed by during exposure and it illuminated the tree and a power line nearby, giving the photo a more balanced look.  






Monday, November 28, 2016

Physical Modelling of Coastal Structures

While computational modelling is increasingly being used in place of physical modelling in many fields of engineering, physical modelling still finds an important role in coastal engineering. In the designing and testing of coastal engineering structures such as breakwaters, sea walls and revetments, the complex interactions between waves, sediments and the structural components need to be assessed and quantified. Owing to the high complexity, current numerical and analytical techniques cannot be applied to get a comprehensive solution within a practical time-frame. For this reason despite the relatively high cost involved, physical modelling is relied upon for an accurate assessment of how the real world structure will behave. Usually the final step in the design process of a coastal structure, it serves as a verification of the design calculations and is also a key step in the final project approval.

Physical modelling for coastal structures can be broadly classified into 2D or wave flume testing and 3D or wave basin testing. As the name suggests, 2D tests involve direct wave impact channeled along a long, narrow wave tank known as the flume. Flume tests are mainly used to assess the structural stability of the engineered design, Displacement of structural components, wave over topping and overall structural integrity are monitored over different types of wave attack. 3D tests involve an accurately scaled down construction of the seafloor, or bathymetry over which oceanic conditions of the locality are recreated. It is used to test the structure over waves from different directions and magnitudes. It helps to identify critical locations of the structure. 

The following is a video of a wave flume test carried out at the Lanka Hydraulic Institute (LHI) in Sri Lanka.


Although physical modelling is preferred over computational methods at present, this situation is likely to change in the near future. With increasingly powerful computers and efficient numerical methods being developed, the time taken to run complex simulations have come down significantly. A very promising computational method which could be used for these types of testing is, Smoothed Particle Hydrodynamics (SPH) first developed by Gingold and Monaghan (1977). A mesh free method which models the behavior of a set of particles under a given set of constitutive relations, SPH has already been used in oceanographic research. SPH can also be used to model wave structure interactions and other complex phenomena making it the ideal method for evaluating designs of coastal structures. 



Saturday, April 25, 2015

Connecting Adam's Bridge

Adam's Bridge, the collection of limestone shoals between the Mannar Island of Sri Lanka, and the Pamban Island of South India has sparked both the imagination and inventive thinking of many. The closest distance between the two countries-between Dhanushkodi, and Talaimannar is about 30 km, and a bridge connecting the two countries has been a long argued prospect. Such a bridge will be beneficial to both countries in terms of economics and trade. The engineering and environmental challenges of such a construction are overwhelming and a unique Geo-chemical engineering method might hold the answer to this problem.



The Jaffna Peninsula and the surrounding area consists of a Miocene limestone basement and the sea in the area of the Palk Strait is very shallow. This makes it possible to easily construct a permanent causeway between the two countries by connecting the limestone shoals of the Adam's Bridge. Although a simple construction, a permanent separating structure will disrupt the sediment movement through that channel and can be detrimental to fisheries as well. The complete disconnection of the water circulation through the gap can pose significant environmental problems. Building a bridge across the entire span is a possibility that is too costly. Therefore the ideal solution would be to construct a combined, landmass-bridge structure.

http://www.geo.shimane-u.ac.jp/spfs/g_students/mext/08sansfica/Sansfica08_2L.jpg

 To support the construction of a bridge, the existing landmasses or shoals should be elevated. Bridges can be constructed on these elevated landmasses while leaving gaps for the flow of water. Some of these gaps can be dredged deeper to allow for the same volume of water to flow. This could also serve the purpose of a navigable channel for ships as proposed by the Sethusamudram Project. Another prospect is for electricity generation by means of hydro-turbines installed at gaps where the flow of water will be heightened.

It is in elevating these landmasses that the unique geo-chemical engineering method comes into play. Research conducted by Prof. R.D. Schuiling indicates that these landmasses can be elevated in a cost effective manner by injecting Sulphuric acid into the limestone basement. The principle here is that, Sulphuric acid will react with the limestone to produce Gypsum, which has a higher molar volume. Thus, the rock will expand, and this expansion will be accommodated by surface uplift. (R.D.Schuiling, Current Science Vol 86).


This process involves drilling bore holes along the trend of the Adam's bridge and injecting Sulphuric Acid at modest pressures insufficient for hydro-fracturing. The well jointed Miocene limestone is expected to facilitate the migration of the acid through the basement. The acid will be injected to bottom layers of the limestone leaving the top layers unaffected thus avoiding contact with the biosphere and and associated environmental problems.

Prof. Schuiling points out that if industrial waste Sulphuric acid is used for the process it would be an economically viable technology while also solving the disposal problem of such acids. He further addresses possible environmental effects. Since the expansion of the rock takes place at the bottom layers and is separated by a layer of un-reacted limestone, there won't be direct consequence from the reaction. As for the concerns with heavy metals if waste acids are used, it has been experimentally proven that such heavy metals are immobilized during the reaction.

While a social and political consensus regarding the construction of the Adam's Bridge has not yet been reached, and no comprehensive EIA has been conducted in this regard, if these happen in the near future and if the two countries go ahead with the project, this Geo-chemical engineering technology will be a compelling prospect.