Latest / Civil Engineering Made Simple / An Introduction to Excel for Civil Engineers
Transcript
- 0:00Speaker 1: You know, you probably use Microsoft Excel to balance budgets, right,
- 0:04Speaker 1: or maybe track expenses or compile material takeoff lists.
- 0:09Speaker 2: Yeah, I mean that's what everyone does. It's universally seen
- 0:11Speaker 2: as this administrative.
- 0:12Speaker 1: Thing, right. There is this pervasive expectation that it is
- 0:15Speaker 1: merely a digital ledger, like a tool just for accountants
- 0:19Speaker 1: and project managers. But consider this. You can use that
- 0:23Speaker 1: exact same software to run full finite element analysis on
- 0:28Speaker 1: a structural steel.
- 0:28Speaker 2: Trust, which is wild to think about. It really is.
- 0:31Speaker 1: You can use it to predict a soil consolidation under
- 0:34Speaker 1: a heavy foundation over span of like fifty years or
- 0:38Speaker 1: and I think this is the capability that completely changes
- 0:41Speaker 1: the game. You can write custom code right within the
- 0:44Speaker 1: spreadsheet that automatically generates complex three D models in AutoCAD.
- 0:48Speaker 2: You're just so accustomed to viewing Excel through this purely
- 0:51Speaker 2: administrative lens, you know, we completely overlook its raw computational engine.
- 0:56Speaker 2: When you strip away all those financial templates and just
- 0:59Speaker 2: look at it through the lens of applied mathematics, the
- 1:02Speaker 2: spreadsheet completely transforms. I mean, it becomes this incredibly robust
- 1:07Speaker 2: blank canvas for structural and geotechnical engineering.
- 1:11Speaker 1: And that is exactly what we are getting into today.
- 1:14Speaker 1: In this deep dive, we are exploring gun Thar Pangurubuin's
- 1:17Speaker 1: book and introduction to EXCEL for Civil Engineers.
- 1:21Speaker 2: It's such a fascinating read, it.
- 1:22Speaker 1: Really is, and the mission here is highly specific, right.
- 1:25Speaker 1: We want to bridge the gap between pure engineering theory
- 1:29Speaker 1: and practical execution using a piece of software you almost
- 1:32Speaker 1: certainly already have installed on your computer.
- 1:34Speaker 2: Exactly, no need to go out and buy anything new. Right.
- 1:36Speaker 1: So, whether you are an engineering student trying to visualize
- 1:40Speaker 1: abstract matrix formulas, or a young professional building an automated
- 1:44Speaker 1: daily workflow, or even just a self taught learner who
- 1:47Speaker 1: is fascinated by structural analysis, this deep dive will show
- 1:50Speaker 1: you how to turn a basic grid of cells into
- 1:53Speaker 1: custom engineering software.
- 1:55Speaker 2: And like you said, no expensive proprietary license is required.
- 1:59Speaker 1: Which is huge, oh massive, because I mean, the commercial
- 2:02Speaker 1: software industry provides incredibly powerful engineering programs, right, but.
- 2:07Speaker 2: The limitation is that they often function as these black
- 2:09Speaker 2: box h Exactly, you input your parameters and it spits
- 2:12Speaker 2: out this beautifully color coded stress map, but the actual
- 2:16Speaker 2: internal mechanics they're completely hidden behind a paywall. And you
- 2:21Speaker 2: know proprietary code.
- 2:22Speaker 1: You just have to trust the colors, right, And.
- 2:24Speaker 2: Peng Airboun's work is really focused on demystifying that computational process.
- 2:30Speaker 2: By building the numerical tools yourself from the ground up,
- 2:34Speaker 2: you're basically forced to understand the underlying physical theory on
- 2:37Speaker 2: a fundamental level.
- 2:38Speaker 1: Because you aren't just trusting an output anymore.
- 2:40Speaker 2: Exactly, you are engineering the calculation itself.
- 2:43Speaker 1: Okay, so before we can start simulating complex structures, we
- 2:46Speaker 1: need to pour the foundation, so to speak. We have
- 2:50Speaker 1: to understand the environment we're working in.
- 2:52Speaker 2: The spreadsheet itself.
- 2:53Speaker 1: Yeah, how Excel natively handles data and mathematics before we
- 2:57Speaker 1: start throwing custom programming at it first. I mean, there
- 3:00Speaker 1: is just the sheer scale of it. It's massive, right,
- 3:03Speaker 1: A modern worksheet is not just a standard page. It
- 3:06Speaker 1: is this massive coordinate grid containing what up to one million,
- 3:10Speaker 1: forty eight, five hundred and seventy six rows.
- 3:12Speaker 2: And sixteen thousand, three hundred and eighty four columns.
- 3:15Speaker 1: Yeah, which is just absurd.
- 3:16Speaker 2: It is that raw capacity translates to over seventeen billion
- 3:21Speaker 2: individual cells per sheet. Wow, I know. It means we
- 3:25Speaker 2: can theoretically manipulate millions of individual data points simultaneously, and
- 3:29Speaker 2: to manage that scale, Excel categorizes inputs into essential data types. Right,
- 3:34Speaker 2: so you have text, numbers, dates, hours, formulas, and functions.
- 3:38Speaker 1: Okay, so for civil engineers, it's the native functions that
- 3:41Speaker 1: handle the really heavy computational lifting at.
- 3:43Speaker 2: First, right, absolutely, Obviously you have the standard mass in
- 3:45Speaker 2: trigonometry functions, but text manipulation is actually heavily utilized.
- 3:49Speaker 1: Too, which I gotta say might seem a little counterintuitive
- 3:51Speaker 1: for a numbers based profession.
- 3:53Speaker 2: Scene weird at first, Yeah.
- 3:54Speaker 1: But I imagine that comes into play when we need
- 3:56Speaker 1: to export this data to other draftings off or later on.
- 4:00Speaker 1: Like if I have an X coordinate in column A,
- 4:02Speaker 1: a Y coordinate and column B and a Z and
- 4:04Speaker 1: column C, AutoCAD can't just read three isolated cells, right, No.
- 4:09Speaker 2: It can't. It requires a very specific syntax to draw
- 4:12Speaker 2: a point in space.
- 4:13Speaker 1: So it needs it all together, right.
- 4:15Speaker 2: It requires a single, seamlessly formatted string of text. So
- 4:19Speaker 2: by using a native text function like canon cat in it,
- 4:21Speaker 2: or honestly just the ampersand symbol, you can merge those
- 4:25Speaker 2: isolated numeric values with commas. Oh, I say, yeah, so
- 4:28Speaker 2: your output reads precisely as x comma y comma z
- 4:33Speaker 2: in a single cell. That really simple text manipulation is
- 4:37Speaker 2: the absolute foundational step for automated drafting, which we will
- 4:40Speaker 2: definitely use extensively later on.
- 4:42Speaker 1: That makes total sense. And then there are.
- 4:44Speaker 2: The lookup functions, Yes, very important.
- 4:46Speaker 1: The book talks a lot about veal cup. I like
- 4:48Speaker 1: to think of a function like vell a cup as
- 4:50Speaker 1: a well, like a highly efficient digital switchboard operator.
- 4:54Speaker 2: I like that analogy, yeah.
- 4:55Speaker 1: Because you could manually trace a node on a trust,
- 4:58Speaker 1: calculate its displease position, and just type in the new coordinate.
- 5:01Speaker 1: But using a look up function allows you to tie
- 5:04Speaker 1: a dynamic load value to its corresponding geometric coordinate.
- 5:08Speaker 2: Right, So the second load parameter changes in your input table,
- 5:11Speaker 2: your switchboard operator instantly pulls the new coordinate data and
- 5:15Speaker 2: updates the entire model geometry.
- 5:17Speaker 1: It's instantaneous, exactly.
- 5:19Speaker 2: And in addition to those dynamic lookups, we also really
- 5:22Speaker 2: rely on data analysis functions for experimental results like lab data. Yeah, exactly.
- 5:28Speaker 2: When analyzing lab data, so maybe finding the theoretical parameters
- 5:33Speaker 2: that best fit, say, concrete cylinder compression tests. We use
- 5:37Speaker 2: Excel to run linear regression polynomial regression interpolation. Okay, this
- 5:42Speaker 2: basically allows us to map the nonlinear behavior of materials
- 5:45Speaker 2: under varying stress loads with just extremely high precision. We're
- 5:49Speaker 2: deriving equations directly from raw field data.
- 5:51Speaker 1: But you know, numbers in a grid can only communicate
- 5:54Speaker 1: so much, right, Engineering is inherently spatial. We have to
- 5:57Speaker 1: actually be able to see the defformation.
- 5:59Speaker 2: Visuals are everything.
- 6:00Speaker 1: Yeah, and the book emphasizes a highly specific method for
- 6:03Speaker 1: visualizing structures, natively in Excel, which is using the xy
- 6:07Speaker 1: scatter chart type, specifically with straight lines.
- 6:10Speaker 2: Yeah, that specific chart type is critical.
- 6:12Speaker 1: Why that one specifically?
- 6:14Speaker 2: Well, because each line segment stands completely independent of the others,
- 6:18Speaker 2: Unlike a standard line chart, which assumes equal intervals along
- 6:21Speaker 2: the x axis. The xy scatter plots absolute coordinates in
- 6:26Speaker 2: two D space.
- 6:26Speaker 1: Oh okay, I get it. So, if you have a
- 6:29Speaker 1: table of coordinates defining the nodes of a steel truss,
- 6:33Speaker 1: you use vlookup to pull the initial X and y values,
- 6:37Speaker 1: and you plot them as a blue.
- 6:38Speaker 2: Line exactly that is your structure before horizontal loading.
- 6:42Speaker 1: Right, and then right next to that table you calculate
- 6:45Speaker 1: the displaced coordinates after say a lateral windload is applied,
- 6:49Speaker 1: and you plot that secondary data series as a red line.
- 6:52Speaker 2: You got it, and you instantly generate a scaled visual
- 6:55Speaker 2: representation of the structural deformation right there, natively within the spreadsheet.
- 6:59Speaker 1: It's brilliant, which brings us to a feature that usually
- 7:01Speaker 1: signals a massive headache for most normal Excel users. Circular references.
- 7:06Speaker 2: Oh yeah, the dreaded warning. Right.
- 7:08Speaker 1: If you are balancing a budget and you get that
- 7:10Speaker 1: circular reference warning pop up, it usually means your formula
- 7:14Speaker 1: is referring back to its own cell, creating an infinite
- 7:16Speaker 1: loop that just crashes the calculation. Usually yes, but Pengarabuin's
- 7:20Speaker 1: book treats that infinite loop as a profound computational advantage.
- 7:25Speaker 2: It's actually a built in feature if you know how
- 7:27Speaker 2: to use it by navigating to Excel's settings. So you
- 7:31Speaker 2: go to file, then options, then formulas. You can actually
- 7:34Speaker 2: check a box labeled enable iterative calculation.
- 7:38Speaker 1: Wow, I never even noticed that box.
- 7:40Speaker 2: Most people don't. And then you can define the maximum
- 7:43Speaker 2: iterations let's say one thousand and a maximum change. We
- 7:48Speaker 2: are basically intentionally turning a static cell into a continuous
- 7:51Speaker 2: feedback loop.
- 7:52Speaker 1: Because many critical engineering equations simply cannot be solved directly, right,
- 7:56Speaker 1: They have to be solved iteratively exactly. So we provide
- 7:59Speaker 1: an guess, the spreadsheet runs the calculation, takes that output,
- 8:03Speaker 1: and then feeds it right back into the input cell.
- 8:05Speaker 2: Right, And it loops that process until the difference between
- 8:08Speaker 2: the new answer and the old answer is smaller than
- 8:10Speaker 2: that maximum change limit we set.
- 8:12Speaker 1: And that stabilization is called convergence.
- 8:14Speaker 2: Right, Yes, convergence. We use this mechanism to solve linear
- 8:18Speaker 2: simultaneous equations. It is also how we analyze slope stability
- 8:22Speaker 2: using the Bishop method of slices.
- 8:24Speaker 1: The Bishop method, right, So, in geotechnical engineering, when calculating
- 8:29Speaker 1: if a hillside will collapse, we divide the soil mass
- 8:32Speaker 1: into vertical slices.
- 8:33Speaker 2: Yeah, And the trick is that the safety factor of
- 8:35Speaker 2: that slope exists on both sides of the Bishop equation.
- 8:38Speaker 1: Which breaks standard algebra completely.
- 8:41Speaker 2: The resisting forces depend on the safety factor, but you
- 8:43Speaker 2: are actively trying to calculate the safety factor itself. Standard
- 8:47Speaker 2: algebra just fails.
- 8:49Speaker 1: So iterative calculation solves it by continuously updating the safety
- 8:52Speaker 1: factor until the assumed value matches the calculated value.
- 8:56Speaker 2: Exactly We even use this same principle to model fluid dynamics,
- 9:01Speaker 2: like calculating water seepage pressure below a concrete dam using
- 9:05Speaker 2: finite different scrids.
- 9:06Speaker 1: Okay, I get the theory, but honestly, let me push
- 9:09Speaker 1: back a little here, as the skeptical worker.
- 9:10Speaker 2: Sure, go for it.
- 9:11Speaker 1: Why wouldn't I just take my standard formula and drag
- 9:14Speaker 1: the cell down ten thousand rows? If I need ten
- 9:17Speaker 1: thousand iterations for convergence, Dragging a cell takes what two seconds?
- 9:22Speaker 1: It seems way simpler than diving into visual Basic for
- 9:24Speaker 1: applications or VBA to write a whole macro.
- 9:27Speaker 2: I hear that a lot, ye, and dragging a cell
- 9:30Speaker 2: down ten thousand rows does work for simple arithmetic, but
- 9:34Speaker 2: it introduces massive performance and architectural flaws when dealing with
- 9:38Speaker 2: complex engineering.
- 9:39Speaker 1: Models because of the file size.
- 9:40Speaker 2: File size, yes, but also rendering. When you copy in
- 9:44Speaker 2: a nested multivariable formula across ten thousand rows, Excel has
- 9:49Speaker 2: to actively monitor and render every single one of those
- 9:53Speaker 2: cells simultaneously on the front end.
- 9:55Speaker 1: Oh that makes sense.
- 9:56Speaker 2: Your file size bloats exponentially. The program lags with literally
- 9:59Speaker 2: every key stroke, and if you need to modify a
- 10:02Speaker 2: core parameter, you risk corrupting the entire sheet by missing
- 10:05Speaker 2: a single cell update in that giant list.
- 10:07Speaker 1: That sounds like a nightmare it is.
- 10:09Speaker 2: VBA changes the architecture entirely by utilizing the computer's memory cache.
- 10:13Speaker 1: It's ram okay. So VBA allows the spreadsheet to act
- 10:16Speaker 1: purely as a dashboard while the actual heavy lifting happens
- 10:19Speaker 1: invisibly in the background memory.
- 10:21Speaker 2: Precisely, it acts as a dedicated computational engine under the hood.
- 10:25Speaker 2: VBA has its own distinct data types like variant, which
- 10:28Speaker 2: could hold up to two billion characters, and it utilizes
- 10:31Speaker 2: control structures like four loops and if in branching.
- 10:34Speaker 1: So instead of taking up ten thousand rows on your screen.
- 10:37Speaker 2: VBA runs the iteration ten thousand times in the background
- 10:40Speaker 2: memory in a fraction of a second, and then only
- 10:43Speaker 2: prints the single final converged result back onto the spreadsheet dashboard.
- 10:48Speaker 1: The book illustrates this beautifully with the busenesque Newmark equation
- 10:51Speaker 1: from nineteen thirty five ah Yes, which is used for
- 10:54Speaker 1: calculating the vertical stress distribution deep underground when you place
- 10:59Speaker 1: a rectangular foundation on the surface right, and.
- 11:01Speaker 2: The mathematics for that stress distribution require integrating over the
- 11:05Speaker 2: area of the rectangle. Yeah, the variables are constantly changing
- 11:08Speaker 2: based on the specific depth, why and the horizontal distance
- 11:11Speaker 2: from the center of the footing.
- 11:12Speaker 1: So if you attempt this with standard spreadshoot formulas, you.
- 11:15Speaker 2: End up with an unreadable, chaotic mess of nested functions.
- 11:20Speaker 2: It's impossible for another engineer to audit your work.
- 11:23Speaker 1: But by writing a VBA macro a user defined function
- 11:27Speaker 1: or sub procedure, you create a really clean loop, like
- 11:31Speaker 1: for X equals this to that, for why equals this
- 11:33Speaker 1: to that exactly.
- 11:35Speaker 2: The code processes the complex numerical integration silently.
- 11:38Speaker 1: And it is essential for numerical methods where analytical solutions
- 11:42Speaker 1: just don't even exist. Like if we need to find
- 11:45Speaker 1: the exact area under a highly complex nonlinear curve, we
- 11:49Speaker 1: can write a VBA macro utilizing the trapezoidal method.
- 11:53Speaker 2: Right. The macro automatically divides the area into hundreds of
- 11:55Speaker 2: microscopic segments, calculates the area of each individual trapezoid, sums
- 12:00Speaker 2: them all up.
- 12:00Speaker 1: It's just so elegant.
- 12:02Speaker 2: VBA really bridges the gap between static data entry and
- 12:05Speaker 2: dynamic software development. It handled both numerical integration and numerical
- 12:09Speaker 2: differentiation with ease.
- 12:11Speaker 1: Okay, so a mathematically perfect steel trust is entirely useless
- 12:14Speaker 1: if the dirt beneath it fails.
- 12:16Speaker 2: Right.
- 12:17Speaker 1: But before we get down into the soil, we need
- 12:19Speaker 1: to apply this computational engine to the structure itself. We
- 12:22Speaker 1: need to use VBA to execute the matrix method for
- 12:25Speaker 1: two D frames and trustes.
- 12:27Speaker 2: The matrix method is pretty much the bedrock of modern
- 12:30Speaker 2: structural analysis. It is how we determine the specific force
- 12:34Speaker 2: displacement relationship of a structure under load. We define matrices
- 12:38Speaker 2: representing the geometry and the material properties, and then we
- 12:42Speaker 2: perform matrix operations like inversion and multiplication entirely within Excel
- 12:47Speaker 2: to build our simulated system.
- 12:48Speaker 1: Now, the fundamental finite element equation the book relies on
- 12:52Speaker 1: looks like absolute alphabet SOUP at first glance.
- 12:55Speaker 2: It really does.
- 12:55Speaker 1: It is P equals A times S times A transposed
- 12:59Speaker 1: times x x. Let's unpack the physics hiding inside that equation.
- 13:04Speaker 1: So P represents the external nodal loads acting on the structure,
- 13:09Speaker 1: right like wind or gravity, and A is the statics
- 13:12Speaker 1: matrix relating internal forces to external loads based on the geometry.
- 13:16Speaker 2: Yes, and S is the stiffness matrix of the unassembled elements.
- 13:20Speaker 1: But then there's that a transposed part right.
- 13:22Speaker 2: The A with the T above it. That T denotes
- 13:25Speaker 2: a matrix transpose. When you transpose a matrix, you are
- 13:27Speaker 2: essentially flipping as rows and columns.
- 13:29Speaker 1: Okay, so what does that actually do in the real world.
- 13:32Speaker 2: Well, in this context, transposing the statics matrix maps the
- 13:35Speaker 2: local stiffness of individual structural members into the global coordinate
- 13:38Speaker 2: grid of the entire trusts. It aligns everything to a
- 13:41Speaker 2: universal xy axis.
- 13:43Speaker 1: Oh wow. Okay, And finally X represents the unknown displacements
- 13:47Speaker 1: of the structural nodes, basically how far the steel will
- 13:50Speaker 1: actually bend or stretch right.
- 13:52Speaker 2: And since X is the unknown displacement we are trying
- 13:55Speaker 2: to find, Excel has to algebraically isolate it, right.
- 13:58Speaker 1: So if we multiply them as and a transpost together,
- 14:02Speaker 1: we get the global stiffness matrix. And to get X
- 14:05Speaker 1: by itself, we use Excel's native mind verse function to
- 14:09Speaker 1: invert that global stiffness matrix and then use MULET to
- 14:13Speaker 1: multiply it by p are external loads.
- 14:15Speaker 2: And once VBA calculates X, those displacement values are substituted
- 14:19Speaker 2: back into a secondary equation to find the internal forces
- 14:23Speaker 2: acting on each individual steel.
- 14:24Speaker 1: Member, so it tells you exactly which beam is intention
- 14:28Speaker 1: which is in compression, and by how much.
- 14:30Speaker 2: Exactly To make this concrete, the book actually walks through
- 14:33Speaker 2: a specific example of a two D trust. It uses
- 14:36Speaker 2: a linear elastic material with a modulus of elasticity or
- 14:39Speaker 2: E of two million, one hundred thousand kilograms per square centimeter.
- 14:43Speaker 1: And a cross sectional area of sixty eight point four
- 14:45Speaker 1: score centimeters right.
- 14:46Speaker 2: Which are standard parameters for structural steel. And the custom
- 14:49Speaker 2: VBA program is architected into specific modules to handle this cleanly.
- 14:53Speaker 1: So it's broken up.
- 14:54Speaker 2: Yeah. Module one handles reading your input data, so the
- 14:57Speaker 2: coordinates and those material properties I'm printing the final output.
- 15:01Speaker 2: Module two operates invisibly. It generates the masses stiffness matrices,
- 15:07Speaker 2: applies the loads, and computes the displacements. And then Module
- 15:10Speaker 2: three produces the charts.
- 15:12Speaker 1: And the author strongly advises implementing a literal run button
- 15:15Speaker 1: on the dashboard for a really specific workflow reason.
- 15:19Speaker 2: Yes, this is crucial.
- 15:21Speaker 1: You have to verify your geometry visually on an xy
- 15:23Speaker 1: scattered chart before you execute the analysis, because if you
- 15:27Speaker 1: misnumber a joint connecting two steel beams in your input table.
- 15:31Speaker 1: It won't just draw a weird line, No.
- 15:33Speaker 2: It will trigger a cascade of invisible mathematical errors throughout
- 15:37Speaker 2: the entire inverted matrix. The visual check is mandatory. It
- 15:41Speaker 2: prevents you from analyzing a structure that is mathematically sound
- 15:44Speaker 2: but physically impossible.
- 15:45Speaker 1: Right, a beam passing through another beam or something. But
- 15:48Speaker 1: as we noted earlier, structures do not float in a
- 15:51Speaker 1: white void on a computer monitor. They interact dynamically with
- 15:54Speaker 1: the earth, and we can't model soil the way we
- 15:57Speaker 1: model manufactured uniform structure steel. Right, soil is natural. It's
- 16:02Speaker 1: unpredictable and highly variable, very.
- 16:05Speaker 2: Much so to handle the complexity of the ground, we
- 16:08Speaker 2: program Excel to utilize beam on elastic foundation or bof theory. Okay,
- 16:13Speaker 2: Geotechnical engineering often models this using a Winkler soil model.
- 16:17Speaker 2: So instead of treating the soil mass as a single
- 16:20Speaker 2: continuous solid block, we mathematically approach it as a dense
- 16:24Speaker 2: collection of independent linear elastic springs.
- 16:27Speaker 1: So each spring represents a highly localized reaction force from
- 16:31Speaker 1: the Earth.
- 16:31Speaker 2: Right.
- 16:31Speaker 1: If I'm understanding this right, we're basically treating the dirt
- 16:34Speaker 1: under a foundation like a giant mattress made of thousands
- 16:37Speaker 1: of independent metal springs.
- 16:38Speaker 2: That's exactly it, And the same logic applies to laterally
- 16:42Speaker 2: loaded structures like a retaining wall holding back a hillside
- 16:45Speaker 2: or a deep pile foundation.
- 16:47Speaker 1: Okay, so for a retaining wall, the program must calculate
- 16:50Speaker 1: the lateral earth pressure actively trying to push the wall
- 16:54Speaker 1: over from the ground surface down to the dredge line.
- 16:57Speaker 2: Right, And we use classical soil mechanics for that, specifically
- 17:00Speaker 2: cool loam or rank in earth pressure theories. Both theories
- 17:04Speaker 2: calculate the wedge of soil behind the wall that is
- 17:06Speaker 2: actively trying to slide down the failure plane. They provide
- 17:10Speaker 2: a coefficient that we multiply against the unit weight of
- 17:13Speaker 2: the soil to find the exact lateral force.
- 17:16Speaker 1: And then below the dredge line, where the wall is
- 17:18Speaker 1: actually buried in the earth, the soil acts as those
- 17:21Speaker 1: independent springs to resist that pushing force. Yes, but the
- 17:25Speaker 1: physical reality of dirt makes the iterative looping in VBA
- 17:28Speaker 1: absolutely mandatory here, doesn't it. Because a metal spring in
- 17:31Speaker 1: this geotechnical model only provides resistance in compression. It pushes back,
- 17:36Speaker 1: it doesn't pull.
- 17:37Speaker 2: That is the key limitation of soil. Yet, if a
- 17:39Speaker 2: pile foundation bends to the right due to a lateral load,
- 17:42Speaker 2: the soil springs on the right side compress and push back.
- 17:45Speaker 1: Offering resistance, but the soil on the left side.
- 17:47Speaker 2: It simply falls away. Dirt cannot grab the pile and
- 17:50Speaker 2: pull it back right.
- 17:51Speaker 1: Therefore, the VBA program must execute a wild loop down
- 17:55Speaker 1: the entire length of the buried pile. At every single node,
- 17:59Speaker 1: it checks the calcul related deflection. It asks is the
- 18:03Speaker 1: specific spring currently in compression or has the pile pulled
- 18:07Speaker 1: away from it?
- 18:08Speaker 2: And if it has pulled away, the program turns that
- 18:10Speaker 2: spring off by setting its stiffness to zero, recalculates the
- 18:14Speaker 2: entire stiffness matrix, updates all the deflections, and then checks
- 18:18Speaker 2: every single spring again exactly.
- 18:20Speaker 1: It loops that process continuously until the number of active
- 18:24Speaker 1: springs converges, meaning the state of every spring stops changing
- 18:27Speaker 1: between calculations.
- 18:28Speaker 2: Which is incredible because attempting to track which springs are
- 18:32Speaker 2: active and inactive manually across hundreds of nodes would take
- 18:35Speaker 2: what weeks of trial and error.
- 18:37Speaker 1: Oh easily, but VBA handles that physical logic constraint in seconds.
- 18:42Speaker 2: Amazing. Now, the book also tackles the element of time
- 18:45Speaker 2: with one dimensional consolidation using the finite difference method, yes,
- 18:49Speaker 2: which models Terzaggi's theory of consolidation. Right.
- 18:52Speaker 1: So, if you build a heavy concrete foundation on saturated clay,
- 18:56Speaker 1: the clay acts kind of like a spongeful of water.
- 18:59Speaker 1: The weight slow slowly squeezes the poor water out, and
- 19:02Speaker 1: the ground sinks over time.
- 19:04Speaker 2: Right, And to predict that settlement, we use a grid system.
- 19:07Speaker 2: The total soil depth is divided into equal physical increments
- 19:11Speaker 2: represented by Z, and the total time is divided into
- 19:14Speaker 2: intervals represented by t. Okay, by writing a finite difference
- 19:18Speaker 2: loop in VBA, we calculate the dissipating poor water pressure
- 19:21Speaker 2: at every specific depuees at every single time step TEA.
- 19:26Speaker 1: So we can literally chart how many inches the ground
- 19:28Speaker 1: will settle over the next fifty years, month by month,
- 19:31Speaker 1: using native Excel charts exactly. Okay, so we have modeled
- 19:34Speaker 1: the steel, we've simulated the soil springs, and we have
- 19:37Speaker 1: charted the consolidation over time. But eventually, you know, a
- 19:39Speaker 1: contractor has to actually build the structure in the real world.
- 19:42Speaker 1: Any blueprints, right, physical blueprints which brings us to the
- 19:45Speaker 1: ultimate application of the spreadsheet, bridging the gap between calculation
- 19:50Speaker 1: and professional construction documents.
- 19:52Speaker 2: This is my favorite part. We use Excel to generate
- 19:55Speaker 2: AutoCAD script files directly from our theoretical data directly directly.
- 20:00Speaker 2: A script file which is saved with the dot scr
- 20:03Speaker 2: extension is essentially just an ASQ text file. It contains
- 20:07Speaker 2: a sequence of commands logged exactly keystroke for keystroke as
- 20:11Speaker 2: you would type them into the AutoCAD command prompt Wow.
- 20:13Speaker 1: Okay. So we combine the coordinates we generated in the
- 20:17Speaker 1: matrix analysis with the text manipulation functions we discussed the
- 20:21Speaker 1: beginning of the deep.
- 20:22Speaker 2: Dive right, the cocabinet function right.
- 20:24Speaker 1: So we use that function to write the code. If
- 20:27Speaker 1: we want to draw a beam and the start coordinate
- 20:29Speaker 1: is an A one and the nd coordinate is in
- 20:31Speaker 1: B one, we formulate a cell to read the word
- 20:33Speaker 1: line followed by a space, followed by coordinate A one,
- 20:37Speaker 1: a comma and coordinate.
- 20:38Speaker 2: B one, and the spreadsheet instantly writes the precise drafting syntax.
- 20:43Speaker 2: When you run that dot SCR file and AutoCAD, the
- 20:46Speaker 2: software reads that text file and just draws the geometry
- 20:49Speaker 2: automatically like magic. It really is. The book details how
- 20:52Speaker 2: this pipeline can generate Dutch cone penetration test profiles mapping
- 20:57Speaker 2: out soil resistance visually based on field data. Yeah, you
- 21:00Speaker 2: can instantly plot undrained sheer strength grafts or generate massive
- 21:04Speaker 2: long sections of soil profiles showing the various strata across
- 21:08Speaker 2: an entire multi acre construction site.
- 21:10Speaker 1: But most impressively, you can draw complex three D frame
- 21:14Speaker 1: bending moment diagrams directly from the finite element analysis we
- 21:18Speaker 1: ran in VBA. Because think about the alternative manually drafting
- 21:23Speaker 1: thousands of data points from a pile driving log or
- 21:25Speaker 1: a three D stress contour. It is profoundly tedious, and
- 21:29Speaker 1: if you transpose just one number, the blueprint is totally
- 21:32Speaker 1: compromised completely.
- 21:33Speaker 2: But by writing a VDA script that generates a script file,
- 21:36Speaker 2: you create a seamless, error free pipeline. You move directly
- 21:40Speaker 2: from raw numerical data to a highly accurate finished CAD
- 21:43Speaker 2: drawing without ever touching a drafting mouse.
- 21:46Speaker 1: Spreadsheetes acts as the master control.
- 21:48Speaker 2: Program right when you understand the underlying mathematics. The matrix
- 21:52Speaker 2: is the iterative logic, the finite difference scrids. The software
- 21:55Speaker 2: is really merely a medium. You stop relying on prepackaged
- 21:58Speaker 2: tools and start building your own capablit engines.
- 22:00Speaker 1: That is such a profound way to look at it.
- 22:03Speaker 1: Let's let's summarize the ground we have covered today, because
- 22:07Speaker 1: it's a lot. We leveraged native functions and iterative circular
- 22:10Speaker 1: references for stability and seepage. We utilized VBA's memory cash
- 22:15Speaker 1: to run complex matrix and versions for finite element analysis.
- 22:19Speaker 2: We modeled the earth as a dynamic Winkler foundation of
- 22:22Speaker 2: independent springs.
- 22:23Speaker 1: Yes, and finally, we use text concatenation to automate AutoCAD drafting.
- 22:28Speaker 1: So let's reinforce all of this with a quick mental
- 22:30Speaker 1: exercise for you listening.
- 22:32Speaker 2: Okay, let's hear it.
- 22:33Speaker 1: Imagine you are building your own Excel dashboard to analyze
- 22:36Speaker 1: a two D steel frame, and you need a visual
- 22:39Speaker 1: check before you hit run. What specific native Excel chirt
- 22:43Speaker 1: type should you use to accurately draw the structure's geometry
- 22:46Speaker 1: so that every single structural element can be modified independently
- 22:49Speaker 1: in two D space. I'll give you a second. If
- 22:52Speaker 1: you said the xy scatter chart with straight lines, you
- 22:55Speaker 1: have been paying close attention. Standard line charts distort the spacing,
- 22:59Speaker 1: but the xy scatter binds every distinct line segment to
- 23:03Speaker 1: absolute coordinate cells.
- 23:05Speaker 2: Spot on.
- 23:06Speaker 1: This deep dive completely changes the way you look at
- 23:08Speaker 1: a piece of software you likely open every single morning.
- 23:11Speaker 1: So I want to leave you with a final thought
- 23:13Speaker 1: to ponder if a standard everyday spreadsheet application can secretly
- 23:17Speaker 1: function as a matrix structural analysis tool, an iterative solver
- 23:22Speaker 1: for geotechnical soil mechanics, and a fully automated drafting assistant. Well,
- 23:26Speaker 1: what other hidden high level capability is in the everyday
- 23:29Speaker 1: software sitting on your desktop right now? Are you ignoring
- 23:32Speaker 1: simply because of the mundane label printed on the box