mass Module

digraph inheritance919ccdb959 { bgcolor=transparent; rankdir=LR; size=""; "pyNastran.bdf.cards.base_card.BaseCard" [URL="../pyNastran.bdf.cards.base_card.html#pyNastran.bdf.cards.base_card.BaseCard",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Defines a series of base methods for every card class"]; "pyNastran.bdf.cards.base_card.Property" [URL="../pyNastran.bdf.cards.base_card.html#pyNastran.bdf.cards.base_card.Property",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Base Property Class"]; "pyNastran.bdf.cards.base_card.BaseCard" -> "pyNastran.bdf.cards.base_card.Property" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.cards.properties.mass.NSM" [URL="#pyNastran.bdf.cards.properties.mass.NSM",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Defines a set of non structural mass."]; "pyNastran.bdf.cards.properties.mass.NSMx" -> "pyNastran.bdf.cards.properties.mass.NSM" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.cards.properties.mass.NSM1" [URL="#pyNastran.bdf.cards.properties.mass.NSM1",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Defines a set of non structural mass."]; "pyNastran.bdf.cards.properties.mass.NSM1x" -> "pyNastran.bdf.cards.properties.mass.NSM1" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.cards.properties.mass.NSM1x" [URL="#pyNastran.bdf.cards.properties.mass.NSM1x",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Common class for NSM1 and NSML1"]; "pyNastran.bdf.cards.base_card.Property" -> "pyNastran.bdf.cards.properties.mass.NSM1x" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.cards.properties.mass.NSMADD" [URL="#pyNastran.bdf.cards.properties.mass.NSMADD",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Defines non structural mass as the sum of the sets listed."]; "pyNastran.bdf.cards.base_card.BaseCard" -> "pyNastran.bdf.cards.properties.mass.NSMADD" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.cards.properties.mass.NSML" [URL="#pyNastran.bdf.cards.properties.mass.NSML",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Defines a set of lumped non structural mass."]; "pyNastran.bdf.cards.properties.mass.NSMx" -> "pyNastran.bdf.cards.properties.mass.NSML" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.cards.properties.mass.NSML1" [URL="#pyNastran.bdf.cards.properties.mass.NSML1",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Defines lumped non structural mass entries by VALUE,ID list."]; "pyNastran.bdf.cards.properties.mass.NSM1x" -> "pyNastran.bdf.cards.properties.mass.NSML1" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.cards.properties.mass.NSMx" [URL="#pyNastran.bdf.cards.properties.mass.NSMx",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Common class for NSM and NSML"]; "pyNastran.bdf.cards.base_card.Property" -> "pyNastran.bdf.cards.properties.mass.NSMx" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.cards.properties.mass.PMASS" [URL="#pyNastran.bdf.cards.properties.mass.PMASS",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Scalar Mass Property"]; "pyNastran.bdf.cards.base_card.Property" -> "pyNastran.bdf.cards.properties.mass.PMASS" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

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: int, nsm_type: str, pid_eid: int, value: float, comment: str = '')[source]

Bases: 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: int, nsm_type: str, value: float, pid_eid: int, comment: str = '')[source]

Bases: 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: int, nsm_type: str, value: float, ids: list[int], comment: str = '')[source]

Bases: Property

Common class for NSM1 and NSML1

Creates an NSM1/NSML1 card

Parameters:
sidint

Case control NSM id

nsm_typestr

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

}

valuefloat

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

idslist[int]

property ids or element ids depending on nsm_type

commentstr; default=’’

a comment for the card

property Type

gets the nsm_type

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

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

Parameters:
cardBDFCard()

a BDFCard object

commentstr; default=’’

a comment for the card

cross_reference(model: BDF) → None[source]
get_ids()[source]
raw_fields()[source]
repr_fields()[source]

Gets the fields in their simplified form

Returns:
fieldslist[varies]

the fields that define the card

safe_cross_reference(model: BDF, xref_errors) → None[source]
valid_properties = ['PSHELL', 'PCOMP', 'PCOMPG', 'PBAR', 'PBARL', 'PBEAM', 'PBEAML', 'PBCOMP', 'PROD', 'CONROD', 'PBEND', 'PSHEAR', 'PTUBE', 'PRAC2D', 'PBUSH', 'ELEMENT']
write_card(size: int = 8, is_double: bool = False) → str[source]

Writes the card with the specified width and precision

Parameters:
sizeint (default=8)

size of the field; {8, 16}

is_doublebool (default=False)

is this card double precision

Returns:
msgstr

the string representation of the card

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

Bases: 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:
sidint

the NSM Case Control value

setslist[int]

the NSM, NSM1, NSML, NSML1 values

commentstr; default=’’

a comment for the card

classmethod _init_from_empty()[source]
_nsm_failed(model: BDF) → tuple[list[NSM], list[int]][source]
_properties = ['ids', 'nsm_ids', 'conid']
classmethod add_card(card: BDFCard, comment: str = '')[source]

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

Parameters:
cardBDFCard()

a BDFCard object

