Extracting aset for sol103 with pyNastran

257 views
Skip to first unread message

Tristan Drogies

unread,
Apr 11, 2023, 8:53:16 AM4/11/23
to pyNastran Discuss

Hello everyone,

 I am currently using pyNastran for my master thesis in the field of model order reduction for dynamic second order systems and can  extract the mass and stiffness matrix (KAA, MAA) from MSC Nastran sol103 with the use of the OP4 reader. My problem is that the extracted matrices match the dimension of the aset matrices, but the number of non zero elements differ.

My question is if it is possible to write the aset in an OP2 or OP4 and extract the matrices in pyNastran?
How do I need to modify my .dat file for sol103 to get the  aset either as OP2 or OP4?

Thank you so much for your time and the hard work on pyNastran, the software helped me a lot for my thesis. 

Steven Doyle

unread,
Apr 11, 2023, 11:17:00 AM4/11/23
to pynastra...@googlegroups.com
Glad you like it!

You can matrices from the OP4 and OP2.  I prefer using the op2.  Unfortunately, you have to fight DMAP, which is a difficult programming language in Nastran.

What do you mean the number of nonzero elements differ?  Differ from what?  The F06 or a hand calc?  Nastran is not a simple code, so I’d start by simplifying the problem.  Does KGG match?  Does it work for a single CROD element?

--
You received this message because you are subscribed to the Google Groups "pyNastran Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pynastran-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pynastran-discuss/e0d3c5df-ca83-494a-a0dc-8ffd0889c5c4n%40googlegroups.com.

Paul Blelloch

unread,
Apr 11, 2023, 12:18:15 PM4/11/23
to pyNastran Discuss
There are lots of ways of getting KAA and MAA out of Nastran.  If you're using EXTSEOUT you can choose the MATOP4, DMIGOP2 or DMIGPCH option.  The MATOP4 option lists the ASET in the .pch file.  The DMIGPCH option outputs the matrices in DMIG format to the .pch file, and those are labeled with the ASET rows and columns.  The DMIGOP2 format writes the same data to an OP2 file, but that's very hard to read, and I don't believe that pyNastran supports that.  So use EXTSEOUT and either look in the PCH file for the ASET or use DMIGPCH and look directly at the DMIG matrices.

Paul Blelloch

unread,
Apr 11, 2023, 12:32:02 PM4/11/23
to pyNastran Discuss
P.S. I thought that I'd be a little more specific.  It you use:

EXTSEOUT(MATOP4=id ...

You'll get the ASET cards written to the PCH file.  If you use:

EXTSEOUT(DMIGPCH ...

You'll get the ASET cards written to the PCH file, but the matrices will also be written in DMIG format, so the rows and columns will be labeled with the ASET.  If you use:

EXTSEOUT(DMIGOP2=id, ...

You'll get the matrices written to the OUTPUT2 file in DMIG format, but it's hard to read and I doubt that pyNastran handles it.  The issue is that all the datablocks are labeled as EXTDB, and you have to use the XSOPDIR datablock as a dictionary to identify them.  If you do read them, they come in as DMIG so the rows and columns are labeled with the ASET DOF.

Another way to look at the ASET is to use PARAM,USETPRT,0.  That will print all the sets to the F06 file.  You can use USETSTRi to request specific sets.  I would use EXTSEOUT instead.
Reply all
Reply to author
Forward
0 new messages