Connor Ferster
Connor Ferster
  • Видео 7
  • Просмотров 107 680
How I use Python in Structural Engineering
Find me on GitHub: github.com/connorferster/
handcalcs: github.com/connorferster/handcalcs
forallpeople: github.com/connorferster/forallpeople
Dr. Becky Smethurst: 5 ways I use code as an astrophysicist
ruclips.net/video/bxWrXhLFN2s/видео.html
Просмотров: 50 156

Видео

Introduction to handcalcs: Absolute Beginners Guide
Просмотров 17 тыс.4 года назад
handcalcs is a powerful, free, Python library that automatically renders most Python calculations into Latex, as though you wrote them by hand. Running on Jupyter Lab/Notebooks, handcalcs allows anyone to create beautiful, modular, parametric calculations sheets in a way that mimics a handwritten calculation. For any calculation, handcalcs will render the symbolic formula, the numeric substitut...
Engineering Calculations: Handcalcs-on-Jupyter vs. Excel
Просмотров 13 тыс.4 года назад
Engineering calculations are commonly performed in Excel but creating a well formatted calculation sheet can be time consuming. Handcalcs is a Python library that runs on Jupyter Lab/Notebooks to render Python calculations as though you wrote them by hand. Using a combination of Python cells and Markdown cells, you can create a parametric calculation sheet in a Jupyter, that looks beautiful, in...
The Art of Everyday Innovation: R. Gary Black, Structural Engineer
Просмотров 1 тыс.5 лет назад
R. Gary Black is a structural engineer and professor of architecture at UC Berkeley. He is also the president of his own company, Integrated Structures. R. Gary Black began his career as the structural engineer for the Center for Environmental Structure, founded by architect Christopher Alexander. This presentation is a retrospective on some of R. Gary Black's projects focusing on one of his st...
Formaldehyde-free tannin foam
Просмотров 7607 лет назад
Formaldehyde-free tannin foam synthesized at SAIT Polytechnic, Canada in 2016. The formulation used was "F11-22" as detailed in DOI: 10.5185/amlett.2011.4254. Project completed by Connor Ferster, Mu Yang, Fernando Arenas, and Michael Shannon. Faculty advisor: Matthew Eidt. Additional assistance provided by Dr. Stephen Barry. Video shot by The Light Factory.
Erlton CFD rescue
Просмотров 20 тыс.11 лет назад
Calgary flood 2013
Tennessee Tanning - Glazing Jack
Просмотров 6 тыс.13 лет назад
A video showing the operation of a leather glazing jack at Tennessee Tanning

