
How I Made a Pipeline Friction Loss Calculator App in Minutes with AI
It used to cost days to design engineering calculators in Excel. Now with AI, you can create personalised calculators in minutes with the help of AI.
A few weeks back, I built a unit converter (metric to imperial) with the help of Google AI Studio.
It was impressive how quickly that was built with just a couple of prompts.
That motivated me to upgrade my pipeline friction calculator for my irrigation engineering work now as well.
So I used Google AI Studio to build myself this upgraded tool.
Building a Pipeline Friction Loss Calculator App
To give AI a solid knowledge foundation, I used the Dutch quality requirements for water technical installations in horticultural greenhouses as my reference document. In here are the parameters and calculations that installers need to stick to when they engineer systems.
These are the steps I took to build the calculator.
1. Google AI Studio
Go to https://aistudio.google.com/
Make sure you are logged in and go to Build.

2. Upload the Quality Requirements PDF Document
I uploaded that file to Google AI Studio so it will use the document as a reference.

3. Prompt 1
I wrote out the following prompt to test if my idea would even work. I thought I could always add or modify the app later.
Prompt
Can you create based on the information in this document attached a pipeline friction loss calculator irrigation engineers can use?
Result

4. Refine
After the first result, I was again very impressed by what AI came up with. The calculator was usable straight away. I also checked the outcome of this newly created calculator with other pipeline friction loss calculators I used to calculate with.
That was all similar, so I was confident AI found the right pipeline friction loss equation in the reference document.
I gave AI my brand guidelines and refined the app more with simple prompts. Those were small adjustments, so not really worth mentioning in this blog.
5. Last Prompt
I wanted to add a couple more features. I reckon it would be handy to generate reports when you calculate the friction of the pipeline. I also think it’s handy if you can give the pipeline a name.
So I will gave it the following prompt.
Prompt
Add a feature to the calculator that generates a one-page report with all the necessary information. When I click a button, a well organised PDF should download. Also add a field where I can name the pipeline. For example, "Pressure line handwater." That will be the header of the PDF file and the name of the PDF file.
Result

6. Generating a Report
Now that the report button was added to the calculator, I wanted to test if it worked. So I clicked on the button and the PDF was generated. Straight away, I was again impressed. It looked like a clear report with the most important data on it.
There were just some letters overlapping some numbers, as you can see in the image below. That will need adjusting. I'll fix that in the future.

7. Deploy App
Although the app was not a completely finished product, I deployed the app. It was good enough to start using it. And I will definitely keep refining it in the near future.

8. Functional App
A functional app is created: PipeCalc

This is the link to the pipeline friction loss calculator app:
https://pipecalc-1085622194231.us-west1.run.app/
Conclusion
I would definitely double-check my calculations when using this newly AI-generated calculator, and I encourage you to do the same if you decide to use it. But I'm confident it's accurate enough to make educated guesses when designing.
Building tools with AI is fast and easy.
What used to take days now takes minutes. This friction loss calculator is a good example. It's not perfect yet, but it's already useful for my work.
I hope this shows you how AI can help you build your own tools too. Give it a try and see what you can make!
