mass Module

Inheritance diagram of pyNastran.bdf.cards.properties.mass

All mass properties are defined in this file. This includes:

  • NSM
  • PMASS

All mass properties are PointProperty and Property objects.

class pyNastran.bdf.cards.properties.mass.NSM(sid, nsm_type, pid_eid, value, comment='')[source]

Bases: pyNastran.bdf.cards.properties.mass.NSMx

Defines a set of non structural mass.

1 2 3 4 5 6 7 8 9
NSM SID TYPE ID VALUE ID VALUE ID VALUE

See NSMx

classmethod _init_from_empty()[source]
_properties = ['ids']
type = 'NSM'
class pyNastran.bdf.cards.properties.mass.NSM1(sid, nsm_type, value, pid_eid, comment='')[source]

Bases: pyNastran.bdf.cards.properties.mass.NSM1x

Defines a set of non structural mass.

1 2 3 4 5 6 7 8 9
NSM1 SID TYPE VALUE ID ID ID ID ID
  ID ID ID etc        

See NSM1x

classmethod _init_from_empty()[source]
type = 'NSM1'
class pyNastran.bdf.cards.properties.mass.NSM1x(sid, nsm_type, value, ids, comment='')[source]

Bases: pyNastran.bdf.cards.base_card.Property

Common class for NSM1 and NSML1

Creates an NSM1/NSML1 card

Parameters:
sid : int

Case control NSM id

nsm_type : str

Type of card the NSM is applied to valid_properties = {

PSHELL, PCOMP, PBAR, PBARL, PBEAM, PBEAML, PBCOMP, PROD, CONROD, PBEND, PSHEAR, PTUBE, PCONEAX, PRAC2D, ELEMENT

}

value : float

NSM1: the non-structural pass per unit length/area NSML1: the total non-structural pass per unit length/area;

the nsm will be broken down based on a weighted area/length

ids : List[int]

property ids or element ids depending on nsm_type

comment : str; default=’‘

a comment for the card

Type

gets the nsm_type

classmethod add_card(card, comment='')[source]

Adds a NSM1/NSML1 card from BDF.add_card(...)

Parameters:
card : BDFCard()

a BDFCard object

comment : str; default=’‘

a comment for the card

cross_reference(self, model)[source]
raw_fields(self)[source]
repr_fields(self)[source]

Gets the fields in their simplified form

Returns:
fields : List[varies]

the fields that define the card

valid_properties = ['PSHELL', 'PCOMP', 'PBAR', 'PBARL', 'PBEAM', 'PBEAML', 'PBCOMP', 'PROD', 'CONROD', 'PBEND', 'PSHEAR', 'PTUBE', 'PCONEAX', 'PRAC2D', 'ELEMENT']
write_card(self, size=8, is_double=False)[source]

Writes the card with the specified width and precision

Parameters:
size : int (default=8)

size of the field; {8, 16}

is_double : bool (default=False)

is this card double precision

Returns:
msg : str

the string representation of the card

class pyNastran.bdf.cards.properties.mass.NSMADD(sid, sets, comment='')[source]

Bases: pyNastran.bdf.cards.base_card.BaseCard

Defines non structural mass as the sum of the sets listed.

1 2 3 4
NSMADD 2 1 3

Creates an NSMADD card, which sum NSM sets

Parameters:
sid : int

the NSM Case Control value

sets : List[int]

the NSM, NSM1, NSML, NSML1 values

comment : str; default=’‘

a comment for the card

classmethod _init_from_empty()[source]
_properties = ['nsm_ids']
classmethod add_card(card, comment='')[source]

Adds a NSMADD card from BDF.add_card(...)

Parameters:
card : BDFCard()

a BDFCard object

comment : str; default=’‘

a comment for the card

cross_reference(self, model)[source]

Cross links the card so referenced cards can be extracted directly

Parameters:
model : BDF()

the BDF object

nsm_ids

gets the nonstructural-mass ids

raw_fields(self)[source]
safe_cross_reference(self, model, debug=True)[source]
type = 'NSMADD'
uncross_reference(self)[source]

Removes cross-reference links

write_card(self, size=8, is_double=False)[source]

Writes the card with the specified width and precision

Parameters:
size : int (default=8)

size of the field; {8, 16}

is_double : bool (default=False)

is this card double precision

Returns:
msg : str

the string representation of the card

write_card_16(self, is_double=False)[source]
class pyNastran.bdf.cards.properties.mass.NSML(sid, nsm_type, pid_eid, value, comment='')[source]

Bases: pyNastran.bdf.cards.properties.mass.NSMx

Defines a set of lumped non structural mass.

1 2 3 4 5 6 7 8 9
NSML SID TYPE ID VALUE ID VALUE ID VALUE

Creates an NSML card, which defines lumped non-structural mass

Parameters:
sid : int

Case control NSM id

nsm_type : str

Type of card the NSM is applied to valid_properties = {

PSHELL, PCOMP, PBAR, PBARL, PBEAM, PBEAML, PBCOMP, PROD, CONROD, PBEND, PSHEAR, PTUBE, PCONEAX, PRAC2D, ELEMENT

}

pid_eid : int

property id or element id depending on nsm_type

value : float

