Skip to content

Commit 2ebbc1d

Browse files
committed
2 parents 597130d + da3a660 commit 2ebbc1d

File tree

18 files changed

+528
-67
lines changed

18 files changed

+528
-67
lines changed

models/nx/sol401/sol401_tstep1.dat

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
ID,NASTRAN,model2_sim1-solution_1
2+
SOL 401
3+
CEND
4+
ECHO = NONE
5+
RIGID = AUTO
6+
TEMP(INIT) = 1
7+
LOAD = 100
8+
SPC = 100
9+
DISPLACEMENT(PLOT,REAL) = ALL
10+
SPCFORCES(PLOT,REAL) = ALL
11+
STRESS(PLOT,REAL,VONMISES,CENTER) = ALL
12+
SUBCASE 1
13+
LABEL = Subcase - Nonlinear Statics 1
14+
TSTEP = 101
15+
ANALYSIS = STATICS
16+
SEQDEP = YES
17+
BEGIN BULK
18+
TSTEP1* 1011.0000000000E+00 3 YES+
19+
*
20+
PARAM LGDISP 1
21+
PARAM OIBULK YES
22+
PARAM OMACHPR YES
23+
PARAM POST -2
24+
PARAM POSTEXT YES
25+
PARAM UNITSYS MN-MM
26+
GRID* 1 00.0000000000E+000.0000000000E+00+
27+
* 0.0000000000E+00 0
28+
GRID* 2 0-5.000000000E+010.0000000000E+00+
29+
* 0.0000000000E+00 0
30+
GRID* 3 00.0000000000E+00-5.000000000E+01+
31+
* 0.0000000000E+00 0
32+
GRID* 4 00.0000000000E+005.0000000000E+01+
33+
* 0.0000000000E+00 0
34+
GRID* 5 05.0000000000E+010.0000000000E+00+
35+
* 0.0000000000E+00 0
36+
GRID* 6 0-5.000000000E+015.0000000000E+01+
37+
* 0.0000000000E+00 0
38+
GRID* 7 0-5.000000000E+01-5.000000000E+01+
39+
* 0.0000000000E+00 0
40+
GRID* 8 05.0000000000E+01-5.000000000E+01+
41+
* 0.0000000000E+00 0
42+
GRID* 9 05.0000000000E+015.0000000000E+01+
43+
* 0.0000000000E+00 0
44+
CQUAD4 1 1 9 4 1 5
45+
CQUAD4 2 1 4 6 2 1
46+
CQUAD4 3 1 1 2 7 3
47+
CQUAD4 4 1 5 1 3 8
48+
PSHELL 1 11.000000 11.000000 10.833333 0.0000
49+
MAT1 11.000+10 0.300000
50+
FORCE 2 3 05.0000+7 0.0000-1.00000 0.0000
51+
FORCE 2 7 02.5000+7 0.0000-1.00000 0.0000
52+
FORCE 2 8 02.5000+7 0.0000-1.00000 0.0000
53+
FORCE 3 4 05.0000+7 0.00001.000000 0.0000
54+
FORCE 3 6 02.5000+7 0.00001.000000 0.0000
55+
FORCE 3 9 02.5000+7 0.00001.000000 0.0000
56+
SPC 4 8 123 0.0000
57+
SPC 5 9 13 0.0000
58+
SPC 6 6 3 0.0000
59+
TEMPD 1 20.0000
60+
LOAD 1001.0000001.000000 21.000000 3
61+
SPCADD 100 4 5 6
62+
ENDDATA a015b074

models/nx/sol401/sol401_tstep1.op2

35 KB
Binary file not shown.

pyNastran/bdf/bdf.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
CPLSTS3, CPLSTS4, CPLSTS6, CPLSTS8,
9191
SNORM,)
9292

