
How ancient Manipuri engineers built a fortress using water as a wall — hydraulic engineering.
The Sacred Citadel
For two thousand years, the Kangla Fort stood at the heart of Imphal, the capital of Manipur. It was not like the forts of Rajasthan — no towering stone walls, no carved sandstone parapets. Kangla was built with water and earth, and it was just as impregnable.
A boy named Thokchom Romesh — his friends called him Romesh — was fifteen and bored. His school had assigned a heritage project, and most of his classmates were copying Wikipedia articles about the Taj Mahal. Romesh wanted to do something local. His grandfather, Ibomcha, had been a guard at Kangla when it was still a military base.
"Tell me about the fort," said Romesh.
Ibomcha smiled. "Everyone thinks a fort is about thick walls. Kangla was about something better: the moat."
The Moat
The Kangla moat was not a narrow trench. It was an engineered water system — a wide, deep channel fed by the Imphal River, surrounding the entire citadel. The moat was connected to a network of canals that regulated water flow in and out, keeping the level constant even during the monsoon floods.
"The British tried to cross the moat in 1891," said Ibomcha. "Do you know what they found? The water was over three metres deep, the bottom was thick mud that swallowed you to the waist, and the inner bank was a steep earthen wall, slippery with clay. You could not swim across in armour. You could not wade. You could not float a boat easily because the channel was designed with bends that broke the current and made navigation difficult."
Romesh was scribbling notes. "So the water was the wall?"
"Water was the first wall. Behind the moat was the earthen rampart — a raised embankment built from the soil excavated to create the moat. The engineers piled the earth on the inner side, packing it in layers and planting trees on top. The roots held the earth together. The rampart was 6 metres high and several metres thick."
"And behind the rampart?"
"The citadel — the inner compound with temples, granaries, a royal palace, and wells. Kangla was designed so that the garrison could survive a siege: water from the wells, food from the granaries, and the moat keeping enemies at a distance where arrows and spears could reach them but they could not reach the fort."
The Engineering of the Moat
Romesh went to the Kangla Fort (now a public park) and measured the moat. It was approximately 20 metres wide and 3–4 metres deep. He calculated the volume: for a moat roughly 2 kilometres in total length, 20 metres wide, and 3.5 metres average depth, the volume was approximately:
2,000 × 20 × 3.5 = 140,000 cubic metres of water
That's 140 million litres — enough to fill 56 Olympic swimming pools.
"Where did all the water come from?" Romesh asked his physics teacher.
"The Imphal River," she said. "But the engineering isn't just filling a ditch. The challenge is maintaining a constant water level. During monsoon, the river floods and the moat would overflow. During dry season, the river shrinks and the moat would empty. The Kangla engineers built sluice gates — adjustable barriers that could be opened or closed to control flow."
She drew a diagram. When the river was high, the upstream sluice gate was partially closed to limit inflow, and a downstream gate was opened to release excess water. When the river was low, both gates were adjusted to retain water. The moat level stayed roughly constant year-round.
"That's hydraulic engineering," she said. "Controlling water flow using gravity, channel design, and adjustable barriers. The same principle powers modern irrigation, canal locks, and even hydroelectric dams."
The Earth-and-Root Wall
The rampart fascinated Romesh even more. The Kangla builders had packed the earth in layers, each layer dampened and compressed before the next was added. This technique — called rammed earth construction — creates a wall as hard as concrete when properly done.
But the Kangla engineers went further. They planted specific trees on the rampart: species with deep, spreading roots that bound the soil together. The roots acted like natural rebar (the steel rods inside concrete), providing tensile strength that the earth alone lacked.
Over centuries, the trees grew massive, and their root networks turned the rampart into a living structure — one that actually got stronger with time, unlike stone walls that crack and crumble.
Romesh ran his hand along the ancient rampart, still standing after two thousand years. Grass grew on its slopes. Trees shaded its crest. It didn't look like engineering. It looked like a hill.
But it was both.
The Presentation
Romesh's heritage project was the only one that included calculations: moat volume, water flow rates, sluice gate mechanics, and a comparison between rammed earth and modern concrete compressive strength.
His teacher held up his report. "This," she said, "is what heritage looks like when you ask 'how' instead of just 'what.'"
The end.
Choose your level. Everyone starts with the story — the code gets deeper as you go.
Here is a taste of what Level 1 looks like for this lesson:
# Moat Volume Calculator
length = 2000 # metres (perimeter)
width = 20 # metres
depth = 3.5 # metres
volume_m3 = length * width * depth
volume_litres = volume_m3 * 1000
weight_tonnes = volume_m3 # 1 m³ water = 1 tonne
print(f"Moat dimensions: {length}m × {width}m × {depth}m")
print(f"Volume: {volume_m3:,.0f} m³")
print(f" {volume_litres:,.0f} litres")
print(f"Weight: {weight_tonnes:,.0f} tonnes of water")
print(f"Olympic pools: {volume_m3 / 2500:.0f}")This is just the first of 6 coding exercises in Level 1. By Level 4, you will build: Build a Moat Water Level Controller.
Free
Level 0: Listener
Stories, science concepts, diagrams, quizzes. No coding.
You are here
Level 0 is always free. Coding levels (1-4) are part of our 12-Month Curriculum.
Moat hydraulics, rammed earth construction, and sluice gate mechanics — the engineering science behind Manipur's ancient fortress.
The big idea: "The Fortress of Kangla" teaches us about Hydraulic Engineering & Fortification — and you don't need to write a single line of code to understand it.
A moat is a wide, deep trench filled with water surrounding a fortification. It seems simple, but it solves multiple engineering problems at once.
First, depth defeats wading. A moat 3 metres deep cannot be walked through — soldiers in armour would drown. Second, width defeats jumping and climbing. A 20-metre-wide moat cannot be crossed without a bridge or boat, and both are easy to destroy or defend against. Third, mud and steep banks make the moat difficult even for swimmers — the bottom of Kangla's moat was thick silt that trapped anyone who tried to touch bottom.
A moat also creates a clear field of fire. Defenders on the rampart can see and shoot at anyone attempting to cross the open water. There is no cover in a moat — no rocks, no trees, no walls to hide behind. An attacker crossing a 20-metre moat under arrow fire is exposed for the entire crossing.
Check yourself: Why would a wide, shallow moat (1m deep, 30m wide) be LESS effective than a narrow, deep moat (4m deep, 15m wide), even though the wide one covers more area?
Key idea: A moat uses water depth, width, and muddy banks to create an impassable barrier. Combined with a clear field of fire, even a simple water channel becomes a devastating defensive system.
The biggest challenge of a moat is keeping the water level constant. Too much water during monsoon floods the fort. Too little during dry season exposes the muddy bottom, making the moat crossable.
The solution is a sluice gate — a moveable barrier placed in the channel connecting the moat to the river. By raising or lowering the gate, you control how much water flows through. This is the simplest form of hydraulic control, and the same principle is used in modern canal locks, irrigation systems, and dam spillways.
Water flows from high points to low points — this is gravity-driven flow. The rate of flow depends on the head — the height difference between the water level upstream and downstream of the gate. A larger head means faster flow. By adjusting the gate opening, you control the effective head and therefore the flow rate.
The formula is: Q = C × A × √(2gh), where Q is flow rate, C is a discharge coefficient (how efficiently the gate passes water), A is the opening area, g is gravity, and h is the head. Kangla's engineers didn't know this equation, but they understood the principle perfectly through observation and experience.
Key idea: Sluice gates control water flow by adjusting the opening through which water passes. Flow rate depends on the gate opening size and the water level difference (head). This simple mechanism maintains constant moat levels across seasons.
Access all 130+ lessons, quizzes, interactive tools, and offline activities
**Rammed earth** is one of the oldest building techniques in the world — and one of the strongest. Soil is placed in a wooden form (like a mould), dam...
To understand the engineering challenge of Kangla's moat, you need to calculate its **volume** — how much water it contains....