the non-structural pass per unit length/area

comment : str; default=’‘

a comment for the card

classmethod _init_from_empty()[source]
_properties = ['ids']
type = 'NSML'
class pyNastran.bdf.cards.properties.mass.NSML1(sid, nsm_type, value, ids, comment='')[source]

Bases: pyNastran.bdf.cards.properties.mass.NSM1x

Defines lumped non structural mass entries by VALUE,ID list.

1 2 3 4 5 6 7 8 9
NSML1 SID TYPE VALUE ID ID ID ID ID
  ID ID ID etc        
NSML1 3 ELEMENT .044 1240 1500      
NSML1 SID TYPE VALUE ID THRU ID ID THRU
  ID ID THRU ID ID THRU ID ID
  THRU ID          
NSML1 15 PSHELL .067 1240 THRU 1760    
  2567 THRU 2568 35689 THRU 40998    
  76 THRU 300          
NSML1 SID TYPE VALUE ID THRU ID BY N
  ID THRU ID BY N      
NSML1 3 PSHELL .067 1240 THRU 1760 1763 1764
  2567 THRU 2568 35689 TO 40999 BY 2
  76666 76668 79834          

Creates an NSML card, which defines lumped non-structural mass

Parameters:
sid : int

Case control NSM id

nsm_type : str

Type of card the NSM is applied to valid_properties = {

PSHELL, PCOMP, PBAR, PBARL, PBEAM, PBEAML, PBCOMP, PROD, CONROD, PBEND, PSHEAR, PTUBE, PCONEAX, PRAC2D, ELEMENT

}

value : float

the non-structural pass per unit length/area

ids : List[int]

property ids or element ids depending on nsm_type

comment : str; default=’‘

a comment for the card

classmethod _init_from_empty()[source]
type = 'NSML1'
class pyNastran.bdf.cards.properties.mass.NSMx(sid, nsm_type, pid_eid, value, comment='')[source]

Bases: pyNastran.bdf.cards.base_card.Property

Common class for NSM and NSML

Creates an NSM/NSM1 card

Parameters:
sid : int

Case control NSM id

nsm_type : str

Type of card the NSM is applied to valid_properties = {

PSHELL, PCOMP, PBAR, PBARL, PBEAM, PBEAML, PBCOMP, PROD, CONROD, PBEND, PSHEAR, PTUBE, PCONEAX, PRAC2D, ELEMENT

}

pid_eid : int

property id or element id depending on nsm_type

value : float

the non-structural pass per unit length/area

comment : str; default=’‘

a comment for the card

Type

gets the nsm_type

classmethod add_card(card, icard=0, comment='')[source]

Adds an NSM card from BDF.add_card(...)

Parameters:
card : BDFCard()

a BDFCard object

icard : int; default=0

the index of the card that’s being parsed

comment : str; default=’‘

a comment for the card

cross_reference(self, model)[source]
ids
raw_fields(self)[source]
repr_fields(self)[source]

Gets the fields in their simplified form

Returns:
fields : List[varies]

the fields that define the card

valid_properties = ['PSHELL', 'PCOMP', 'PBAR', 'PBARL', 'PBEAM', 'PBEAML', 'PBCOMP', 'PROD', 'CONROD', 'PBEND', 'PSHEAR', 'PTUBE', 'PCONEAX', 'PRAC2D', 'ELEMENT', 'PDUM8']

Set points to either Property entries or Element entries. Properties are:

write_card(self, size=8, is_double=False)[source]

Writes the card with the specified width and precision

Parameters:
size : int (default=8)

size of the field; {8, 16}

is_double : bool (default=False)

is this card double precision

Returns:
msg : str

the string representation of the card

class pyNastran.bdf.cards.properties.mass.PMASS(pid, mass, comment='')[source]

Bases: pyNastran.bdf.cards.base_card.Property

Scalar Mass Property Specifies the mass value of a scalar mass element (CMASS1 or CMASS3 entries).

1 2 3 4 5 6 7 8 9
PMASS PID1 M1 PID2 M2 PID3 M3 PID4 M4
PMASS 7 4.29 6 13.2        

Creates an PMASS card, which defines a mass applied to a single DOF

Parameters:
pid : int

Property id used by a CMASS1/CMASS3 card

mass : float

the mass to apply

comment : str; default=’‘

a comment for the card

Mass(self)[source]
classmethod _init_from_empty()[source]
_properties = ['node_ids']
classmethod add_card(card, icard=0, comment='')[source]

Adds a PMASS card from BDF.add_card(...)

Parameters:
card : BDFCard()

a BDFCard object

icard : int; default=0

the index of the card that’s being parsed

comment : str; default=’‘

a comment for the card

cross_reference(self, model)[source]
pname_fid_map = {3: 'mass'}
raw_fields(self)[source]
repr_fields(self)[source]

Gets the fields in their simplified form

Returns:
fields : List[varies]

the fields that define the card

type = 'PMASS'
uncross_reference(self)[source]

Removes cross-reference links

write_card(self, size=8, is_double=False)[source]

Writes the card with the specified width and precision

Parameters:
size : int (default=8)

size of the field; {8, 16}

is_double : bool (default=False)

is this card double precision

Returns:
msg : str

the string representation of the card