commentstr; default=’’

a comment for the card

property conid: int
cross_reference(model: BDF) → None[source]

Cross links the card so referenced cards can be extracted directly

Parameters:
modelBDF()

the BDF object

property ids
property nsm_ids

gets the nonstructural-mass ids

raw_fields()[source]
safe_cross_reference(model: BDF, debug: bool = True)[source]
type = 'NSMADD'
uncross_reference() → None[source]

Removes cross-reference links

validate()[source]

card checking method that should be overwritten

write_card(size: int = 8, is_double: bool = False) → str[source]

Writes the card with the specified width and precision

Parameters:
sizeint (default=8)

size of the field; {8, 16}

is_doublebool (default=False)

is this card double precision

Returns:
msgstr

the string representation of the card

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

Bases: 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:
sidint

Case control NSM id

nsm_typestr

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_eidint

property id or element id depending on nsm_type

valuefloat

the non-structural pass per unit length/area

commentstr; 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: 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:
sidint

Case control NSM id

nsm_typestr

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

}

valuefloat

the non-structural pass per unit length/area

idslist[int]

property ids or element ids depending on nsm_type

commentstr; default=’’

a comment for the card

classmethod _init_from_empty()[source]
get_eid_mass_cg_by_element(model: BDF) → tuple[np.ndarray, np.ndarray, np.ndarray][source]

lumped mass to be distributed

  • Area element calculation (for example, CQUAD4): Mass for a particular element = (Element area) x (VALUE / ΣElement area for all IDs)

  • Line element calculation (for example, CBEAM): Mass for a particular element = (Element length) x (VALUE / ΣElement length for all IDs)

type = 'NSML1'
class pyNastran.bdf.cards.properties.mass.NSMx(sid: int, nsm_type: str, pid_eid: int, value: float, comment: str = '')[source]

Bases: Property

Common class for NSM and NSML

Creates an NSM/NSM1 card

Parameters:
sidint

Case control NSM id

nsm_typestr

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_eidint

property id or element id depending on nsm_type

valuefloat

the non-structural pass per unit length/area

commentstr; default=’’

a comment for the card

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

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

Parameters:
cardBDFCard()

a BDFCard object

icardint; default=0

the index of the card that’s being parsed

commentstr; default=’’

a comment for the card

cross_reference(model: BDF) → None[source]
property ids
raw_fields()[source]
repr_fields()[source]

Gets the fields in their simplified form

Returns:
fieldslist[varies]

the fields that define the card

safe_cross_reference(model: BDF, xref_errors) → None[source]
valid_properties = ['PSHELL', 'PCOMP', 'PCOMPG', 'PBAR', 'PBARL', 'PBEAM', 'PBEAML', 'PBCOMP', 'PROD', 'CONROD', 'PBEND', 'PSHEAR', 'PTUBE', 'PRAC2D', 'ELEMENT', 'PDUM8']

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

write_card(size: int = 8, is_double: bool = False) → str[source]

Writes the card with the specified width and precision

Parameters:
sizeint (default=8)

size of the field; {8, 16}

is_doublebool (default=False)

is this card double precision

Returns:
msgstr

the string representation of the card

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

Bases: 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:
pidint

Property id used by a CMASS1/CMASS3 card

massfloat

the mass to apply

commentstr; default=’’

a comment for the card

Mass() → float[source]
classmethod _init_from_empty()[source]
_properties = ['node_ids']
classmethod add_card(card: BDFCard, icard: int = 0, comment: str = '')[source]

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

Parameters:
cardBDFCard()

a BDFCard object

icardint; default=0

the index of the card that’s being parsed

commentstr; default=’’

a comment for the card

classmethod add_card_lax(card: BDFCard, icard: int = 0, comment: str = '')[source]

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

Parameters:
cardBDFCard()

a BDFCard object

icardint; default=0

the index of the card that’s being parsed

commentstr; default=’’

a comment for the card

cross_reference(model: BDF) → None[source]
pname_fid_map = {3: 'mass'}
raw_fields()[source]
repr_fields()[source]

Gets the fields in their simplified form

Returns:
fieldslist[varies]

the fields that define the card

safe_cross_reference(model: BDF, xref_errors) → None[source]
type = 'PMASS'
uncross_reference() → None[source]

Removes cross-reference links

write_card(size: int = 8, is_double: bool = False) → str[source]

Writes the card with the specified width and precision

Parameters:
sizeint (default=8)

size of the field; {8, 16}

is_doublebool (default=False)

is this card double precision

Returns:
msgstr

the string representation of the card

pyNastran.bdf.cards.properties.mass._xref_nsm(self, model: BDF, stop_on_failure: bool = True) → list[source]
pyNastran.bdf.cards.properties.mass.get_id_id0(ids: list[int] | list[str], mydict: dict[int, BaseCard]) → tuple[list[int], int][source]
pyNastran.bdf.cards.properties.mass.nsm_ids(self) → list[int][source]
pyNastran.bdf.cards.properties.mass.xref_nsm(self, model: BDF) → None[source]