smdogroup / tacs

Finite-element library for analysis and adjoint-based gradient evaluation
Apache License 2.0
108 stars 75 forks source link

Initialize/Update pyTACS FEAAssembler from BDF object? #243

Closed jaredmagnusson closed 1 year ago

jaredmagnusson commented 1 year ago

Is there a way to initialize or update a pyTACS object from a pyNastran BDF instance, rather than a BDF file?

I'm looking to run a large number of thermal deformation cases for various trade studies, and the runs only differ in initial temperature constraints.

Right now, for each run we are saving a separate BDF file with different SPC temperature cards assigned to it before running TACS. This is getting inefficient as our number of cases grows the file I/O becomes a large fraction of the runtime.

timryanb commented 1 year ago

There isn't a way of doing this now. But this seems like an easy enough feature to add. We can have it so that the pyTACS assembler could be optionally initialized from a pyNastran BDF object rather than a file. You would still need to re-initialize pyTACS every time you modify the BDF file, but that would at least eliminate the fileIO.

Would that work for your case?

jaredmagnusson commented 1 year ago

That would be excellent yes, re-initializing should be fine.

timryanb commented 1 year ago

The feature should be added once PR #245 is merged in

jaredmagnusson commented 1 year ago

Thank you so much

timryanb commented 1 year ago

Closing due to PR #245 being merged