SteveDoyle2 / pyNastran

A Python-based interface tool for Nastran's file formats
Other
391 stars 153 forks source link

Support for STEP case control command and NLSTEP bulk data entry (SOL 400) #686

Open fmamitrotta opened 2 years ago

fmamitrotta commented 2 years ago

Summary

It seems that the STEP case control command, which delimits and identifies a nonlinear analysis step for SOL 400, is not supported at the moment. A sequence of STEP commands below a SUBCASE command allows to define a loading sequence where the solution of any STEP is a continuation of the solution of the previous STEP. This is analogous to how SUBCASEs work in SOL 106.

Furthermore it seems also that the NLSTEP card is not supported at the moment, which is used to define the nonlinear analysis parameters in SOL 400.

Reproduction

If you try to read the attached bdf file with the read_bdf function you will observe the following: KB8021539_pitchfork_bifurcation_arclength.zip

I assume that also the read_op2 function does not support reading the results of this kind of analysis.

Versions

platform.python_version() --> 3.8.12 pyNastran.__version__ --> 1.4.0+dev.no.checksum.error (this commit)

Feature development

I am using MSC Nastran v2021.4 but I I know that both STEP and NLSTEP were there also in v2018, so I presume they are not very new. I would be very happy to work on the development of the support for these functionalities if that is fine, but I guess we should first agree on the strategy for the implementation.

In my opinion there should be a steps property in the Subcase class, that should be a dictionary. This dictionary should have as keys the ids of the STEP commands and as values the corresponding Step objects, where the Step class has to be developed from scratch. In this way the steps structure will be analogous to the current subcases structure. The NLSTEP card should be analgous to something like the NLPARM card.

Could this work? Of course the idea above would be on the "bdf" side, while on the "op2" side I have not thought of anything yet.

SteveDoyle2 commented 2 years ago

I didn't see a STEP until 2020, which I got limited access to it. I don't regularly use MSC, so I never added support for it.

I think your approach makes sense. It sounds very much like the distinction between the current CaseControlDeck and Subcase classes. A few questions:

fmamitrotta commented 2 years ago

Yes indeed, I think the distinction should be analogous to the one between the current CaseControlDeck and Subcase classes. Regarding your questions, MSC Nastran 2021.3 Online Help states the following:

  1. The STEP command can only be used in nonlinear solution sequence SOL 400 (NONLIN).
  2. The STEP command is to be used below the SUBCASE Case Control command. If no SUBCASE is specified, MSC Nastran creates a default SUBCASE 1.
  3. The STEP identification number n in a SUBCASE must be in increasing order, and less than 9999999.
  4. The following example illustrates a typical application of SUBCASE and STEP:
    SUBCASE 1
    STEP 1
      LOAD = 1
    STEP 2
      LOAD = 2
    SUBCASE 2
    STEP 10
      LOAD = 10
    STEP 20
      LOAD = 20
  5. The solutions of all SUBCASEs are independent of each other. However, the solution of any STEP is a continuation of the solution of the previous STEP.

So I would say that yes, a STEP defined without any SUBCASE should be sticked inside the SUBCASE 1 that gets created. Regarding what can be defined in a STEP, I would say only LOAD case control command and nothing else. I am actually not 100% sure about this, but I would implement this first and then add other possibilities on a need basis. Do you agree?

SteveDoyle2 commented 2 years ago

No I don't. I'm almost certain the NLSTEP can appear in the STEP block. Knowing Nastran, I wouldn't be shocked if you can change boundary conditions and output requests as well.

fmamitrotta commented 2 years ago

I can confirm that you can have a NLSTEP in the STEP block. I have to investigate about other case control commands.

SteveDoyle2 commented 2 years ago

Has there been any progress on this?

fmamitrotta commented 2 years ago

Hello Steve, not yet unfortunately, as I have not worked with SOL 400 in the last months, but I want to work on this feature sooner or later. By the way, in relation to your older question regarding what can be defined in a STEP vs a regular SUBCASE, looking at some example bdf files from MSC, it looks like you can define anything that you usually define in a SUBCASE (see attached file).

nug_59a.txt