Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modal solution in Exodus format #8

Open
BooleanMind opened this issue Jan 18, 2025 · 1 comment
Open

Modal solution in Exodus format #8

BooleanMind opened this issue Jan 18, 2025 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@BooleanMind
Copy link

BooleanMind commented Jan 18, 2025

What software should I use to obtain a modal solution in Exodus format for use with the Rattlesnake software from Sandia National Laboratories? Is there a specific FEM solver recommended for this purpose? Are there any tools available to convert a .op2 file from Nastran to Exodus format?

@BooleanMind BooleanMind added the question Further information is requested label Jan 18, 2025
@dprohe
Copy link
Collaborator

dprohe commented Jan 29, 2025

Exodus is an output from a variety of Sandia finite element and other analysis codes, so it is admittedly not incredibly useful outside of Sandia. The Trilinos project uses it (https://github.com/trilinos/Trilinos) but since that project is essentially a collection of solvers, you'd be basically writing your own FE code at that point.

The Sandia SEACAS toolset looks like it might have something to convert Nastran to Exodus: https://sandialabs.github.io/seacas-docs/sphinx/html/index.html#nas2exo, https://github.com/trilinos/Trilinos/blob/b9ef0e90657a91a82104f94f10b796dadeb6f62b/packages/seacas/applications/nas2exo/nas2exo.C#L4. I've never used that tool before so I'm not sure exactly how it works.

That being said, depending on your goal, I'm not sure it's worth the effort to compile Trilinos/SEACAS for what you're trying to do. I would instead suggest you use one of Rattlesnake's other virtual solution methods (SDynPy System or State Space Matrices). SDynPy (https://github.com/sandialabs/sdynpy) in particular makes it really easy to transform modal results into dynamic systems that Rattlesnake can simulate

If your goal is to actually simulate Rattlesnake controlling to a test article you are interested in and have modal results for in Nastran, my approach would be:

  1. Use a tool like pynastran (https://pynastran-git.readthedocs.io/en/latest/index.html) to read the modal solution from .op2. You'd want to extract the modal mass, frequencies, and mode shapes from the analysis. If your model has damping, grab that too, otherwise assume a modal damping ratio.
  2. Use the modal mass, frequencies, damping ratios, and mode shapes to construct a SDynPy ShapeArray object (https://sandialabs.github.io/sdynpy/_autosummary/sdynpy.core.sdynpy_shape.shape_array.html#sdynpy.core.sdynpy_shape.shape_array)
  3. You can then transform the ShapeArray object into a SDynPy System object using the system() method, which builds a modal system. https://sandialabs.github.io/sdynpy/_autosummary/sdynpy.core.sdynpy_shape.ShapeArray.html#sdynpy.core.sdynpy_shape.ShapeArray.system.
  4. You can then save the System object to a file that can be loaded by Rattlesnake: https://sandialabs.github.io/sdynpy/_autosummary/sdynpy.core.sdynpy_system.System.html#sdynpy.core.sdynpy_system.System.save
  5. You can load in a SDynPy System object into Rattlesnake per Appendix C in the Rattlesnake user's manual.

Alternatively if you don't want to use SDynPy, you could define your synthetic system using a set of State Space matrices. Appendix D in the User's Manual shows this approach, particularly equations (D.4) through (D.7).

If your goal is to simply simulate testing to learn how to use Rattlesnake or develop control laws, then it perhaps doesn't matter exactly what virtual system you are simulating, and I would suggest generating a simple system using SDynPy's demo systems(https://sandialabs.github.io/sdynpy/_autosummary/sdynpy.demo.html#module-sdynpy.demo) or beam systems (https://sandialabs.github.io/sdynpy/_autosummary/sdynpy.core.sdynpy_system.System.html#sdynpy.core.sdynpy_system.System.beam).

Let me know if you have any other questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants