31: Chapter 31 Lagrange's Compiler
In the spring of the eleventh year, the Wasteland didn't get much rain.
At this time in previous years, the dried-up riverbed would more or less seep out a bit of murky groundwater, slowly flowing through the rock crevices into the water storage pit Jiang Lin had dug in advance.
But this year, a full month had passed, and only a layer of dry, cracked mud remained at the bottom of the water storage pit.
The mudskin had been blown hard by the wind, cracking into fine lines like countless mouths mocking him.
Jiang Lin squatted by the edge of the pit and dug off a piece of the mudskin with his fingers.
The mudskin was very thin, crumbling at the slightest pinch without any hint of moisture.
The dry season had come early, and not just in the ordinary sense of low rainfall.
The groundwater level had dropped noticeably.
This was more dangerous than a drop in grain production.
In the Wasteland, lacking water was even more fatal than lacking food.
When food was insufficient, one could rely on reserves and physical endurance to scrape by for a while.
Once the water supply was cut off, the human body would quickly run into trouble.
Dehydration, electrolyte imbalance, hallucinations, organ failure—these words were not distant nouns in medical textbooks, but things that would step by step walk right up to you in the Wasteland.
Jiang Lin wouldn't die of thirst immediately, though.
Several hundred meters north of the camp, there was an underground rock fissure.
That was a backup water source he had discovered in his sixth year.
The problem was that fetching water from that place was too exhausting.
He had to tie a bucket to a nylon rope, lower it down the rock fissure, wait for the mouth of the bucket to submerge in the water, and then pull it up bit by bit.
Several hundred meters away, making a round trip.
A bucket of water, pulled up once.
To satisfy his minimum daily drinking, cooking, and basic cleaning needs, and keep two hundred square meters of farmland alive with a trickle of seedling-saving water, he had to repeat this dozens of times every day.
This wasn't just labor.
It was throwing calories down a well.
In the Wasteland, every single joule of energy had to be calculated and spent carefully.
But now, the physical strength he spent on drawing water every day was like an invisible crack, slowly devouring the surplus he had painstakingly scraped together over the years.
One late-spring morning, after Jiang Lin finished drawing his seventeenth bucket of water, his arms were already beginning to ache.
Meanwhile, the Soybean seedlings by the edge of the field were looking a bit wilted.
The edges of the potato leaves were curled up, as if scorched by fire.
"We need to make use of the wind."
The Wasteland lacked everything except wind.
Jiang Lin had tried making a small wind turbine before, and the failure had been miserable.
The time the blades flew off had almost taught him a lesson right on his face.
Ever since then, he had kept a respectful distance from the four words wind power generation.
But drawing water was different.
He didn't need a stable voltage, high-speed rotors, or a nice dynamic balance.
He only needed a crude and inefficient device that could repeatedly pull the bucket up from the rock fissure.
Jiang Lin returned to the Stone House, washed his hands, opened the [Wasteland Engineering_Temporary Solutions] folder, and created a new document.
[Wind-Powered Water Drawing Device_Version 1]
Then he took stock of his belongings on hand.
A few thick steel bars smashed out from the camp ruins, a roll of nylon rope used for pendulum experiments, an old rain tarp used to block the window, some thin metal sheets, a few wooden poles, and red soil and stones all over the ground.
Back on Earth, even a scrap collector would turn up their nose at this pile of junk.
But in the Wasteland, this was his entire hand for piecing together heavy equipment.
Jiang Lin quickly drew the first sketch.
He built a fulcrum with stones and mounted the longest steel bar on top of it to act as a lever.
One end of the lever hung the bucket, and the other end was connected to a nylon rope.
The other end of the rope was tied to another vertically erected wind-facing pole hung with the rain tarp.
The wind blew the rain tarp, tilting the wind-facing pole backward and pulling the rope.
The rope tugged the lever, and the lever lifted the bucket.
When the wind was light, it fell back down relying on the counterweight and the bucket's own weight, completing a reciprocating cycle.
The principle was very simple, so simple that it radiated a kind of Stone Age beauty.
But Jiang Lin didn't immediately go to move the steel bars.
These years in the Wasteland had taught him that the simpler things looked, the more likely they were to kill you when put into motion.
The wind caught by the rain tarp was not a stable force.
The wind in the Wasteland was not the docile arrow found in textbooks.
It was turbulent flow that waxed and waned unpredictably.
The soft nylon rope could only pull and not push; slackening and then suddenly tightening would produce a violent impact.
The steel bar was not an ideal rigid body, the surface of the stone fulcrum was uneven, and the bucket would sway up and down in the rock fissure.
The water in the bucket would also slosh around.
If he just went ahead blindly based on intuition, the first version might not be a water-drawing device, but an automatic face-smashing device.
Jiang Lin stared at the sketch for a while and wrote beside it:
[Before doing the work, calculate the accounts first.]
This sentence had once appeared in the solar power system.
Now it appeared again.
He had calculus, General Physics, Linear Algebra, probability statistics, and error analysis.
In the tenth year, he had just used the method of least squares to perform a rough fit on that mess of farmland data.
Although the result was ugly, it at least let him know that finding trends in noise wasn't entirely impossible.
Since he could figure out patterns in a pile of dirty data, calculating a tangible, rough lever shouldn't be too difficult.
As steady as an old dog, Jiang Lin picked up the ink tablet, drew a three-dimensional simplified diagram of the water-drawing system, and then began running through his most familiar process:
Newton's force analysis.
He dismantled the system.
Component A was the wind-facing pole.
Subjected to wind force, base friction, self-weight, and the tension of the nylon rope.
Component B was the nylon rope.
Tension at both ends, which might slacken or tighten.
Component C was the lever.
Subjected to rope tension, bucket gravity, fulcrum support force, and friction.
Component D was the bucket.
Gravity, rope tension, potential collisions with the rock wall, and the sloshing of water.
Jiang Lin chewed on the tip of his pen, drawing long and short force arrows on each component.
Before he had drawn more than a few strokes, his brows furrowed into the shape of the Chinese character for river.
"It's too chaotic."
He stared at that nylon rope.
The rope was a soft constraint, meaning it could only provide tension and not compression.
When the wind weakened and the wind-facing pole rebounded, the rope would instantly lose tension, and the lever would crash down.
Once the next gust of wind filled the rain tarp again, the rope would suddenly tighten, producing an impact.
Things that alternately tightened and loosened like this were the most troublesome.
Then came the fulcrum.
The lever wasn't mounted on a metal frame with bearings.
It was simply cradled between two boulders, barely positioned by grooves and limit blocks.
The fulcrum would create friction, wear out, and shift slightly due to vibration.
Once the fulcrum shifted, the lever arm would change.
Once the lever arm changed, all the equations from just now would have to change along with it.
Look at the wind force again.
The wind wasn't a constant; its magnitude changed over time, and its direction was also shifting.
The force-bearing area of the rain tarp would also change with the shape of the fabric surface.
This wasn't a static problem.
Instead, it was a dynamic system with unstable external forces, connections, impacts, and friction.
Jiang Lin braced himself and continued writing.
The wind-facing pole rotating around the bottom fulcrum required torque equations.
The lever rotating around the stone fulcrum also required torque equations.
The up-and-down movement of the bucket required translational equations.
The constrained length of the rope had to be written down.
If the rope slackened, the constraint temporarily failed again.
The wind force term had to be written as F_w(t).
The rope tension had to be written as T(t).
The fulcrum reaction force had two directions, and the direction of the friction force also had to be determined.
Less than twenty minutes later, the e-ink screen was already piled high with trigonometric functions, subscripts, unknown constraint forces, and coupled equations.
Jiang Lin stared at this mass of things, completely stunned in place.
He had listed too many equations.
The instantaneous tension of the rope, the support force of the stone fulcrum, the fulcrum friction, the extrusion pressure of the wind-facing pole's base.
The impact force between the lever and the limit blocks, the instantaneous reaction force when the bucket hit the rock wall.
In Physics, these things shared a common name.
Constraint force.
They certainly existed in reality.
But Jiang Lin didn't care about their exact numerical values every single second.
What he cared about was whether this device could draw the water up, whether the lift was sufficient, whether it would fall apart, and which parameter should be modified the most.
Yet Newton's equations forced him to track down every single detail.
They required him to chop the system into pieces and then interrogate how every single component shoved each other around.
This was like wanting to manage a large factory with tens of thousands of workers, yet insisting on checking how many breaths each assembly line worker took.
"Old Newton, oh Old Newton!"
Jiang Lin leaned back against the stone wall and closed his eyes for a moment.
He wasn't cursing Newton, because Newton's laws weren't wrong.
Within the classical realm, those three laws remained as solid as the rock layers on the Wasteland.
The real problem was that this language was too low-level.
Using it to solve complex constraint systems was like writing an operating system in machine code—you could write it, but you'd work yourself to death.
Jiang Lin opened his eyes and sat up straight again.
He turned on the computer and clicked open the Theoretical Mechanics folder.
He had browsed through this folder earlier, but had only glanced roughly at the directory.
In many Physics department training systems, Theoretical Mechanics was the first threshold of specialized courses, beginning to re-express the entire classical world in another language.
It wasn't as approachable as General Physics, nor was it just a tool like advanced mathematics.
Ahead in Theoretical Mechanics were kinematics, dynamics, and rigid body motion.
He dragged downward and stopped at the second half of the book.
[Analytical Mechanics]
At the beginning of Chapter 1, there were no little blocks, no inclined planes, and no force arrows covering the entire screen.
There was only a quiet statement.
In Newtonian mechanics, we usually describe motion with force as the core.
But for multi-body systems containing complex constraints, explicitly solving for all constraint forces is often both difficult and unnecessary.
Analytical Mechanics provides a higher-level description: selecting appropriate generalized coordinates and deriving the equations of motion starting from the kinetic energy, potential energy, and virtual work of the system.
Jiang Lin's gaze lingered on the three words "unnecessary".
I just spent half the day chasing down those rope tensions, fulcrum reaction forces, and friction, and you're telling me it's unnecessary?
He continued reading downward.
Many constraint forces, under ideal constraints, do no work on allowed virtual displacements.
Since they do no virtual work, they don't need to appear explicitly in the equations.
That is to say, you don't have to calculate every single support force, tension, and constraint reaction force.
As long as you choose the correct generalized coordinates describing the system's degrees of freedom, write out the kinetic energy T and potential energy V, and express non-conservative external forces as generalized forces, the equations will be generated automatically.
This doesn't mean the force has disappeared.
The force is still there; the wind will still push the rain tarp, the rope will still pull the steel bar, the fulcrum will still wear down, and the bucket will still slosh.
But Analytical Mechanics told him that he didn't have to chase after every single constraint force in the most foolish way possible.
You can ask a higher-level question first.
What are the true degrees of freedom of this system?
Jiang Lin copied down this sentence, feeling as though he were gripping a knife.
He stared at his sketch of the wind-powered water-pumping device and began to look at it anew.
This system was indeed very messy, with friction, turbulence, and impacts.
One could not fantasize about an equation giving the final answer in five minutes.
But what if an ideal model were established first?
Assuming the nylon rope was always taut, assuming the steel bars were sufficiently rigid, assuming the fulcrum temporarily did not slip, assuming the bucket did not crash against the rock wall...
The main motion of the entire system could at least be described first by the inclination angle θ of the windward rod.
Once θ was determined, the rope length, lever, and bucket height would all be determined.
Then, he wrote down the kinetic energy and potential energy.
Wind and friction were not conservative forces, so he used the form of the Joseph-Louis Lagrange equation with generalized non-conservative forces.
d / dt ( ∂ L / ∂ q ̇ ) - ∂ L / ∂ q = Q
Jiang Lin stared at the Q on the right.
It reminded him that Joseph-Louis Lagrange was not magic; the messy things did not vanish out of thin air, but were simply better organized.
The derivation was not pretty, but it was much smoother.
Those headache-inducing fulcrum reaction forces and rope-end constraint forces had all vanished.
Pushing to the end, he obtained a rough one-degree-of-freedom equation of motion.
This equation did not give him the final answer, but it clearly told him where to make modifications.
Insufficient lift might be due to an incorrect lever arm ratio, startup difficulty might be due to excessive moment of inertia, and erratic motion was insufficient damping.
Looking at that equation, Jiang Lin's scalp still tingled somewhat.
However, although the Joseph-Louis Lagrange equation had not built the water-pumping machine for him, it had found the skeleton of the water-pumping machine for him.
At this moment, Jiang Lin felt a shock bordering on offense in theoretical mechanics for the first time.
Not because it was so magical as to be omnipotent.
But because clearly acknowledging the complexity of reality, it was still able to extract degrees of freedom from that complexity.
Newton mechanics was like writing machine code.
You had to personally manage every register, every jump, and every instruction.
You had to calculate the tension of every rope, the friction of every stone, and the reaction of every fulcrum.
Joseph-Louis Lagrange mechanics was more like a high-level language.
You wrote the degrees of freedom of the system, wrote the kinetic energy, wrote the potential energy, wrote the non-conservative generalized forces, and then let the equation generate the underlying motion for you.
This compiler was the Joseph-Louis Lagrange equation.
But Jiang Lin did not forget to add a sentence.
["The compiler is not a god."]
["Garbage model input will only yield garbage results."]
For the next half month, Jiang Lin studied analytical mechanics while making the wind-powered water-pumping device.
During the day, he smashed steel bars, moved stones, carved limit slots in the ruins, and compacted the base with red clay and crushed stones.
At night, under the camp lamp, he gnawed on those colder and loftier terms in 《Theoretical Mechanics》.
Generalized coordinates, generalized velocities, generalized forces, virtual displacements...
Theoretical mechanics was no longer aloft and high, but was firmly tied together with an ugly water-pumping machine.
The first version of the device failed with no surprise at all.
The wind filled the rainproof cloth, the windward rod suddenly tilted backward, the nylon rope instantly tightened, and the lever lifted the bucket.
The bucket did indeed rise.
But not even halfway up, as the wind weakened, the rope suddenly slackened.
When the next gust of wind came again, the rope tightened violently, and the entire system emitted a teeth-aching impact sound.
The bucket smashed against the edge of the rock wall; not to mention that half a bucket of water spilled out completely, the bucket was also beaten into a dent.
Jiang Lin stood nearby with a very ugly expression on his face.
But he still did not forget to record.
["First version failed."]
["Problem: Rope slackness led to impact, fallback speed was too high, and damping was insufficient."]
For the second version, he added a counterweight.
The counterweight made the bucket's fallback not so fierce, and the system had a more stable reciprocating trend.
But a new problem came.
Startup difficulty.
When the wind was small, the equivalent inertia formed by the counterweight and the bucket was too large, the rainproof cloth was blown rustlingly, but the device just shook like a stubborn donkey.
Recorded again.
["Second version half failed."]
["Problem: Starting wind speed increased, ineffective under low wind conditions."]
For the third version, he adjusted the position of the lever fulcrum.
Making the lever arm ratio a bit smaller, sacrificing part of the lift in exchange for easier startup.
This time, the bucket could be pulled up.
But the lift was insufficient.
The bucket stopped not long after leaving the water surface and could not come up.
Recorded again.
["Third version: Startup improved, insufficient lift."]
For the fourth version, he changed the bucket volume.
Instead of using a large bucket to fill it up all at once, he switched to using a small bucket to lift it multiple times.
This reduced the energy required for a single lift.
Efficiency was not high.
But the system was finally able to work for a period of time.
The problem was that the reciprocation was too fast, the bucket shook violently when coming out of the water, and water splashing was severe.
He used old cloth strips and a section of worn rope to make a crude damper, allowing the lever to have some frictional energy consumption when falling back.
Fifth version.
Jiang Lin added an eccentric suspension point to the bucket.
When the bucket was full of water, the center of gravity was lower, allowing it to maintain an upright position.
After rising to the top and hitting the limit block, the bucket mouth was forced to flip, and the water poured into the receiving trough.
Once the water was emptied, the counterweight pulled the empty bucket back to the bottom of the rock crevice.
The limit block was responsible for making it pour water, the old cloth strips were responsible for keeping it from slamming too hard, and the counterweight was responsible for making it go down again.
Adding these three things together barely made it transform from being able to move to being able to cycle.
An extremely windy afternoon.
Jiang Lin stood beside the rock crevice on the north side of the camp, tying tight the final section of nylon parachute cord.
The three-meter-high windward rod was bound by two steel bars, with old rainproof cloth stretched across it.
At the other end, a thick steel bar was framed between two boulders, like a brutalist-style seesaw.
The bucket hung at the other end, its body unevenly battered by stones.
Jiang Lin loosened the loop securing the rainproof cloth.
"Hoo——"
The wind filled the rainproof cloth, the windward rod tilted backward, the nylon rope tightened, and the lever lifted.
The bucket rose bit by bit from the depths of the rock crevice.
The fulcrum emitted a low friction sound.
The old cloth damper shook gently, suppressing that dangerous frenzy.
The bucket rose to the top, hit the limit block, and tilted.
"Splash——"
The turbid and cold groundwater poured into the adjacent water storage pit, and water splashes splattered onto Jiang Lin's ankles.
He stood in the wind, lowering his head to look at that turbid water, unwilling to leave for a long time.
It was dilapidated and worrisome, falling far short of true automation.
But it saved him from the labor that most tortured his body.
More importantly, it allowed the theoretical mechanics Joseph-Louis Lagrange equation to take root in the Wasteland for the first time.
Jiang Lin picked up his portable electronic recording board.
["Eleventh year, dry season."]
["Simple wind-powered water-pumping system version 5, intermittent operation."]
["Capable of completing water pumping under moderate or higher stable wind."]
["Low wind fails to start, turbulent wind is prone to impact, and it must be locked down at night."]
["The Joseph-Louis Lagrange equation did not build a machine for me."]
["It found the degrees of freedom for me."]
["No need to chase the tension of every rope; first grasp the direction in which the system truly moves."]
This sentence was copied by him into the paper time capsule at night.
Paper was precious, but this sentence was worth it.
Over the next few days, Jiang Lin continued to study.
He turned to Hamilton's principle.
The textbook wrote: "The true path makes the action take a stationary value."
Action S = ∫ Ldt
δ S = 0
When Jiang Lin first saw the common term 'Principle of Least Action', he was almost captivated by it.
"Minimum, frugal, not wasting."
These few words could naturally touch the nerves of a Wasteland survivor.
But the textbook quickly reminded him that, more accurately, it was not always a minimum, but a stationary value.
The first-order variation being zero might be a minimum, might be a maximum, or might be a saddle point.
Nature was not simply saving money.
What it chose was that path where the action did not undergo first-order changes near the allowable paths.
Even though the statement 'most frugal' was not rigorous, he still saw something in it similar to himself.
Over these years, in the Wasteland, he had learned not to run around aimlessly, not to burn fuel randomly, not to turn on computers indiscriminately, not to engage in meaningless emotional ventings, and to use every liter of water, every gram of Soybean, every watt-hour of electricity, and every sheet of paper where it mattered most.
He could understand that perspective where the entire path had to be accounted for.
That night, the Stone House was very quiet.
The small window on the south wall was sealed with a shutter.
The ropes of the wind-powered water-pumping device were packed away by him, and the rainproof cloth was also rolled up and pressed under stones.
Jiang Lin sat before the stone table, opened the ["Theoretical Mechanics _ Analytical Mechanics"] document, and wrote down a stage summary.
["Newton: Chase every force."]
["Joseph-Louis Lagrange: Find the true degrees of freedom, write the structure with energy."]
["Non-conservative system: Add generalized force Q, do not disguise the messy things of reality as an ideal model."]
["Hamilton's principle: Action takes a stationary value, not simply a minimum."]
["Core change: From micromanaging every constraint force to grasping the degrees of freedom and path structure of the system."]
After finishing writing, he thought about it and added another sentence.
["Newton is the underlying instruction."]
["Joseph-Louis Lagrange is the compiler."]
["But the compiler is only responsible for correct modeling."]
Looking at the last sentence, he gently breathed out a sigh.
Theoretical mechanics did not turn him into a genius, nor did it make the Wasteland gentle.
It did not even make that wind-powered water-pumping machine much more reliable.
However, it made Jiang Lin truly feel for the first time that what was advanced about Physics was not making the formulas more complex.
But rather, after changing to another language, the world suddenly grew a little quieter.
Tomorrow, however, he would still need to check the knots of the water-pumping device, test the water quality, and replenish water for the farmland.
And he still had to continue studying the next chapter of theoretical mechanics.
The Wasteland would not give him one less problem just because he caught a glimpse of the door to analytical mechanics.
But at least starting today, he was no longer just someone lying on the ground chasing every single grain of sand.
Occasionally, He can stand a little higher., See the terrain behind the sandstorm.
🔊 Text To Speech
Listen while reading
Warning: session_start(): Session cannot be started after headers have already been sent (sent from /home/u377687657/domains/novelfull.in/public_html/header.php on line 80) in /home/u377687657/domains/novelfull.in/public_html/footer.php on line 3