pyNastran icon indicating copy to clipboard operation
pyNastran copied to clipboard

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

Open fmamitrotta opened this issue 3 years ago • 6 comments

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

  • only the last STEP command of SUBCASE 1 is read;
  • the corresponding key of the params dictionary (it's a property of the Subcase object) is not 'STEP' but an empty string, while the value is the following list ['STEP 5', None, 'KEY-type'];
  • the NLSTEP card is found in the reject_lines property of the BDF object.

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.

fmamitrotta avatar Feb 17 '22 11:02 fmamitrotta

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:

  • Can you have a STEP outside of a SUBCASE? The default SUBCASE id is 1, so if you don't specify a SUBCASE, it'll write the result with SUBCASE=1. My guess is you'd want to stick that STEP inside SUBCASE 1 in that case.
  • What can be defined in a STEP vs. a regular SUBCASE?

SteveDoyle2 avatar Feb 17 '22 20:02 SteveDoyle2

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
  1. 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?

fmamitrotta avatar Feb 19 '22 19:02 fmamitrotta

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.

SteveDoyle2 avatar Feb 27 '22 03:02 SteveDoyle2

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

fmamitrotta avatar Feb 28 '22 20:02 fmamitrotta

Has there been any progress on this?

SteveDoyle2 avatar Jul 04 '22 23:07 SteveDoyle2

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

fmamitrotta avatar Jul 05 '22 15:07 fmamitrotta