Closed fmamitrotta closed 6 months ago
Ahh...MSC changed things to be difficult. In the 2005r2 QRG, it's got a max of 6 elements. In 2018, it supports unlimited.
NX/Simcenter supports only 6 elements per card.
Oh wow, didn't think about this possibility!
What do you reckon? Should there be a check on the Nastran version then?
I'm tempted to just ignore that issue (and use your fix) and just leave that to the user with a note in the add_card method. It's a pain to access the model in the card init. MSC and NX are not that different and with enough time, Siemens will add it.
Lemme think about it more.
I see your point and I think it makes sense in this case!
No worries, I've implemented a temporary fix in my local version for the moment.
Happy to open a pull request if and when you are definitely conviced of the solution.
I think temporary is fine. Can you make a pull request? Just add a note to the init, add_card, and raw_fields in the PLOAD2 class and the add_pload2 method in the bdf_interface/add_card.py file.
Pull request made with the notes that you requested 😊
Fixed with #763
Summary
The implementation of the PLOAD2 card in pyNastran supports either a maximum of 6 elements with non-consecutive ids or unlimited elements with consecutive ids. This does not reflect the behavior of Nastran's PLOAD2 card, which supports an unlimited number of elements with non-consecutive ids.
I do understand that when having a large number of elements assigned to a PLOAD2 card it would be a good practice to have consecutive ids and use the THRU keyword instead of writing a large number of ids in the bdf file. However, it's not always practical to control the numbering of the element ids in medium to large finite element models. Sometimes (like in my case) you have a number of adjacent elements that don't have consecutive ids, but you might still want to apply a pressure load over those elements.
For this reason it would be good to change pyNastran's implementation in order to reflect Nastran's behavior.
Proposed solution
My proposal is that pyNastran should only distinguish between the case where the user has provided a list of consecutive element ids, and in that case use the word THRU when writing the bdf file, and the case where the user has provided a list of non-consecutive ids, and in that case just write the plain list of element ids in the bdf file.
I would change the
add_card
method of thePLOAD2
class in the following way.And the
raw_fields
method in the following way.Versions
platform.python_version()
--> 3.9.16pyNastran.__version__
--> 1.4.0+dev.no.checksum.error (this commit)