Author Topic: Fluid Mechanics Python Library  (Read 5144 times)

0 Members and 1 Guest are viewing this topic.

Offline STAATS

  • LV0 Newcomer (Next: 5)
  • Posts: 3
  • Rating: +0/-0
    • View Profile
Fluid Mechanics Python Library
« on: February 01, 2022, 10:59:20 pm »
In my quest to get some Mechanical Engineering functionality on this calculator I have come across a fluid mechanics library built in Python that can run on MicroPython and hence can mostly port to the TI-Nspire here:

https://github.com/CalebBell/fluids

I have been playing around with it a bit with Vog's MicroPython 1.4.6 port and most of the functions I have tested so far seem to work as intended. This obviously doesn't fully cure the MEPro itch and requires you to run the functions in the MicroPython console or call them into your own Python scripts but it is a good start. I am not very Python skilled so only managed to do enough to setup the libraries and test...

What is the Python integration like on the natively supported CXII? would it allow function outputs to be more easily handed over to TI-BASIC for further work? Is it more limited in coding options then the ndless supported version and hence some of this code may not work in the natively supported module?

At the end I need access to the results these functions can spit out... so I either need to learn my some python and make a more friendly GUI type setup to use the functions and do the analysis I want from beginning to end or I need to find a way to hand the outputs over so then I can access in TI-BASIC to then finish the calculations I want and finalise the analysis in a TI document...

Not sure if its better to persevere with CX and ndless implementation of MicroPython or if the upgrade to CXII and integrated Python support will actually help in this instance or not... Would be good to get input from others.


Offline lolpro11

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 18
  • Rating: +2/-0
    • View Profile
Re: Fluid Mechanics Python Library
« Reply #1 on: February 03, 2022, 01:00:29 pm »
Hello @STAATS, the CXII's python integration is somewhat lacking, being only useable for command-line programs. However, I think the CXII python can store vars inside a document, so that's a plus. TI-BASIC can access vars in the document, meaning that you can probably call a python program from the shell and have its output be directed to TI-BASIC...

But stick with MicroPython as there are still more python features than in the CXII's python :)

Offline STAATS

  • LV0 Newcomer (Next: 5)
  • Posts: 3
  • Rating: +0/-0
    • View Profile
Re: Fluid Mechanics Python Library
« Reply #2 on: February 03, 2022, 08:44:33 pm »
Interesting... I thought that would be the case, but I really need/want a way to pass outputs from a MicroPython function back to somewhere that would be accessible from native TI functions (ie TI-BASIC, Lua, scratchpad, etc).

Is anyone aware of a way to hand information from MicroPython over, maybe write to a TI document?