Modal Module in PyChrono

70 views
Skip to first unread message

Matt Tuman

unread,
Aug 22, 2024, 9:24:18 PM8/22/24
to projec...@googlegroups.com
Hello,

I am interested in using the modal module for a project I'm working on with PyChrono. However, it seems that PyChrono currently does not support this module. Are there any plans to add a Python wrapper for the modal module in the future? If not, do you have any ideas on how I might implement this on my own?

Thanks,
Matt

Dan Negrut

unread,
Aug 22, 2024, 9:27:36 PM8/22/24
to Matt Tuman, projec...@googlegroups.com

Matt – we don’t have plans right now, but if you want to help a bit, we can work with you. We would *greatly* appreciate if you chip in.

Dan

---------------------------------------------

Bernard A. and Frances M. Weideman Professor

NVIDIA CUDA Fellow

Department of Mechanical Engineering

Department of Computer Science

University of Wisconsin - Madison

4150ME, 1513 University Avenue

Madison, WI 53706-1572

608 772 0914

http://sbel.wisc.edu/

http://projectchrono.org/

---------------------------------------------

--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/CAO%2Bfy0Q5iU9wYhoxtvgMDnjhAk0sf56TR3nwbvCAOL5yYp0mFA%40mail.gmail.com.

Matt Tuman

unread,
Aug 23, 2024, 11:36:06 AM8/23/24
to Dan Negrut, projec...@googlegroups.com
Hi Dan,

I’d be happy to help! Do you have any reference material that might be useful to help me get started? If so, could you please share it with me? 

Thanks,
Matt

Dan Negrut

unread,
Aug 26, 2024, 3:12:06 PM8/26/24
to Matt Tuman, projec...@googlegroups.com

Matt - The basic idea is this: we use SWIG to generate a shared library of Chrono that is loadable from within Python.

What you can call out of this library depends on what we bothered to expose out of the Chrono solver. What gets exposed is specified through some configuration files, they end in *.i.

Many features are not exposed since nobody needed them.

However, if it makes sense to have Chrono C++ functionality become available in Python, we would need to expose those Chrono classes/methods. This means updating some SWIG configuration file[s].

For instance, in your case, since you are interested in model analysis, the file that needs to updated is likely chrono/src/chrono_swig/interface/fea/ChModuleFea.i

 

The course of action at this point would be:

  • Read a bit about how SWIG works in conjunction with C++
  • Talk offline with Luning Fang lfa...@wisc.edu and Huzaifa unjh...@wisc.edu, they have a bit of experience with this. Moreover, it would be great if the colleagues from Parma step in, I believe this part of the code was put together by them
  • Once you understand what changes need to be done, fork Chrono, make changes at your end, test the implementation, and do a pull request. Then somebody will look at your changes and bring into Chrono if they make sense.

 

Thanks for considering helping us, Matt!

 

Dan

---------------------------------------------

Bernard A. and Frances M. Weideman Professor

NVIDIA CUDA Fellow

Department of Mechanical Engineering

Department of Computer Science

University of Wisconsin - Madison

4150ME, 1513 University Avenue

Madison, WI 53706-1572

608 772 0914

http://sbel.wisc.edu/

http://projectchrono.org/

---------------------------------------------

 

Reply all
Reply to author
Forward
0 new messages