1 Introduction
“All models are wrong, but some are useful”
- George E. P. Box [1]
What mechanics is
Mechanics studies how bodies behave when forces act on them: whether they stay where they are, how they move if they do not, and how much they deform on the way. It is the branch of physics a mechanical engineer reaches for most often, and almost none of it is about the real object.
It is about a model of the real object, built by deliberately discarding whatever does not matter for the question being asked. A bolted bracket becomes a rigid body with three reaction components. A wheel becomes a point mass. Choices of this kind are called idealisations, and making them well is the part of the work that cannot be delegated to a machine. Box wrote the epigraph above about statistical models, and it holds for every model in this book: each is wrong in some respect, and the question is never whether a model is true but whether it is good enough for the decision resting on it.
The subject divides according to what the model is permitted to do. Statics treats bodies at rest, where forces and moments balance, and it is where free body diagrams and reaction forces are established. Dynamics allows motion, and splits into kinematics, which describes motion without asking what caused it, and kinetics, which connects the motion to the forces producing it. Tracking the nozzle of a 3D printer along a toolpath is kinematics; working out the belt tensions that accelerate it is kinetics. All three treat bodies as rigid. Solid mechanics gives that up and lets the body deform, turning the question from what loads a part carries into whether it survives them. Fluids have their own discipline and do not appear here.
Every one of these exists to support a decision. We find the angle at which a robot arm sees its largest moment so that a motor can be chosen. We work out how much travel and damping a mountain bike suspension needs to survive a one metre drop. The mechanics is there to produce a number a design depends on, and that number has to be defensible.
Verification and validation
Mechanics is deductive, resting on a few principles and a great deal of mathematics. It is also empirical, because those principles came from observation and because every material constant in every calculation had to be measured by somebody. That double character raises two different questions about any result, and confusing them is a common and expensive mistake.
Verification asks whether the mathematics was done correctly: whether the equations were solved as intended, whether the numerical method converged, whether energy is conserved where it ought to be. Validation asks whether the model describes the physical object at all, and nothing but a test can answer it. Analysis on its own will confirm a badly chosen model with perfect internal consistency. Testing on its own is far too slow and too expensive to search a design space. Current practice simulates to explore and tests at chosen points to anchor, and this book follows the same pattern: chapters derive and compute, laboratories measure, and the two are expected to disagree often enough that the disagreements are part of the teaching.
Computation is part of the subject
For most of the history of mechanics the mathematics had to be simple enough to finish by hand, and the problems taught were chosen to fit. That constraint has gone, and losing it changes what should be taught, not merely how quickly the old material can be got through. A student who can only handle the problems that close in a neat formula is confined to a small and unrepresentative corner of engineering.
A problem is therefore set up symbolically first and evaluated only afterwards, so that the shape of the solution and the influence of each parameter are visible before any numbers are committed. Python and SymPy appear in the first part alongside vectors and never leave. They are taught properly elsewhere: the companion site python.ju.se covers scientific programming, NumPy, SymPy and Matplotlib in their own right, and is the course that prepares a student for this one. The habit is the one usually called “computational thinking”: framing a problem so that the machine carries the algebra and the arithmetic while the engineer keeps the modelling, the judgment and the interpretation.
The gain is not speed. It is that realistic problems become approachable at all, that a parameter can be swept to find out what governs a design, and that a result can be drawn and looked at. If in doubt, write some visualisation code.
Why this book keeps returning to 3D printing
Most of the design examples in this book are printed parts, and the laboratory work is done on specimens that came off a desktop machine. Fused filament fabrication still carries a reputation as a way of making prototypes and toys, not components.
The reputation is a misunderstanding with a specific cause. Every other manufacturing process a mechanical engineer learns about protects itself with capital: machining needs a mill and someone who can run it, injection moulding needs a tool costing more than a car before the first part exists, and stamping, forging and extrusion each need equipment that only a company can justify. Nobody makes a structural part by those routes casually. A designer who reaches for one has already been forced to think about the process, because somebody had to pay for it.
Printing removes that barrier completely. A machine costs a few hundred euro, the material arrives by post, and a part exists an hour after the model is finished. Manufacturing becomes available to a student, to a small company, or to anyone with an idea and a weekend, without the capital that used to decide who was allowed to make things at all. We regard that as one of the more important changes in engineering practice of the last two decades, and this book takes the process seriously for that reason.
The same arithmetic decides what can be taught. A cohort of 120 students cannot be put through a machine shop in any useful way, because there are neither enough machines nor enough supervised hours, so manufacturing becomes something students watch instead of something they do. Our 54 printers remove that limit. Every student can make a part, load it until it breaks, work out why it broke where it did, change the design and print it again inside a week, and a failed attempt costs a few grams of filament. Manufacturing stops being a demonstration and becomes a loop each student closes personally, several times over, and that is where judgment about making things comes from.
The ease hides something. You press a button and a part appears, and nothing in that experience tells you that its strength depends on how it was printed as much as on what it was printed from. Orientation, layer height, shell count, temperature and cooling change the result by factors, not by percentages, and a part that is strong along the direction the material was laid down can be weak across the layers that joined to form it. In a machined part the material is given. In a printed part the material is created at the same moment as the geometry, and the two cannot be considered separately.
That is an engineering problem and it is largely unsolved. Constitutive models good enough to let simulation carry the weight of a design decision do not yet exist for printed polymers, so the finite element analysis that would routinely size a cast or machined component cannot be trusted here in the same way. Design proceeds instead by intuition, and the usual remedy for uncertainty is more material, which forfeits much of what the process was good for.
The people printing the most parts are not the people writing the rules. The maker community has developed formidable practical skill with almost no reviewed design guidance to draw on, so what works circulates as folklore and parts come out heavier, or weaker, than they need to be. Industry meanwhile uses the process in earnest for jigs, fixtures and low-volume components, and print-on-demand services now sell it as a manufacturing route and not as a prototyping convenience. Some of those services publish design guidance themselves, and their incentive runs the right way: a print farm that teaches its customers to design well receives orders that succeed. Commercial and public interest coincide for once. That is useful, and still no substitute for measurements anyone can check.
Then there is the student. Someone beginning a mechanical engineering degree today has most likely met a 3D printer before a lathe, and may well have printed something before ever reading a drawing. The first manufacturing process an engineer encounters shapes how they think about making things for a long time afterwards, and for this generation it is this one. They arrive already able to make parts. What they do not yet have is the ability to make parts that are strong, or to say in advance how strong a part will be, and most of them will want to use the process for finished components and not only for prototypes.
Supplying that ability is the ambition here. Printed parts appear throughout as the manufacturing route the reader is most likely to use, and they are treated the way any manufacturing route should be: as something whose behaviour can be measured, modelled and predicted.
How the book is arranged
The parts follow the order in which the questions arise, and each exists because the one before it leaves something unanswered.
The Preliminaries come first because every later chapter computes something. Vectors, Python and symbolic algebra appear there as working tools and not as background, so that a free body diagram can be written down and solved in the same notebook a few pages later.
Force Vectors and Equilibrium are classical statics. They answer which forces act and what they must balance, and they produce the reaction forces that everything downstream takes as input. Kinematics and Kinetics extend the same equations to bodies that move, and Newton’s and Euler’s equations arrive there in the general form that has statics as a special case, not a separate subject.
At that point all the forces are known and nothing has been said about whether the part survives them. Solid Mechanics answers that. It replaces the rigid body with a deformable one, introduces stress and strain, and works from a single cut through a loaded bar up to the continuum model and the finite element method. It is also where material behaviour has to be measured instead of assumed, and where a printed part stops resembling the textbook picture.
Two further parts are being written and will come between solid mechanics and the design chapters. Continuum Mechanics takes what solid mechanics does for particular geometries and states it at every point of any body, using the stress and strain tensors and the equilibrium of an infinitesimal element. Finite Element Analysis is what that description becomes once it is discretised and handed to a computer, and the tool that sizes almost every real structural component today. The direct stiffness method for trusses, which already appears in the solid mechanics part, is its first step, shown in full there so that the finite element method arrives later as a generalisation and not as a black box.
Machine Elements is where that analysis gets spent. Real machines are assembled from components with standards, failure modes and selection procedures of their own: gears, belts, bearings, bolts, springs and shafts. Each carries its own theory, but the calculations underneath are the ones the earlier parts established, and the difference is that a student now has to choose dimensions instead of checking given ones.
Mechatronics is the part a mechanics book is not obliged to have. A drivetrain cannot be sized without knowing what the motor does, and what the motor does depends on how it is driven. Torque, speed and current are one problem, not three, and keeping the mechanics apart from the electronics leaves a student able to calculate a gear ratio but unable to say what the motor will deliver at it. These chapters cover what is needed to make a machine move under control: Ohm’s law and circuits, transistors and H-bridges, pulse width modulation, and the microcontroller that runs them.
Four of the courses this book serves converge on one object, a remote-controlled car that students design, print, wire and drive. Its mechanics is analysed in the first course, its chassis and suspension dimensioned in solid mechanics, its drivetrain and running gear in machine elements, and its electronics and firmware in mechatronics. One artefact examined from four directions teaches more than four unrelated examples, and the same car therefore turns up in chapters that otherwise have little to do with each other.
Keeping all of this in one place is deliberate, although it means a student arriving from a single course meets a table of contents largely about other things. The parts depend on one another: a gear is sized with stresses from solid mechanics, which rest on equilibrium from statics, and a drivetrain is useless without the motor characteristics from mechatronics. Split across four sites, those dependencies become dead links or duplicated text that drifts apart, notation stops agreeing between courses, and a search finds only whichever fragment you happen to be standing in. A student also meets these courses across two or three years, and one reference they keep returning to serves them better than four they each abandon at the end of a term. The sidebar collapses by part, and every part opens with its own introduction, so a single course can be read without the rest getting in the way.
What the book is trying to be
Plenty of books teach machine elements, and plenty of channels teach 3D printing. Very little teaches machine elements for parts that will be printed, with numbers a student can cite in a report and an examiner can check. Closing that gap is the ambition, and it imposes one rule on us: where we state a design rule for printing, it should rest on a source we have verified or on a measurement we have made, and where it rests on neither we should say so plainly.
The rule is demanding and we do not always meet it yet. This book is written alongside the courses it serves and it changes every term. The solid mechanics part is the most developed, because a course examines directly against it. The machine elements part covers gears, belts, printed bearings and bolted joints, while springs, shaft connections, permanent joints and brakes are still lectured without a chapter behind them. The mechatronics part has two chapters against sixteen laboratory exercises.
Those gaps are visible on purpose. The laboratory work that fills them is the same work that produces the measurements, so the teaching and the research advance together, and a cohort of students following one protocol generates sample sizes that no single laboratory gets on its own.
The book is written along of the teaching; as the courses get developed the book grows along with them. The book is the record of a mechanical engineering curriculum being rebuilt, and it will be finished at roughly the moment the rebuilding is.
The foundation was not ours. Computer supported mechanics and computational science and engineering were established by colleagues and teachers who have since retired, and the conviction that a student should model and compute instead of rehearsing hand calculations is theirs before it is ours. Our debt to them is set out in the acknowledgements. What we have been adding is the other half of the loop, because knowing how to model something means considerably more once you have built the thing you are modelling. Students here now build self-balancing robots, six axis robots of our own design, and remote-controlled cars they take from a sketch to a driving vehicle.
This stops being a collection of projects at the point where the loop closes. A student prints tensile specimens, pulls them on a testing machine built in the department, evaluates the records with the methods in these chapters, and feeds the resulting material data into a crash simulation of a chassis they designed, will print, and will then drive into something. Every step of that chain is in this book, and every constant along it was measured, not looked up. That chain is the CDIO cycle with the analysis put back into it. This school is a member of the CDIO Initiative, which organises engineering education around conceiving, designing, implementing and operating real systems, and the stage most easily lost is the first. A project can be built, and can even be made to work, while the engineering underneath it stays guesswork. These chapters exist so that conceiving and designing carry real weight: so that a student can say why a chassis has the wall thickness it does before printing it, and can find out afterwards whether they were right. Assembling something that way, from first principles at each step, is slow: a chapter written from our own measurements takes a term where one assembled from received practice takes an afternoon. We would rather add a part each year and be able to stand behind it than finish quickly and be unable to say where anything came from.