Speaker 1: All right, let's kick off this deep dive. Today. We're
Speaker 1: diving headfirst into a challenge that's probably well, pretty familiar
Speaker 1: if you're an engineer. The sheer volume of calculations, right,
Speaker 1: the endless streams of data, and sometimes just feeling like
Speaker 1: the tools you've always used, maybe spreadsheets, they kind of
Speaker 1: hit a wall.
Speaker 2: They absolutely do, especially when problems get really complex, or
Speaker 2: you know, you find yourself doing the same tedious thing over.
Speaker 3: And over again.
Speaker 1: Yeah, exactly. Every engineer is looking for that edge. You
Speaker 1: want more speed, more flexibility, and just rock solid accuracy
Speaker 1: in your work.
Speaker 2: And that's really where programming starts to look very appealing.
Speaker 2: It offers a different way to tackle those challenges.
Speaker 1: And specifically today we're doing a deep dive into Python.
Speaker 1: You've probably heard the name. It's a programming language that's
Speaker 1: just incredibly versatile.
Speaker 3: Yeah, it's popping up everywhere, and.
Speaker 1: It's rapidly becoming well, almost indispensable in civil and structural engineering.
Speaker 1: We've been digging into a guide that's literally written for
Speaker 1: engineers wanting to jump into this.
Speaker 2: World, right, and our goal here in this deep dive
Speaker 2: is to take that source material and really pull out
Speaker 2: the core concepts. We want to show you how Python,
Speaker 2: especially when you pair it with some really powerful specialized libraries,
Speaker 2: can just fundamentally change how you work. So streamlining workflows,
Speaker 2: streamlining workflows, tackling problems that may be felt impossible before
Speaker 2: automating those tasks that just eat up your time.
Speaker 1: Yeah yeah, So why should you our listener care? Because
Speaker 1: what we learn diving into this guide, it feels like
Speaker 1: it offers a genuine shortcut, a shortcut to what though,
Speaker 1: a way to handle those real world engineering problems faster,
Speaker 1: more efficiently, and honestly with a level of flexibility that's
Speaker 1: just tough to get with the traditional methods alone.
Speaker 3: Okay, let's unpack that.
Speaker 1: Then where do you even begin?
Speaker 2: Well, the guide we look at starts right there with
Speaker 2: the motivations the why bother for an engineer to learn
Speaker 2: Python right, and one of the big ones is exactly
Speaker 2: what you said, moving beyond the limits of spreadsheets, especially
Speaker 2: when data gets big or the calculations get intricate, you
Speaker 2: need something faster, more adaptable.
Speaker 1: So it's not like ditch Excel immediately. It's more like
Speaker 1: adding a new powerful.
Speaker 3: Tool exactly right.
Speaker 2: The source material is pretty clear you can still use
Speaker 2: Python in a professional setting, even when you need to
Speaker 2: share data in common formats like Excel files. Okay, we'll
Speaker 2: see how a library called pandas makes that surprisingly seamless.
Speaker 1: Actually, and another motivation.
Speaker 2: Learning practical engineering applications. This isn't just abstract coding theory.
Speaker 2: It's directly applicable. We're talking about solving the kinds of
Speaker 2: structural or civil problems you face day to day.
Speaker 1: Yeah, and who wouldn't want to say, automate creating reports,
Speaker 1: maybe getting them into professional formats like latex or PDF.
Speaker 2: Or generating really sharp publication quality plots straight from your analysis.
Speaker 1: Exactly. These are all things Python enables. It's not about
Speaker 1: replacing everything, No.
Speaker 3: Not at all.
Speaker 2: It's about empowering you with this adaptable tool set that
Speaker 2: really complements the skills in the software.
Speaker 3: You already use.
Speaker 1: Okay, so Python it is. But where do you literally start,
Speaker 1: like installing it, typing the code? The guide gives us
Speaker 1: those first steps.
Speaker 2: Yeah, for beginners, the usual recommendation is anaconda. It's a
Speaker 2: distribution basically a package okay that bundles Python itself along
Speaker 2: with most of the essential libraries you'll need. It just
Speaker 2: saves a ton of set up headaches right, gets you
Speaker 2: going faster, and the environment for actually writing the code
Speaker 2: that material mention Jupiter notebooks. Jupiter notebooks are fantastic, especially
Speaker 2: for this kind of work. They let you mix things up.
Speaker 2: How So you have code cells where you write and
Speaker 2: run your Python code, right, Yeah, but you also have markdown.
Speaker 1: Cells ah for text and explanations.
Speaker 2: Exactly, write explanations, put in equations, add images, basically document
Speaker 2: your whole thought process alongside the actual calculations.
Speaker 1: So it's like a living document your analysis and your
Speaker 1: explanation all in one place.
Speaker 2: Which is just invaluable for checking your work later or
Speaker 2: sharing it with colleagues. Makes things reproducible.
Speaker 1: Okay, environment set up. Now, what about the absolute bedrock,
Speaker 1: the foundational Python concepts an engineer needs to.
Speaker 2: Get so the source runs through the core syntax pretty quickly.
Speaker 2: Things like comments in your code using the hash symbol
Speaker 2: hashtag for a single line or triple quotes for multiple lines.
Speaker 1: Essential for clarity, absolutely essential.
Speaker 2: It's not just telling the computer what to do, but
Speaker 2: reminding yourself or telling others why you're doing.
Speaker 3: It that way.
Speaker 1: Good practice. Easy to skip when you're in a hurry, though.
Speaker 2: Oh definitely. Then you've got variables obviously, and understanding the
Speaker 2: basic data.
Speaker 1: Types like numbers and texts right in.
Speaker 2: For integers whole numbers, float for numbers with decimal points,
Speaker 2: booll for true or false conditions, which are key for logic,
Speaker 2: and string for text. Think of them like labeled boxes
Speaker 2: for different kinds of information.
Speaker 1: And grouping data.
Speaker 2: Collections.
Speaker 1: Yeah, Python has built in collections. The list is probably
Speaker 1: the most common. It's like a flexible array or vector
Speaker 1: flexible hot. It's ordered, you can change things in it,
Speaker 1: and you grab elements using an index starting from zero.
Speaker 1: That's important, index zero. It can even hold different types
Speaker 1: of data like numbers and strings together, okay.
Speaker 2: And dictionaries a dick Yeah, that's more like a lookup table.
Speaker 2: It stores data as key value pairs, so you find
Speaker 2: a value using its unique key, not its position like
Speaker 2: in a list.
Speaker 1: Un ordered gotcha and tupuls tuple.
Speaker 2: It's ordered like a list, but the big difference is
Speaker 2: you can't change it once you create it.
Speaker 3: Immutable.
Speaker 1: Why use that?
Speaker 3: Then?
Speaker 2: They're often used when a function needs to return multiple results.
Speaker 2: You bottle them in a tuple and then you can
Speaker 2: easily unpack them back into separate variables.
Speaker 1: H okay, makes sense. Basic math is obvious plus velmad
Speaker 1: But what about powers exponents.
Speaker 2: Right, Engineers use those all the time. Python uses double asterisks,
Speaker 2: so two in three is too cubed. Not the care
Speaker 2: ensemble you might see elsewhere.
Speaker 3: That's a common.
Speaker 1: Gotcha good tip for powers.
Speaker 3: Also useful are.
Speaker 2: The assignment operators like plus or make just shorthand ways
Speaker 2: to update of variables of value like x plus one
Speaker 2: is the same as x plus one.
Speaker 3: There's a bit of typing.
Speaker 1: And making decisions logic flow.
Speaker 2: That's your if yes, which is short for l if
Speaker 2: and l statements. They work based on conditions that evaluate
Speaker 2: too true or.
Speaker 1: False, using comparison operators exactly for checking equality. Is this
Speaker 1: equal to that? For not equal, then your standard edge.
Speaker 2: A and I remember the source flag A really common mistake.
Speaker 1: Here, Oh yeah, the classic versus Everyone does it at first.
Speaker 1: Single equals is assignment right, x equals five, assigns five
Speaker 1: to x, double equals x and equals five, so this
Speaker 1: is equal to five. Huge difference in meaning. Get that
Speaker 1: wrong and your logic goes haywire.
Speaker 2: And you combine conditions with and or not standard logic yep.
Speaker 2: No Python structure It's all about the spacing, isn't it indentation?
Speaker 1: Yes, this is fundamental Python. Where other languages might use
Speaker 1: curly braces or keywords like ndif to show code blocks
Speaker 1: belonging to an if statement or a loop, Python uses
Speaker 1: indentation consistent spacing.
Speaker 3: And it's not just for looks.
Speaker 1: No, it's syntactically mandatory. If your indentation is wrong, your
Speaker 1: code won't run, or worse, it'll run in correctly. It
Speaker 1: forces a certain level of visual clarity, which is actually
Speaker 1: a good thing.
Speaker 2: Okay, what about doing things repeatedly?
Speaker 1: Loops?
Speaker 2: Four loops are the main tool here. You use them
Speaker 2: to iterate over sequences like the items in a list,
Speaker 2: or to just repeat an action a specific.
Speaker 3: Number of times.
Speaker 1: And that range function comes up.
Speaker 2: A lot very often with four loops. Dot range n
Speaker 2: gives you a sequence of numbers from zero up two,
Speaker 2: but not including n.
Speaker 1: So range five is zero, one, two, three, four exactly.
Speaker 2: That n one end point is crucial to remember.
Speaker 1: Can you control the loop while it's running like stop early, yep.
Speaker 2: Break, exits the loop, immediately, continue, skips the rest of
Speaker 2: the current iteration, and jump straight to the next one.
Speaker 2: Very handy sometimes.
Speaker 1: Okay, last basic concept functions key for organization totally.
Speaker 2: Think of a function as a named, reusable chunk of
Speaker 2: code that does one specific job. You define it with
Speaker 2: a deaf keyword, give it a name, give it inputs, right,
Speaker 2: specify any inputs it needs in parentheses. Then it performs
Speaker 2: its operations and usually uses the return keyword to send
Speaker 2: back a result.
Speaker 1: An output keeps your code cleaner, reusable.
Speaker 2: Exactly avoids repeating yourself. The source also mentioned variable scope.
Speaker 1: Ah, yes, local versus global important stuff.
Speaker 2: Variables created inside of function are local. They only exist
Speaker 2: within that function and disappear when it finishes.
Speaker 1: So they don't mess with things outside.
Speaker 3: Right.
Speaker 2: Global variables are defined outside functions and can generally be
Speaker 2: accessed from anywhere. Understanding scope helps prevent unexpected side effects.
Speaker 1: The trapezoid area function example and the source was pretty clear.
Speaker 2: Yeah, good, simple example. You pass in the bases in height,
Speaker 2: The function calculates the area using the formula and returns
Speaker 2: that single value.
Speaker 1: And you mentioned tiples before for returning multiple things.
Speaker 3: Yep.
Speaker 2: The source showed how you can set default values for
Speaker 2: function inputs, making them optional, and how returning a twopole
Speaker 2: lets a function give back say both the area and perimeter,
Speaker 2: which you can then easily unpack, and two separate variables
Speaker 2: where you call.
Speaker 3: It the function.
Speaker 1: Okay, that covers the Python fundamentals. Now, the real power
Speaker 1: boost for engineers comes from the libraries, right or absolutely.
Speaker 2: This is where Python transforms from a general purpose language
Speaker 2: into a specialized engineering powerhouse. The guide really focuses on
Speaker 2: four core libraries that are well game changers.
Speaker 1: Let's start with the big one for numbers, numb PI.
Speaker 3: Numb PI.
Speaker 2: It's fundamental if you're doing numerical work in Python, especially
Speaker 2: with the rays. This is the standard. The core element
Speaker 2: is the end array, the ind dimensional array.
Speaker 1: How is it different from a standard Python list.
Speaker 2: It's like a list, but highly optimized for math, generally
Speaker 2: much faster for calculations. Crucially, all elements in a NUMBPI
Speaker 2: array usually have to be the same data type, like
Speaker 2: all floats or all integers.
Speaker 3: Lists can mix types.
Speaker 1: Got it? How do you use it?
Speaker 2: Standard practice is import nump is NP. Everyone uses NP
Speaker 2: as the shorthand.
Speaker 1: Okay, creating a raise easy.
Speaker 2: NP dot zeros makes an array full of zeros mp
Speaker 2: dot range is like Python's range, but gives you an
Speaker 2: actual numbpire right, and np dot lends space is super
Speaker 2: useful for engineers.
Speaker 1: Lends space.
Speaker 2: Yeah, np dot lends space, go start stopping them. It
Speaker 2: creates an array with numb evenly spaced points between start
Speaker 2: and stop, including the stop point, perfect for creating X
Speaker 2: coordinates along a beam or points for plotting.
Speaker 1: Okay, and doing math with these arrays.
Speaker 2: Numb pi shines here. You can get properties like dimensions,
Speaker 2: want to be in shape, shape shape sized, data type
Speaker 2: d type basic math plus a at even for powers
Speaker 2: works element wisele limit wise, meaning if you have two
Speaker 2: arrays A and B the same shape A plus B,
Speaker 2: adds the first element of A to the first of B,
Speaker 2: the second to the second, and so on same. For
Speaker 2: multiplication to B, it applies the operation to corresponding elements.
Speaker 1: But wait, matrix multiplication, that's different, right, crucial for structural analysis.
Speaker 3: Absolutely crucial. This trists people up.
Speaker 2: The standard asterisk is element wise multiplication. For true matrix
Speaker 2: multiplication like you need for transformations or solving systems, use
Speaker 2: the AT symbol an b okay.
Speaker 1: At for matrix math element wise got it?
Speaker 3: Remember at B.
Speaker 2: You can also slice arrays like lists using start end
Speaker 2: dot step, but it works across multiple dimensions too, and
Speaker 2: you can reshape them, stack them vertically, v stack a pend,
Speaker 2: or insert elements. Lots of manipulation tools.
Speaker 1: The guide had a great practical example calculating moment and
Speaker 1: sheer along a simple beam.
Speaker 2: Yeah, that really shows the element wise power. You create
Speaker 2: your X ray along the beam using np dot line space.
Speaker 2: Then you just write the standard beam equations for moment
Speaker 2: M and sheer V, but using the entire x ray
Speaker 2: in the.
Speaker 1: Formula like M equals l x two w x two
Speaker 1: two exactly.
Speaker 2: Numpi automatically applies that calculation to every single value in
Speaker 2: the X ray all at once. You get the entire
Speaker 2: M diagram or v diagram as a Numpi array instantly,
Speaker 2: super efficient.
Speaker 1: Wow. Okay, so numb pie handles the heavy numerical lifting.
Speaker 1: What if you need to deal with the math before
Speaker 1: you have numbers, like solving equations symbolically.
Speaker 2: That's where simp comes in. It's a library for symbolic mathematics.
Speaker 2: Think of it as a computer algebra system or see
Speaker 2: right inside Python.
Speaker 1: So algebra with symbols, not just numbers.
Speaker 2: Percisely, you import simpsky. Then you define symbols like xsp
Speaker 2: dot symbols x or maybe EI lsp dot symbols EIL
Speaker 2: for engineering properties.
Speaker 3: Then you can write.
Speaker 2: Equations using these symbols. Simps functions like sp dot solve
Speaker 2: set to solve an equation for a specific symbol, or
Speaker 2: sp dot lens solve to solve systems of linear equations
Speaker 2: symbolically calculus two differentiation integration.
Speaker 1: The guide mentioned a display function for making it look nice.
Speaker 2: Yeah, especially in Jupiter notebooks. Display your SIMP expression often
Speaker 2: renders the output using latex math formatting, so complicated formulas
Speaker 2: look like they do in a textbook, much easier to
Speaker 2: read and check.
Speaker 1: How does this help with a real problem? The source
Speaker 1: used a two span beam example, again perfect case.
Speaker 2: A continuous beam like that is often statically indeterminate. Basic
Speaker 2: equilibrium equations aren't enough to find all the support reactions, right.
Speaker 1: You need compatibility equations considering deflections or slopes Exactly.
Speaker 2: With SIMP, you can say up both the equilibrium equations
Speaker 2: and the compatibility equations using your defined symbols for unknown
Speaker 2: reactions like va VC and maybe an unknown internal moment MX. Okay,
Speaker 2: Then you use simply solvers like sp dot len solve
Speaker 2: to solve that system of symbolic equations. It gives you
Speaker 2: the algebraic expressions for those unknown reactions in terms of
Speaker 2: the symbolic loads and lengths WL, etc.
Speaker 1: So you solve the underlying indeterminate structure problem algebraically first.
Speaker 2: Yes, before you even plug in a single number. It
Speaker 2: helps you verify the fundamental mechanics and let simply handle
Speaker 2: the messy algebra. Then you can substitute numbers into those
Speaker 2: symbolic solutions later using numb pie.
Speaker 1: Perhaps that's powerful. Okay, From symbolic math to data wrangling.
Speaker 2: Pandas If numbpie is for a numerical arrays, PANDAS is
Speaker 2: for tabular data think spreadsheets, tables with rows and columns.
Speaker 2: It's built for handling potentially large structured data sets, especially
Speaker 2: reading and writing common file formats.
Speaker 1: Like Excel and CSV files.
Speaker 2: Exactly dot xlsx, dot csv. PANDAS makes working with those
Speaker 2: super easy. The core structure in PANDAS is.
Speaker 1: The data frame day frame like a table.
Speaker 2: Pretty much imagine a two D table, but with powerful extras.
Speaker 2: It has labeled columns like spreadsheet headers, and labeled rose
Speaker 2: called the index. It's designed for easily selecting, filtering, cleaning,
Speaker 2: and analyzing that kind of data.
Speaker 1: What kind of things can you do? Easily?
Speaker 2: Create them from scratch or from numpire rays access data
Speaker 2: by column name or row index, lots of data cleaning
Speaker 2: tools built in sorting, sort values, renaming columns or the index, rename,
Speaker 2: dropping rose or columns, drop handling missing data, resetting the
Speaker 2: index if it gets messed up, reset index. You can
Speaker 2: also combine data frames CONCAT.
Speaker 1: The guide really highlighted working with external files. That sounds
Speaker 1: incredibly useful.
Speaker 2: It is probably one of the most common uses for engineers.
Speaker 2: PDA dot redexl mydata dot xl sx or pd dot
Speaker 2: recsv results dot csv one line and your data isn't
Speaker 2: a data.
Speaker 1: Frame, even if the files a bit messy like multiple
Speaker 1: header rows.
Speaker 2: Yeah canas has options for that. You can specify header
Speaker 2: zero one if the headers pans the first two rows,
Speaker 2: for example, or index col zero if the first column
Speaker 2: the file should be used as the roll labels the index.
Speaker 1: And cleaning that imported data, getting rid of empty rows
Speaker 1: or junk.
Speaker 2: PANDAS makes that much easier than doing it manually. In Excel,
Speaker 2: you can drop those extra header levels that sometimes come
Speaker 2: in DF dot columns DOT drop level, remove rows with
Speaker 2: any missing values, DF dot drop and selectively drop rows.
Speaker 1: Or columns and getting data back out to share with colleagues.
Speaker 2: Maybe just as easy df dot to excel output dot
Speaker 2: XLSX or df dot t s sv cleanda dot csv.
Speaker 2: You can control whether the index is written and other formatting.
Speaker 2: It bridges the gap between your Python analysis and standard
Speaker 2: office formats.
Speaker 3: Really well.
Speaker 1: How did the two span beam example use pandas it.
Speaker 2: Showed using a data frame to manage results from multiple
Speaker 2: load cases.
Speaker 3: So you use simply.
Speaker 2: Numpi to calculate the M and V diagrams for dead lows,
Speaker 2: live load, windload, et cetera. Okay, you can store each
Speaker 2: MRA and vra as a in a Panda's data frame
Speaker 2: with columns labeled maybe mddvdad, MLIV.
Speaker 3: Live and so on.
Speaker 1: Ah, so everything is organized together.
Speaker 2: Exactly, all results in one table. Makes it super easy
Speaker 2: to then compare load cases, find maximums or minimums across cases, envelopes,
Speaker 2: or apply load combinations.
Speaker 1: Right, Okay, we've calculated, we've solved symbolically, we've organized the data.
Speaker 1: Now we need to see it visualization with matt plotlib.
Speaker 2: Mat plotlib it's the workhorse. Plotting library of Python very versatile.
Speaker 2: You can create anything of simple line graphs to complex
Speaker 2: publication quality technical figures.
Speaker 1: How do you get started?
Speaker 2: The standard import is importmattplotlib dot piplot as PLT. Everyone
Speaker 2: uses PLT. The key concept is the figure and axis
Speaker 2: figure and axis.
Speaker 3: The figure is like.
Speaker 2: The overall window or canvas. The axis usually just one.
Speaker 2: AX is the actual plot area within that figure where
Speaker 2: your data gets drawn, the part with the xy axis,
Speaker 2: the lines, the points, and.
Speaker 1: The guide recommended A specific way to set this up.
Speaker 2: Yeah, the object oriented approach is generally preferred for control.
Speaker 2: You start with fig AX, it goes PLT dot subplots.
Speaker 2: This creates both a figure FIG and a single axis.
Speaker 1: Object AX, and then you plot on AX exactly.
Speaker 2: You call messods directly on the AX object AC dot
Speaker 2: plot x data white data for a line plot, x
Speaker 2: dot scatter for scatterplots, et cetera. Then you use PLT
Speaker 2: dot show at the end to actually display the figure.
Speaker 1: Why that way instead of just PLT dot plot.
Speaker 2: Using the AX object gives you much finer control over
Speaker 2: everything on that specific plot labels, titles, ticks, legends, colors.
Speaker 2: It's much more robust, especially if you end up wanting
Speaker 2: multiple plots in the same figure later makes sense.
Speaker 1: Customization is obviously key for engineering plots totally.
Speaker 2: And map plot labelts. You customize almost anything at access
Speaker 2: labels with AX dot sets label and act dot set
Speaker 2: the label. Set a title with ax dot set title
Speaker 2: at a legend if you have multiple lines using ax dot.
Speaker 1: Legend line styles colors.
Speaker 2: YEP control line styles, solid dash colors, ad markers.
Speaker 3: At data points.
Speaker 2: You can fill areas between curves using ax dot fill
Speaker 2: between really useful for showing moment envelopes or maybe the
Speaker 2: feasible region in an interaction diagram.
Speaker 1: Oh nice, ticks and labels too.
Speaker 3: Full control.
Speaker 2: Customize the locations and labels of the tick marks on
Speaker 2: both axis sex sticks set tis. You can even rotate
Speaker 2: the dick labels sixtick labels rotation if they overlap essential
Speaker 2: for clear technical plots.
Speaker 1: Scatterplots were also mentioned for discrete points right at that'skay.
Speaker 2: A cool feature there is you can color each point
Speaker 2: based on a third variable using the C argument and
Speaker 2: a color map. See that, then add a color bar
Speaker 2: fig dot color bar to show what the colors mean.
Speaker 2: Great for visualizing things like stress levels or utilization. Ratio
Speaker 2: is at different points.
Speaker 1: And putting multiple plots together like a dashboard.
Speaker 2: Peel dot subplots PLF booze creates a grid. If you
Speaker 2: do fig axs egals PLT dot subplots two two axis
Speaker 2: becomes a two by two array and you can plot
Speaker 2: on AXI zero zero, access rule one, et cetera.
Speaker 3: To arrange four plots in one.
Speaker 1: Figure and getting the plot out of Python, saving it.
Speaker 2: Easy PLT dot safig, myplot, dot pdf or dot png,
Speaker 2: dot s VG lots of formats saves the current figure
Speaker 2: to a file ready to be included in reports.
Speaker 1: So practically this ties back to visualizing those beam diagrams
Speaker 1: from numb pi, or maybe plotting something complex like that
Speaker 1: MN interaction domain for concrete Exactly.
Speaker 2: You do the heavy lifting with NUMPI, simply manage it
Speaker 2: with pandas, and then matt plotlib gives you the visual
Speaker 2: insight and the communication tool.
Speaker 3: It completes the picture.
Speaker 1: Okay, so we've got the basics, we've got the core
Speaker 1: libraries numb PI, SIMPI, panas maplotlib. The really cool part
Speaker 1: is seeing them all work together on actual engineering problems.
Speaker 1: The source had some great examples of this integration.
Speaker 3: Yeah, this is where you see the synergy.
Speaker 2: Like calculating properties for a custom steel section, maybe it
Speaker 2: built up welded shape.
Speaker 1: How would that work?
Speaker 2: You might use SIMPI first symbolically to set up the
Speaker 2: equations for finding the centroid location YG using the principle
Speaker 2: of moments of area. Solve that algebraically. Okay, Then you
Speaker 2: switch to Python a numb pie. You implement the standard
Speaker 2: formulas for area moment of inertia like I gole sum
Speaker 2: in a local plus eighty two section modulus using the
Speaker 2: dimensions of the section parts may be stored in NUMPI arrays.
Speaker 2: You plug the symbolic centroid result into these numerical calculations.
Speaker 1: So combining the symbolic set up with the numerical calculation precisely.
Speaker 2: Or take the concrete MS interaction domain. That's a complex
Speaker 2: nonlinear problem.
Speaker 1: Yeah, involves iterating through stream profiles.
Speaker 3: Right. The guide shows how numb pi is crucial.
Speaker 1: Here.
Speaker 2: You use a rays to discretize the concrete section into
Speaker 2: layers and to find different possible linear strain profiles across
Speaker 2: the depth.
Speaker 1: Then calculate forces for each strain profile exactly.
Speaker 2: For each assumed strain profile, you find the stress in
Speaker 2: each layer using the concrete and steel stress strain curves.
Speaker 2: Then you use NUMPI functions like MP dot traps for
Speaker 2: numerical integration to sum up the forces in all layers.
Speaker 2: This gives you the total axial force n and bending
Speaker 2: moment M for that specific.
Speaker 1: Strain state, and you repeat that many times.
Speaker 3: You repeat that for.
Speaker 2: Many, many possible strain profiles. Each one gives you a
Speaker 2: point n M on the back boundary of the interaction domain.
Speaker 2: Collect all those points.
Speaker 1: And plot them with matt plotlib.
Speaker 3: You got it.
Speaker 2: Plot all the n M pairs and maybe use fill
Speaker 2: between to shade the feasible region. It shows how programming
Speaker 2: lets you tackle these really fundamental iterative mechanics problems that
Speaker 2: would be incredibly painful manually.
Speaker 1: Yeah, impossible with just a spreadsheet.
Speaker 2: Really pretty much. And it's steel column design example that
Speaker 2: highlighted pandas in automation. Oh so, pannas is perfect for
Speaker 2: managing potentially hundreds of load combinations in a data frame.
Speaker 2: Each row could be a combo with columns for actual
Speaker 2: fource moments, et cetera. Then the design checks, say calculating
Speaker 2: buckling reduction factors like G and k according to eurocode
Speaker 2: or another standard. You implement those checks as Python code,
Speaker 2: maybe in functions, often using numb pi for the math involved.
Speaker 1: And the key is applying the check systematically.
Speaker 2: Yes, you write the code for the check once, then
Speaker 2: you apply that function to every single row, every load
Speaker 2: combination in your PANDAS data frame, maybe storing the result
Speaker 2: pass fail utiless ratio.
Speaker 3: In a new column.
Speaker 1: Automating code compliance checks across all scenarios.
Speaker 2: That's huge, massive timesaver ensure its consistency, reduces errors. It
Speaker 2: automates a critical and often tedious part of design.
Speaker 1: Okay, so it's not just about calculation and analysis. Engineers
Speaker 1: need to communicate results. The guide finish up talking about
Speaker 1: reporting and automation.
Speaker 2: Right absolutely, and the Jupiter Notebook itself is a big
Speaker 2: part of that story because you can mix your live code,
Speaker 2: the actual output from running that code, numbers, tables the
Speaker 2: plots you generated, and explanatory text using markdown, all in
Speaker 2: one document. The notebook essentially becomes your working report draft.
Speaker 1: Your analysis document is the report draft.
Speaker 2: That's efficient, it really is, and getting results out, especially
Speaker 2: tables pandas is great here too. You can take a
Speaker 2: data frame, maybe your load combination result and export it
Speaker 2: directly to LATEX format using DF, dot TOLA texts. Latex
Speaker 2: is the standard for high quality technical documents.
Speaker 1: You can format it too, yep, control things.
Speaker 2: Like bolding, rows, column alignment. You can even embed LATEX
Speaker 2: math symbols directly in your data frame column headers if needed,
Speaker 2: and have them render correctly in the output. It connects
Speaker 2: your calculations directly to professional documentation.
Speaker 1: Cuts out copy pasting, reduces errors again for sure.
Speaker 2: And the plots from that plotlib, yes, save them, save
Speaker 2: them using PLT, dot SA, fig is, BDF or p
Speaker 2: and G files and then include those image files in
Speaker 2: your LATEX document or word DOOC or whatever you're using.
Speaker 1: And there was a final step converting the whole notebook.
Speaker 2: Yeah, the source mentioned at command line tool Jupiter andb convert.
Speaker 2: You can use it to take your dot IPNB notebook
Speaker 2: file and automatically convert it into different final formats like
Speaker 2: dot text for LATEX, or even directly to PDF if
Speaker 2: you have LATEX installed, HTML and others.
Speaker 1: So it automates turning that dynamic analysis notebook into a
Speaker 1: static shareable report exactly.
Speaker 3: It completes the workflow loop.
Speaker 1: Wow, so thinking about it, it's a whole ecosystem setting
Speaker 1: up the problem using numpi and simply for the heavy math,
Speaker 1: managing data and loadcases with pandas, visualizing insights with matt plotlib,
Speaker 1: and then automating the report output potentially all linked together
Speaker 1: in a Jupiter notebook. That is genuinely powerful.
Speaker 3: It really is.
Speaker 2: And I think what this deep dive into the source
Speaker 2: shows is that if you're an engineer who has been
Speaker 2: maybe curious about programming, this is the kind of potential
Speaker 2: that's there. Those first steps getting Anaconda installed, learning the
Speaker 2: core Python syntax, they're the launch pat They.
Speaker 1: Open the door to all these advanced capabilities.
Speaker 2: Yeah, and the guide really hammered this home practice is key.
Speaker 2: You can't just read about it. You have to try
Speaker 2: applying these tools to the kinds of problems.
Speaker 3: You actually work on.
Speaker 1: Makes sense. The more you use it, the more natural
Speaker 1: it feels.
Speaker 2: Exactly, it becomes more intuitive, you get faster, you start
Speaker 2: seeing new ways to apply it. It's a skill that
Speaker 2: just enhances everything else you do as an engineer. Boost
Speaker 2: efficiency improves accuracy, lets you tackle problems that maybe felt out.
Speaker 3: Of reach before.
Speaker 1: So let's leave our listeners with a final thought, if
Speaker 1: you can use these Python tools to, say, analyze complex
Speaker 1: individual components like beams or columns, manage huge sets of
Speaker 1: low cases, automate design checks, and generate reports. Where could
Speaker 1: you take that next?
Speaker 3: What are the bigger possibilities?
Speaker 1: Could you scale these techniques up to analyze entire structural
Speaker 1: systems more effectively? Could you use Python to run iterative
Speaker 1: design optimizations, maybe searching for the most efficient beam size
Speaker 1: or trust geometry, or what.
Speaker 2: About connecting to real world data, analyzing sensor readings coming
Speaker 2: off a bridge or building in near real time.
Speaker 1: Exactly when you combine those fundamental engineering principles with the
Speaker 1: kind of computational power and flexibility Python offers, well, the
Speaker 1: possibilities start to look pretty vast, don't they