Steady State Simulation of Haber-Bosch Reaction - Pragmatic Rust for Engineers - Episode 1

Опубликовано: 07 Январь 2025
на канале: Tim Janus, Janus IT
274
11

In this first episode of the Pragmatic Rust for Engineers series, we start our journey with Haber-Bosch process modelling – it is crucial for our food supply and a focus in tackling climate challenges.

Join us along with @JonathanAyala as we model and simulate this process using Rust. Armed with this knowledge, we will implement a steady-state simulation of the Haber-Bosch reaction using ordinary differential equations (ODEs).

At the end of the Video we can solve ODEs in Rust, and by this we used Rust programming for simulation. As we output to the terminal, an obvious next step is to visualize the results and in the next Video we'll plot our results using yet another Rust Crate, stay tuned!

If you have feedback to the video or any problems during your implementation feel free to reach out with-in the comments and we'll be here to help.

General Learn Goals:
Model a reaction system as ordinary differential equations (ODEs).
Use a ODE-Solver to solve the ODEs. This simulate the reaction system.
Critically Investigate the results of the solver. What about units?

Rust Learn Goals:
Implement and call functions in Rust to modularize your code in Rust.
Implement, instantiate and 'dump' a data structure to the terminal.
Implement a trait of an external crate, here an solver for ODEs, to use it's functionality with custom types.
Coarse words to static type system and ownership

Further Information as Blog Articles:
The Haber-Bosch Process: Revolutionizing Agriculture and Industry https://janus.rs/en/2023/12/the-haber...
Why learning Rust is worthwhile for engineers: https://janus.rs/en/2023/12/why-learn...

Janus IT and friends:
Janus IT and friends that's me, Tim Janus, as your host and guests I will invite such that they can share their knowledge with us. For the first season, our guest will be Jonathan Ayala who will tell us about the exciting Haber-Bosch Process that we'll investigate through this series.

If you think the content is informative and useful to you, then an easy and free way to support us is to leave a like or a comment. You can also subscribe to the channel and be notified if new content is there!

Social and Website Links:
Website: https://janus.rs/en/
Tims Twitter:   / darthb86  
Tims LinkedIn:   / tim-janus-07523b13  
Jonathans LinkedIn:   / jonathan-ayala-b679426b  

Chapters:
0:00 Video Series Highlights in fast cuts
0:15 Introduction: Who are Tim Janus and Jonathan Ayala and what is in the Series?
1:22 The Haber-Bosch Process in a nutshell
3:23 Theory and Process Modelling for the Steady-state Haber-Bosch Reaction
6:14 Ordinary Differential Equations of the Haber-Bosch Reaction System
6:49 Why Rust?
7:41 Discover the learning materials on GitHub
12:35 Programm the Arrhenius function in Rust (and add a dependency)
18:50 Add a data structure in Rust to represent our Haber-Bosch Process Model
21:40 Implement the System trait of the ode_solvers Crate and by this implement ODEs in Rust
25:38 Calling the ODE-Solver with our Haber-Bosch model
29:18 Fix some mistakes and print out the Rust simulation results
32:44 Some words on units for concentration balance equations and the Outro


References:
https://github.com/DarthB/pragmatic_r... - GitHub Repository containing the learning materials and much more information, references, etc. See the readme.md and the corresponding tasks.md in the repository.
https://github.com/srenevey/ode-solvers - GitHub Repository of the Crate we will be using as ODE-solver implementation.
https://janus.rs/en/2023/12/the-haber... - Blog Article by Jonathan Ayala - The Haber-Bosch Process: Revolutionizing Agriculture and Industry
https://janus.rs/en/2023/12/why-learn... - Blog Article by Tim Janus - Why learning Rust is worthwhile for engineers