Jupyter Notebook
Posted: Sat Jan 02, 2021 10:50 pm
This is a tool I use occasionally for some more complex calculations, when I need something more fancy than Excel.
My work colleague introduced me to Jupyter Notebook.
An "online server" runs the Python kernel, and presents to you (via a web browser) the Notebook interface. Typically both sides can run on the same machine, but this is not obligatory. I'm running this on Windows 10, but other platforms work too.
You can type code in cells, the code is then executed when you click Run, and then results can be printed to the next cell below.
In this environment, libraries such as numpy are available to facilitate scientific calculations.
This is all free of course, which is a good thing. I know some guys who learned Matlab, and now they are addicted to a high-dollar drug... that's kind of like my unfortunate relationship with SolidWorks.
I'm not really a Python guy, but there are many examples and tutorials available on the Internet if you get stuck.
Here I am doing a simulation. I am considering drilling my brake rotors with holes drilled between the vanes. 37 vanes = 37 holes. 37 is a prime number, so I cannot repeat a hole pattern to ensure balance (that would be too easy).
So up top, I write some code; it's randomly rearranging hole positions, and finding the resultant centre of mass of the holes: Here is a result obtained after all afternoon trying things: So that's like having an imbalance of a drilled hole 0.002 mm off-centre.
It took 159323763 iterations to find this result.
My work colleague introduced me to Jupyter Notebook.
An "online server" runs the Python kernel, and presents to you (via a web browser) the Notebook interface. Typically both sides can run on the same machine, but this is not obligatory. I'm running this on Windows 10, but other platforms work too.
You can type code in cells, the code is then executed when you click Run, and then results can be printed to the next cell below.
In this environment, libraries such as numpy are available to facilitate scientific calculations.
This is all free of course, which is a good thing. I know some guys who learned Matlab, and now they are addicted to a high-dollar drug... that's kind of like my unfortunate relationship with SolidWorks.
I'm not really a Python guy, but there are many examples and tutorials available on the Internet if you get stuck.
Here I am doing a simulation. I am considering drilling my brake rotors with holes drilled between the vanes. 37 vanes = 37 holes. 37 is a prime number, so I cannot repeat a hole pattern to ensure balance (that would be too easy).
So up top, I write some code; it's randomly rearranging hole positions, and finding the resultant centre of mass of the holes: Here is a result obtained after all afternoon trying things: So that's like having an imbalance of a drilled hole 0.002 mm off-centre.
It took 159323763 iterations to find this result.