93-
from .cards.properties.shell import PSHELL, PCOMP, PCOMPG, PSHEAR, PLPLANE, PPLANE, PTRSHL
93+
from .cards.properties.shell import PSHELL, PCOMP, PCOMPG, PSHEAR, PLPLANE, PPLANE, PGPLSN, PTRSHL
9494
from .cards.elements.acoustic import (
9595
CHACAB, CAABSF, CHACBR, PACABS, PAABSF, PACBAR,
9696
ACMODL, PMIC, ACPLNW, AMLREG, MATPOR, MICPNT)
@@ -251,7 +251,7 @@
251251
PBAR | PBARL | PBEAM | PBRSECT |
252252
PBEAML | PBCOMP | PBMSECT |
253253
PBEND | PBEAM3 |
254-
PSHEAR | PPLANE |
254+
PSHEAR | PPLANE | PGPLSN |
255255
PSHELL | PCOMP | PCOMPG |
256256
PSOLID | PLSOLID | PCOMPS | PCOMPLS |
257257
PWELD
@@ -722,7 +722,7 @@ def __init__(self, debug: str | bool | None=True,
722722

723723
## properties
724724
'PMASS',
725-
'PELAS', 'PGAP', 'PFAST', 'PWELD', 'PLPLANE', 'PPLANE',
725+
'PELAS', 'PGAP', 'PFAST', 'PWELD', 'PLPLANE', 'PPLANE', 'PGPLSN',
726726
'PBUSH', 'PBUSH1D', 'PBUSH2D',
727727
'PDAMP', 'PDAMP5',
728728
'PROD', 'PBAR', 'PBARL', 'PBEAM', 'PTUBE', 'PBCOMP', 'PBRSECT', 'PBEND',
@@ -2601,6 +2601,7 @@ def add_card(cls, card: BDFCard, comment: str=''):
26012601
'CPLSTS6': (CPLSTS6, add_methods.add_element_object),
26022602
'CPLSTS8': (CPLSTS8, add_methods.add_element_object),
26032603
'PPLANE': (PPLANE, add_methods.add_property_object),
2604+
'PGPLSN': (PGPLSN, add_methods.add_property_object),
26042605

26052606
'CSHEAR': (CSHEAR, add_methods.add_element_object),
26062607
'PSHEAR': (PSHEAR, add_methods.add_property_object),
@@ -2852,7 +2853,7 @@ def add_card(cls, card: BDFCard, comment: str=''):
28522853
'NLPARM': (NLPARM, add_methods.add_nlparm_object),
28532854
'NLPCI': (NLPCI, add_methods.add_nlpci_object),
28542855
'TSTEP': (TSTEP, add_methods.add_tstep_object),
2855-
'TSTEP1': (TSTEP1, add_methods.add_tstepnl_object),
2856+
'TSTEP1': (TSTEP1, add_methods.add_tstep_object),
28562857
'TSTEPNL': (TSTEPNL, add_methods.add_tstepnl_object),
28572858

28582859
'TF': (TF, add_methods.add_tf_object),

pyNastran/bdf/bdf_interface/add_card.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
from pyNastran.bdf.cards.elements.acoustic import (
5656
CHACAB, CAABSF, CHACBR, PACABS, PAABSF, PACBAR,
5757
ACMODL, ACPLNW, AMLREG, PMIC, MICPNT, MATPOR)
58-
from pyNastran.bdf.cards.properties.shell import PSHELL, PCOMP, PCOMPG, PSHEAR, PLPLANE, PPLANE
58+
from pyNastran.bdf.cards.properties.shell import PSHELL, PCOMP, PCOMPG, PSHEAR, PLPLANE, PPLANE, PGPLSN
5959
from pyNastran.bdf.cards.elements.bush import CBUSH, CBUSH1D, CBUSH2D
6060
from pyNastran.bdf.cards.properties.bush import (
6161
PBUSH, PBUSH1D, PBUSHT, PBUSH2D, PBUSH_OPTISTRUCT)
@@ -338,6 +338,8 @@
338338
'CPLSTS8': CPLSTS8,
339339
'PPLANE': PPLANE,
340340

341+
'PGPLSN': PGPLSN,
342+
341343
'CSHEAR': CSHEAR,
342344
'PSHEAR': PSHEAR,
343345

@@ -3805,10 +3807,10 @@ def add_mathp(self, mid: int,
38053807
return mat
38063808

38073809
def add_mats1(self, mid: int, nl_type: str,
3808-
h, hr, yf, limit1, limit2,
3810+
h, hr, yf, limit1, limit2, strmeas: str | None = None,
38093811
tid: int=0, comment: str='') -> MATS1:
38103812
"""Creates a MATS1 card"""
3811-
mat = MATS1(mid, nl_type, h, hr, yf, limit1, limit2,
3813+
mat = MATS1(mid, nl_type, h, hr, yf, limit1, limit2, strmeas,
38123814
tid=tid, comment=comment)
38133815
self._add_methods.add_material_dependence_object(mat)
38143816
return mat
@@ -7194,6 +7196,15 @@ def add_pplane(self, pid: int, mid: int, t: float=0.0, nsm: float=0.0,
71947196
self._add_methods.add_property_object(prop)
71957197
return prop
71967198

7199+
def add_pgplsn(self, pid: int, mid: int, cgid: int, t: float,
7200+
kn: float | int = 0., kr1: float | int = 0., kr2: float | int = 0.,
7201+
comment: str='') -> PGPLSN:
7202+
"""Creates a PGPLSN card"""
7203+
prop = PGPLSN(pid, mid, cgid=cgid, t=t, kn=kn, kr1=kr1, kr2=kr2, comment=comment)
7204+
7205+
self._add_methods.add_property_object(prop)
7206+
return prop
7207+
71977208
def add_cplstn3(self, eid, pid, nids, theta=0.0, comment='') -> CPLSTN3:
71987209
"""Creates a CPLSTN4 card"""
71997210
elem = CPLSTN3(eid, pid, nids, theta=theta, comment=comment)

pyNastran/bdf/bdf_interface/attributes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@
199199
'PBEAM3',
200200

201201
# 2d
202-
'PLPLANE', 'PPLANE',
202+
'PLPLANE', 'PPLANE', 'PGPLSN',
203203
'PSHELL', 'PCOMP', 'PCOMPG', 'PSHEAR',
204204
'PSOLID', 'PLSOLID', 'PVISC', 'PRAC2D', 'PRAC3D',
205205
'PCOMPS', 'PCOMPLS',
@@ -333,8 +333,8 @@
333333
'dphases': ['DPHASE'],
334334
'nlparms': ['NLPARM'],
335335
'nlpcis': ['NLPCI'],
336-
'tsteps': ['TSTEP'],
337-
'tstepnls': ['TSTEPNL', 'TSTEP1'],
336+
'tsteps': ['TSTEP', 'TSTEP1'],
337+
'tstepnls': ['TSTEPNL'],
338338
'transfer_functions': ['TF'],
339339
'delays': ['DELAY'],
340340
'rotors': ['ROTORG', 'ROTORD'],

pyNastran/bdf/cards/material_deps.py

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from pyNastran.bdf.cards.base_card import BaseCard
2323
from pyNastran.bdf.bdf_interface.internal_get import material_id, table_id
2424
from pyNastran.bdf.bdf_interface.assign_type import (
25-
integer, integer_or_blank, double, double_or_blank, string)
25+
integer, integer_or_blank, double, double_or_blank, string, string_or_blank)
2626
from pyNastran.bdf.field_writer_8 import print_card_8
2727
from pyNastran.bdf.field_writer_16 import print_card_16
2828
if TYPE_CHECKING: # pragma: no cover
@@ -87,12 +87,22 @@ class MATS1(MaterialDependence):
8787
entry is specified with the same MID in a nonlinear solution sequence
8888
(SOLs 106 and 129).
8989
90+
Format (NX Nastran):
91+
+--------+---------+-------+-------+------+-----+-----+--------+--------+
92+
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
93+
+========+=========+=======+=======+======+=====+=====+========+========+
94+
| MATS1 | MID | TID | TYPE | H | YF | HR | LIMIT1 | LIMIT2 |
95+
+--------+---------+-------+-------+------+-----+-----+--------+--------+
96+
| | STRMEAS | | | | | | | |
97+
+--------+---------+-------+-------+------+-----+-----+--------+--------+
98+
9099
"""
91100
type = 'MATS1'
92101

93102
def __init__(self, mid: int, nl_type: Optional[str],
94103
h: float, hr: float, yf: float,
95-
limit1: float, limit2: float,
104+
limit1: Optional[float], limit2: Optional[float],
105+
strmeas: Optional[str] = None,
96106
tid: int=0, comment: str=''):
97107
MaterialDependence.__init__(self)
98108
if comment:
@@ -136,6 +146,11 @@ def __init__(self, mid: int, nl_type: Optional[str],
136146
#: Internal friction angle, measured in degrees, for the
137147
#: Mohr-Coulomb and Drucker-Prager yield criteria
138148
self.limit2 = limit2
149+
150+
#: Stress/strain measure of the TABLES1 or TABLEST data referenced by the TID field.
151+
#: Valid for NX Nastran SOL 401 and SOL 402 only.
152+
self.strmeas = strmeas
153+
139154
self.tid_ref = None
140155
self.mid_ref = None
141156
assert tid is not None
@@ -150,7 +165,8 @@ def _init_from_empty(cls):
150165
yf = None
151166
limit1 = None
152167
limit2 = None
153-
return MATS1(mid, nl_type, h, hr, yf, limit1, limit2, tid=tid, comment='')
168+
strmeas = None
169+
return MATS1(mid, nl_type, h, hr, yf, limit1, limit2, strmeas, tid=tid, comment='')
154170

155171
def validate(self) -> None:
156172
if self.nl_type not in ['NLELAST', 'PLASTIC', 'PLSTRN']:
@@ -191,15 +207,21 @@ def add_card(cls, card: BDFCard, comment: str=''):
191207
h = double_or_blank(card, 4, 'H')
192208
yf = integer_or_blank(card, 5, 'yf', default=1)
193209
hr = integer_or_blank(card, 6, 'hr', default=1)
194-
limit1 = double(card, 7, 'limit1')
210+
limit1 = double_or_blank(card, 7, 'limit1')
195211

196212
if yf in [3, 4]:
197213
limit2 = double(card, 8, 'limit2')
198214
else:
199215
#limit2 = blank(card, 8, 'limit2')
200216
limit2 = None
201-
assert len(card) <= 9, f'len(MATS1 card) = {len(card):d}\ncard={card}'
202-
return MATS1(mid, nl_type, h, hr, yf, limit1, limit2, tid=tid, comment=comment)
217+
218+
if len(card) > 9:
219+
strmeas = string_or_blank(card, 9, 'strmeas')
220+
else:
221+
strmeas = None
222+
223+
assert len(card) <= 10, f'len(MATS1 card) = {len(card):d}\ncard={card}'
224+
return MATS1(mid, nl_type, h, hr, yf, limit1, limit2, strmeas, tid=tid, comment=comment)
203225

204226
@classmethod
205227
def add_op2_data(cls, data, comment: str=''):
@@ -214,7 +236,21 @@ def add_op2_data(cls, data, comment: str=''):
214236
a comment for the card
215237
216238
"""
217-
(mid, tid, nl_type_int, h, yf, hr, limit1, limit2) = data
239+
240+
if len(data) < 9:
241+
(mid, tid, nl_type_int, h, yf, hr, limit1, limit2) = data
242+
strmeas = None
243+
else:
244+
(mid, tid, nl_type_int, h, yf, hr, limit1, limit2, strmeas_int) = data
245+
strmeas_map = {
246+
0: None, # NULL
247+
1: 'UNDEF',
248+
2: 'ENG',
249+
3: 'TRUE',
250+
4: 'CAUCHY',
251+
}
252+
strmeas = strmeas_map[strmeas_int]
253+
218254
if nl_type_int == 1:
219255
nl_type = 'NLELAST'
220256
elif nl_type_int == 2:
@@ -224,7 +260,8 @@ def add_op2_data(cls, data, comment: str=''):
224260
else: # pragma: no cover
225261
raise RuntimeError(f'Invalid Type: mid={mid}; Type={nl_type_int}; must be 1=NLELAST, '
226262
'2=PLASTIC, or 3=PLSTRN')
227-
return MATS1(mid, nl_type, h, hr, yf, limit1, limit2, tid=tid, comment=comment)
263+
264+
return MATS1(mid, nl_type, h, hr, yf, limit1, limit2, strmeas, tid=tid, comment=comment)
228265

229266
def Yf(self) -> str:
230267
d = {1: 'VonMises', 2: 'Tresca', 3: 'MohrCoulomb', 4: 'Drucker-Prager'}
@@ -298,7 +335,7 @@ def Tid(self) -> int:
298335

299336
def raw_fields(self) -> list:
300337
list_fields = ['MATS1', self.Mid(), self.Tid(), self.nl_type,
301-
self.h, self.yf, self.hr, self.limit1, self.limit2]
338+
self.h, self.yf, self.hr, self.limit1, self.limit2, self.strmeas]
302339
return list_fields
303340

304341
def repr_fields(self) -> list:

0 commit comments

Comments
 (0)