Комментарии

  • @Son96601
    @Son96601 13 дней назад

    Having installed python 3.12, I have been able to test the if statements using handcalcs and there are numerous issues with using if statements within functions decorated with @handcalc(). 1) If your input value into the function is modified inside the function after the if statement, the rendering of that value will use the latest value instead of the value it was before the if statement. Here's an example: def func(x, y): if x < 20: y = x + 5 x = x + 6 return x, y In this example, if x = 10, 16 will be used in the rendering of all the lines, instead of using 10. The first rendered says y = x + 5 = 16 + 5 = 15 2) if the variable is just to be assigned a value then nothing will be rendered. Here's an example: def func(x): if x > 1: x = 1 return x In this example, the x = 1 will not be rendered. I hope these issues will be considered for fixing soon?

  • @Son96601
    @Son96601 13 дней назад

    Having installed python 3.12, I have been able to test the if statements using handcalcs and there are numerous issues with using if statements within functions decorated with @handcalc(). 1) If your input value into the function is modified inside the function after the if statement, the rendering of that value will use the latest value instead of the value it was before the if statement. Here's an example: def func(x, y): if x < 20: y = x + 5 x = x + 6 return x, y In this example, if x = 10, 16 will be used in the rendering of all the lines, instead of using 10. The first rendered says y = x + 5 = 16 + 5 = 15 2) if the variable is just to be assigned a value then nothing will be rendered. Here's an example: def func(x): if x > 1: x = 1 return x In this example, the x = 1 will not be rendered. I hope these issues will be considered for fixing soon?

  • @Son96601
    @Son96601 19 дней назад

    Hi, the conditional if statements do not work on python 3.13.1. They seem to work fine on 3.12. Is there any reason for this, and will it be possible to provide a fix soon?

  • @Son96601
    @Son96601 24 дня назад

    Is it possible to place a symbol on the left hand side of an equation? For example when designing concrete d/h = 0.9

  • @Son96601
    @Son96601 28 дней назад

    When I enter handcalcs.set_option() an error is returned saying set_options() missing 2 required positional arguments. How can I see the list of available options and what values they take if this does not work?

  • @Son96601
    @Son96601 Месяц назад

    Not sure if you know but the conditional if statements do not work on handcalcs. I tried the same example in the documentation and it keeps saying that x is not defined even though it is defined in the previous cell.

    • @connorferster
      @connorferster Месяц назад

      @@Son96601 They do work. Read the docs again and check your code. They are not, currently, like regular Python code.

    • @Son96601
      @Son96601 Месяц назад

      @@connorferster Hi, I copied the code from the docs exactly and keep getting the x is not defined error for some reason, i cannot understand why.

    • @Son96601
      @Son96601 24 дня назад

      @connorferster Hi, this is the code I have wrote: Cell 1 : %%render x = 12 y = 2*x/5 Cell 2: %%render if x <= 24: b = 2*x When I run I get the error that name 'x' is not defined. Can you please see if you know why I am getting this error? Thanks

  • @Son96601
    @Son96601 Месяц назад

    @connorferster I have tried to add a symbol line to the MPa in the structural environment. However, it does not work. Furthermore, when I call forallpeople.environment(), the MPa is shown to equal 1.000Pa instead of 1N/mm^2. It seems that the library is linked to the unit case, in other words when I add a symbol of N/m^2 to the Pa unit, everything will follow this, so if something is in MPa it will be given MN/m^2 units. Is there no way to force the use of N/mm^2 when the definition of MPa is found in the calculations?

  • @Son96601
    @Son96601 Месяц назад

    Is there any way to force the units of a calculation to be N/mm^2 instead of MPa? N/mm^2 is more common and expected in UK concrete design.

    • @connorferster
      @connorferster Месяц назад

      @@Son96601 Yes, you can change the symbol for MPa to N/mm^2 in the structural.json environment file.

    • @Son96601
      @Son96601 Месяц назад

      @connorferster Thanks! If I still wanted MPa to be in the environment for other cases, do I just change the default value for N/mm^2 to True and then copy it as another entry, call this one MPa and set its default value to false?

    • @Son96601
      @Son96601 Месяц назад

      @@connorferster OK having read the documentation further, the default value only makes sense for defined units. So my question would be if I have MPa and N/mm^2 in the same environment with the same definitions, which one would the code pick? And would I be able to use the .to() method to choose between them?

    • @Son96601
      @Son96601 Месяц назад

      @connorferster I have tried to add a symbol line to the MPa in the structural environment. However, it does not work. Furthermore, when I call forallpeople.environment(), the MPa is shown to equal 1.000Pa instead of 1N/mm^2. It seems that the library is linked to the unit case, in other words when I add a symbol of N/m^2 to the Pa unit, everything will follow this, so if something is in MPa it will be given MN/m^2 units. Is there no way to force the use of N/mm^2 when the definition of MPa is found in the calculations?

  • @iamyou6555
    @iamyou6555 2 месяца назад

    Very insightful. Where can we find more videos like this? I'm trying to think of a dissertation idea and some of this is helping me

  • @1970mza
    @1970mza 2 месяца назад

    Hi Connor I am using Quarto to render the equations in pdf. As some of the equations are quite long, the last part of the equations is missing in the pdf. Is there a way to wrap the equations within the page width. Thanks

  • @Erikos45
    @Erikos45 3 месяца назад

    Tried it in vscode + Juypter notebook. Cannot get exporting to html to work. Any ideas?

    • @Erikos45
      @Erikos45 3 месяца назад

      Nevermind, it was a thing with my jupyter installation, it works now. Doing 1) pip insteall nbconvert, and then 2) pip install --upgrade jupyter nbconvert, solved it for me.

    • @Son96601
      @Son96601 Месяц назад

      Hi, are you able to get it to print to html without the cells?

    • @Son96601
      @Son96601 Месяц назад

      ​@@Erikos45 Hello, did you manage to get it to print to html without showing the cells?

  • @chandrasajana2299
    @chandrasajana2299 4 месяца назад

    superb!!!!

  • @charliearmour1628
    @charliearmour1628 4 месяца назад

    Excellent, thank you.

  • @kisho2679
    @kisho2679 4 месяца назад

    Can SageMath be used?

  • @tingdongyan7502
    @tingdongyan7502 5 месяцев назад

    Replaced mathcad, I can't afford its price. Thanks! I wanna mask some value when converting units, cz it will not give the final units I wanted. I am doing X=X.to("units") to convert the units, but it gives me an extra X=YY。Could you please tell me how to mask this extra line?

  • @buscandolaverdad8295
    @buscandolaverdad8295 5 месяцев назад

    Awesome, thank you for the video

  • @isaiah7577
    @isaiah7577 5 месяцев назад

    Hi Connor! Thank you for this resource. I noticed your latex outputs are aligned left, instead of aligned centered. What should I change in "set_option()" to align text left as you have it? handcalcs.set_option("math_environment_start", "aligned" ) handcalcs.set_option("math_environment_end", "aligned" )

    • @ThomBindels
      @ThomBindels 3 месяца назад

      Hi Isaiah, you can change both "aligned" options to "flalign". Similar to how you would do it normally in a LaTeX document itself, you simply change the math environment it uses to render the equations.

    • @Son96601
      @Son96601 28 дней назад

      @@ThomBindels This did not work, is 'flalign' the correct keyword?

  • @MrWebon
    @MrWebon 8 месяцев назад

    Do more videos

  • @darl6000
    @darl6000 8 месяцев назад

    Why he is not makin videos 😭😭

  • @zaw-osmo4kYT
    @zaw-osmo4kYT 8 месяцев назад

    I am a student doing my final year project for tunnel analysis visualization and generating defects reports by editing python codes. I have always been so tired of doing manual calculations for my school work. I seriously need to learn programming to work more efficiently. Thanks a lot for inspiration.

  • @SOMDailyDiary
    @SOMDailyDiary 9 месяцев назад

    How to align the rendered equations to left??

  • @farmGits
    @farmGits 9 месяцев назад

    This is awesome! I have much work to do

  • @trippstreehouse
    @trippstreehouse 9 месяцев назад

    handcalcs is sexy. gonna be useful for my engineering degree.

  • @ATANVARNO8801
    @ATANVARNO8801 10 месяцев назад

    Thanks a lot Connor, i admire your work, this library its extremely useful, i've been working with it and i've found an issue i would like to ask you about: I've modified the structural environment trying to include some new units as kgf, kgf/m and kgf/m2 because, unfortunately, this units are commonly used in my daily calculations, my aproach has been this: "kgf": { "Dimension": [1,1,-2,0,0,0,0], "Factor": "0.10197", "Symbol": "kgf"}, "kgf_m": { "Dimension": [1,0,-2,0,0,0,0], "Factor": "0.101971", "Symbol": "kgf/m"}, "kgf_m2": { "Dimension": [1,-1,-2,0,0,0,0], "Factor": "0.1019716", "Symbol": "kgf/m²"}, However, i've found that sometimes the .to("kgf") or .to("kgf_m") or .to("kgf_m2") method works correctly, but sometimes it's stops working and returns to the default SI units (N, N/m, N/m2), i know i'm doing something wrong in the deffinition of the environment but i've been unable to solve it. Thanks in advance for your answer!!!

  • @waltertruenorth
    @waltertruenorth 11 месяцев назад

    Thank you, Connor for creating this library for Python Jupyter users.

    • @connorferster
      @connorferster 11 месяцев назад

      The next goal is handcalcs v2.0...coming 2024!

  • @mikeborzoni2570
    @mikeborzoni2570 11 месяцев назад

    This is unbelievably powerful! Thank you so much! Is there a way of overwriting the units that are rendered? For example, I want 100 Pa shown as 0.1 kPa

    • @connorferster
      @connorferster 11 месяцев назад

      Glad you like it! Yep, for SI units (only), you can choose to set a prefix: p = 0.1 * kPa.prefix("k")

  • @johnovercash1798
    @johnovercash1798 11 месяцев назад

    I was not put in context. Not knowing where the files are you working on and so forth. But I am sure this is interesting for someone who know CTI file for example. For me was no clue where did you start.

  • @IngJGonzalezZorrilla
    @IngJGonzalezZorrilla Год назад

    Hi, nice content, is there any libraries of python that can help with details in dwg or IFC format? For example, draw a beam with reinforcement and export it to dwg. thanks

  • @RickyTeachey
    @RickyTeachey Год назад

    I haven't tried it yet but is there something special about the %%render magic that causes printing to html not to display input cells? Or does Jupyter turn off input cells anytime you print html?

    • @RickyTeachey
      @RickyTeachey Год назад

      Ah nevermind I see it now- it went by so fast: there is a "no input" option when exporting to html. NICE.

  • @malanchini4516
    @malanchini4516 Год назад

    Great! I do my technical report using dash. But I'm getting exited to use these libraries. Thanks!

  • @vishwanathsingh9843
    @vishwanathsingh9843 Год назад

    hi, Unable to load: forallpeople.environment('structural') it says key error: 'Hz' for all people is installed.

  • @vishwanathsingh9843
    @vishwanathsingh9843 Год назад

    hi connor, Great Video! Thanks. I am stuck in the last part where you export just the output [56]. My jupyterlab throws the error "No module named 'handcalcs.install_templates'" installed. can you please help with this, Thanks.

    • @TheunsGideonJudeel
      @TheunsGideonJudeel 4 месяца назад

      Hi Connor & Vishwanath. I've got the same issue. I get the "ModuleNotFoundError". Have you managed to resolve this?

    • @otaviosoares9232
      @otaviosoares9232 4 месяца назад

      Same issue here

    • @Son96601
      @Son96601 Месяц назад

      Hi, did you manage to solve this?

  • @pariskhan
    @pariskhan Год назад

    you are a true genius.

  • @1970mza
    @1970mza Год назад

    Hi Connor When I run the cell symbolic equations are not displayed. I only get the results (e.g. c=0.6). Is there something missing in the installation?

    • @connorferster
      @connorferster Год назад

      You probably need to put spaces around your = sign. Try it and let me know.

    • @1970mza
      @1970mza Год назад

      @@connorferster Thank you. It is working now.

  • @mohamedaminhamidi6585
    @mohamedaminhamidi6585 Год назад

    Hey guys🙂, I'm a first year civil engineering student. Could you please suggest me some key skills to lean in python. I can't like learn everything!

    • @mohamedaminhamidi6585
      @mohamedaminhamidi6585 Год назад

      Up

    • @connorferster
      @connorferster Год назад

      Of course you can learn “everything”! Learning “everything” comes with time. However, you are right, learning literally everything is something no one can achieve. I heard that the creator of Python rates his own knowledge of Python as 8/10. That said, the first thing I always teach is writing functions. This gives your code structure. Try writing some simple calculation functions based on what you are learning in school. Then, naturally, you will be interested in learning how to make your functions do more things (like looping and making decisions with if/elif/else) and you will learn this easily. Focus on writing functions. The output of one function can be the input of another. One function can can have the sole purpose of calling all your other functions. Good luck!

  • @yakupbolukbas182
    @yakupbolukbas182 Год назад

    Thank Connor for works. I run import handcalcs.render but jupyter shows KeyError. what I am doing import handcalcs

  • @vijaykumarm1119
    @vijaykumarm1119 Год назад

    Great video but I am getting Name error while inserting dimensions like L=10m, P=10KN/m**2 like names m , K M/**2 showing like are not defined. Please, assist me.

    • @connorferster
      @connorferster Год назад

      Hi @vijaykumarm1119, it is hard to say exactly what is wrong without seeing your code. However, a NameError refers to the use of variable names that have not been defined. So, I would suspect one of two things: 1) you have not imported forallpeople; 2) if you have imported forallpeople, you did not set the units environment i.e. import forallpeople; forallpeople.environment('structural', top_level=True)

  • @swopnilojha4619
    @swopnilojha4619 Год назад

    Wonderful library. It would be great if we could render one dimension vectors along with their units. I have been doing that in mathcad express using the range variable.

  • @wh1ff78
    @wh1ff78 Год назад

    Hi Connor. I'm currently using handcalcs ver 1.6.5 I'm not well versed in LaTeX. What should I change in these global configurations to get rendered calculations to be left aligned? import handcalcs.render handcalcs.set_option("math_environment_start", "aligned") handcalcs.set_option("math_environment_end", "aligned")

    • @connorferster
      @connorferster Год назад

      It seems to be dependent on your renderer. When I use Mathjax rendering, it seems to be left-aligned by default. When I use the Katex plugin it seems to be centered automatically.

    • @wh1ff78
      @wh1ff78 Год назад

      ​@@connorferster I changed these : handcalcs.set_option("math_environment_start", "aligned") handcalcs.set_option("math_environment_end", "aligned") into "flalign*" And it seems to work well enough. But now I struggled to find how to export to html with nbconvert with Mathjax 3. For some reason even if try to change the cdn into Mathjax 3, nbconvert will still use Mathjax 2.7.7 🥲

  • @jandomeracki1472
    @jandomeracki1472 Год назад

    Hi Connor. I see You use Bluebeam Revu. I wander if there is a way to automate certain boring and repeatable tasks in said programme (eg. updating titleblocks etc.)? Thanks!

  • @CycleTom
    @CycleTom Год назад

    Looks great but I can only get a render of the answer i.e. c = 0.6. The rest of the equations are not being generated? LAtex works ok using $ signs. Can you help?

    • @connorferster
      @connorferster Год назад

      Are there spaces around your “=“ sign? c = your_equation, not c=your_equation. Does it work when you put the extra spaces in?

    • @ismaelzarate9982
      @ismaelzarate9982 6 месяцев назад

      @@connorferster Thank you for the answer! I had the same issue until you mentioned the use of extra_spaces in the expression. Again, thank you for this powerful tool!

  • @troypiggins
    @troypiggins Год назад

    Your video has inspired me to learn python/jupyter for my civil and structural engineering calculations. I have followed your video as best I can, but am having 2 issues: 1. The renders are not printing out the formula, always just the answer, for example S_x=b*d*2/6 just outputs Sx=133333.333m3 instead of the formula with variables, then the answer. %%render symbolic prints the formula, but no answer. Can anyone assist? 2. The greek symbol substitution doesn't seem to be working for me. I get a NameError: name 'alpha' is not defined. Can anyone assist?

    • @connorferster
      @connorferster Год назад

      Hi @troypiggins, 1. Try writing your formula with spaces around the = sign. Like, S_x = b*d**2/6 instead of S_x=b*d**2/6 2. A name error is saying that the variable name “alpha” is not yet defined. Check two things: * You have “alpha = …” somewhere in your code before you have “something = alpha …” somewhere else. * If you do have the above, make sure that the “alpha = …” code cell is run before the “something = alpha …” cell. * If you do have the above, make sure that in the event the “alpha = …” code is under and if statement that the code under the if is actually being run. Hope that helps!

    • @troypiggins
      @troypiggins Год назад

      @@connorferster thanks so much for response. I ended up discovering the solution for 1 by accident after experimenting, and 2 makes sense.

  • @alexeysapego585
    @alexeysapego585 Год назад

    Пошол устанавливать jupyterlab

  • @boltering6803
    @boltering6803 Год назад

    Hello. Great module! Is it possible to render variables containing non-ASCII characters? Currently, if such a variable is used in an expression, only the name of the variable and the result are rendered, without an intermediate formula.

    • @connorferster
      @connorferster Год назад

      Thanks for bringing this up. I will be updating the parser in v3.0 to handle (most) of these scenarios. At that point, the limitation will be on what can be rendered by Katex or Mathjax.

  • @LincolnCrusader
    @LincolnCrusader Год назад

    Hello Connor, is there a way we can use your library with pycharm for a desktop application?

  • @cleisonarmandomanriqueagui7502

    Amazing . How can I show results in cm^2 instead of m^2 . I know the .prefix('c') . Nothing seems to show the results in cm^2 .... I finally got the answer

    • @Son96601
      @Son96601 Месяц назад

      Hi can you explain the answer please?

  • @amolnwagh
    @amolnwagh Год назад

    Can we legally use individual version of anaconda distribution on office computer? Or do we need to purchase a commercial licence?

  • @1970mza
    @1970mza Год назад

    Hi Connor, Thank for the handcalcs library. However, I get the message that module install_html is not defined. Can you please comment what could be the issue?

    • @1970mza
      @1970mza Год назад

      I found my answer in the comments below.

    • @connorferster
      @connorferster Год назад

      This is an old video. No need to install anything😀