nodes
Module
digraph inheritance1d8bf29d60 {
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.nodes.EPOINT" [URL="#pyNastran.bdf.cards.nodes.EPOINT",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 the EPOINT class"];
"pyNastran.bdf.cards.nodes.XPoint" -> "pyNastran.bdf.cards.nodes.EPOINT" [arrowsize=0.5,style="setlinewidth(0.5)"];
"pyNastran.bdf.cards.nodes.EPOINTs" [URL="#pyNastran.bdf.cards.nodes.EPOINTs",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="+--------+-----+------+-----+-----+-----+-----+-----+-----+"];
"pyNastran.bdf.cards.nodes.XPoints" -> "pyNastran.bdf.cards.nodes.EPOINTs" [arrowsize=0.5,style="setlinewidth(0.5)"];
"pyNastran.bdf.cards.nodes.GRDSET" [URL="#pyNastran.bdf.cards.nodes.GRDSET",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 default options for fields 3, 7, 8, and 9 of all GRID entries."];
"pyNastran.bdf.cards.base_card.BaseCard" -> "pyNastran.bdf.cards.nodes.GRDSET" [arrowsize=0.5,style="setlinewidth(0.5)"];
"pyNastran.bdf.cards.nodes.GRID" [URL="#pyNastran.bdf.cards.nodes.GRID",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="+------+-----+----+----+----+----+----+----+------+"];
"pyNastran.bdf.cards.base_card.BaseCard" -> "pyNastran.bdf.cards.nodes.GRID" [arrowsize=0.5,style="setlinewidth(0.5)"];
"pyNastran.bdf.cards.nodes.GRIDB" [URL="#pyNastran.bdf.cards.nodes.GRIDB",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 the GRIDB class"];
"pyNastran.bdf.cards.base_card.BaseCard" -> "pyNastran.bdf.cards.nodes.GRIDB" [arrowsize=0.5,style="setlinewidth(0.5)"];
"pyNastran.bdf.cards.nodes.POINT" [URL="#pyNastran.bdf.cards.nodes.POINT",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="+-------+-----+----+----+----+----+"];
"pyNastran.bdf.cards.base_card.BaseCard" -> "pyNastran.bdf.cards.nodes.POINT" [arrowsize=0.5,style="setlinewidth(0.5)"];
"pyNastran.bdf.cards.nodes.SEQGP" [URL="#pyNastran.bdf.cards.nodes.SEQGP",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 the SEQGP class"];
"pyNastran.bdf.cards.base_card.BaseCard" -> "pyNastran.bdf.cards.nodes.SEQGP" [arrowsize=0.5,style="setlinewidth(0.5)"];
"pyNastran.bdf.cards.nodes.SPOINT" [URL="#pyNastran.bdf.cards.nodes.SPOINT",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 the SPOINT class"];
"pyNastran.bdf.cards.nodes.XPoint" -> "pyNastran.bdf.cards.nodes.SPOINT" [arrowsize=0.5,style="setlinewidth(0.5)"];
"pyNastran.bdf.cards.nodes.SPOINTs" [URL="#pyNastran.bdf.cards.nodes.SPOINTs",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="+--------+-----+------+-----+-----+-----+-----+-----+-----+"];
"pyNastran.bdf.cards.nodes.XPoints" -> "pyNastran.bdf.cards.nodes.SPOINTs" [arrowsize=0.5,style="setlinewidth(0.5)"];
"pyNastran.bdf.cards.nodes.XPoint" [URL="#pyNastran.bdf.cards.nodes.XPoint",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 EPOINT/SPOINT"];
"pyNastran.bdf.cards.base_card.BaseCard" -> "pyNastran.bdf.cards.nodes.XPoint" [arrowsize=0.5,style="setlinewidth(0.5)"];
"pyNastran.bdf.cards.nodes.XPoints" [URL="#pyNastran.bdf.cards.nodes.XPoints",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 EPOINTs and SPOINTs"];
"pyNastran.bdf.cards.base_card.BaseCard" -> "pyNastran.bdf.cards.nodes.XPoints" [arrowsize=0.5,style="setlinewidth(0.5)"];
}
All nodes are defined in this file. This includes:
Node * XPoint
EPOINT
SPOINT
XPoints * EPOINTs * SPOINTs
GRID
GRDSET
GRIDB
POINT
Ring * RINGAX
SEQGP
All ungrouped elements are Node objects.
The EPOINT/SPOINT classes refer to a single EPOINT/SPOINT. The EPOINTs/SPOINTs classes are for multiple degrees of freedom (e.g. an SPOINT card).
- class pyNastran.bdf.cards.nodes.EPOINT(nid, comment='')[source]
Bases:
XPoint
defines the EPOINT class
Creates the EPOINT card
- Parameters:
- nidint
the EPOINT id
- commentstr; default=’’
a comment for the card
- type = 'EPOINT'
- class pyNastran.bdf.cards.nodes.EPOINTs(ids, comment='')[source]
Bases:
XPoints
1
2
3
4
5
6
7
8
9
EPOINT
ID1
THRU
ID2
EPOINT
ID1
ID1
ID3
ID4
ID5
ID6
ID7
ID8
ID8
etc.
Creates the EPOINTs card that contains many EPOINTs
- Parameters:
- idslist[int]
EPOINT ids
- commentstr; default=’’
a comment for the card
- type = 'EPOINT'
- class pyNastran.bdf.cards.nodes.GRDSET(cp: int, cd: int, ps: str, seid: int, comment: str = '')[source]
Bases:
BaseCard
Defines default options for fields 3, 7, 8, and 9 of all GRID entries.
1
2
3
4
5
6
7
8
9
GRDSET
CP
CD
PS
SEID
Creates the GRDSET card
- Parameters:
- cpint; default=0
the xyz coordinate frame
- cdint; default=0
the analysis coordinate frame
- psstr; default=’’
Additional SPCs in the analysis coordinate frame (e.g. ‘123’). This corresponds to DOF set
SG
.- seidint; default=0
superelement id TODO: how is this used by Nastran???
- commentstr; default=’’
a comment for the card
- classmethod add_card(card, comment='')[source]
Adds a GRDSET card from
BDF.add_card(...)
- Parameters:
- cardBDFCard()
a BDFCard object
- commentstr; default=’’
a comment for the card
- cd
Analysis coordinate system
- cp
Output Coordinate System
- cross_reference(model: BDF) None [source]
Cross links the card so referenced cards can be extracted directly
- Parameters:
- modelBDF()
the BDF object
- ps
Default SPC constraint on undefined nodes
- raw_fields()[source]
Gets the fields in their unmodified form
- Returns:
- fieldslist[varies]
the fields that define the card
- repr_fields()[source]
Gets the fields in their simplified form
- Returns:
- fieldslist[varies]
the fields that define the card
- seid
Superelement ID
- type = 'GRDSET'
- class pyNastran.bdf.cards.nodes.GRID(nid: int, xyz: ndarray | list[float], cp: int = 0, cd: int = 0, ps: str = '', seid: int = 0, comment: str = '')[source]
Bases:
BaseCard
1
2
3
4
5
6
7
8
9
GRID
NID
CP
X1
X2
X3
CD
PS
SEID
- Attributes:
- nidint
node id
- xyzfloat ndarray
Raw location <\(x_1, x_2, x_3\)>
- cpint
reference coordinate system
- cdint
analysis coordinate system
- psstr
nodal-based constraints
- seidint
superelement id
- cp_refCoord() or None
cross-referenced cp
- cd_refCoord() or None
cross-referenced cd
Methods
Nid()
gets nid
Cp()
gets cp_ref.cid or cp depending on cross-referencing
Cd()
gets cd_ref.cid or cd depending on cross-referencing
Ps()
gets ps
SEid()
superelement id
get_position()
gets xyz in the global frame
get_position_wrt(model, cid)
gets xyz in a local frame
cross_reference(model)
cross-references the card
uncross_reference()
uncross-references the card
set_position(model, xyz, cid=0, xref=True)
updates the coordinate system
Using the GRID object::
model = read_bdf(bdf_filename) node = model.Node(nid) # gets the position of the node in the global frame node.get_position() node.get_position_wrt(model, cid=0) # gets the position of the node in a local frame node.get_position_wrt(model, cid=1) # change the location of the node node.set_position(model, array([1.,2.,3.]), cid=3)
Creates the GRID card
- Parameters:
- nidint
node id
- cpint; default=0
the xyz coordinate frame
- xyz(3, ) float ndarray; default=None -> [0., 0., 0.]
the xyz/r-theta-z/rho-theta-phi values
- cdint; default=0
the analysis coordinate frame
- psstr; default=’’
Additional SPCs in the analysis coordinate frame (e.g. ‘123’). This corresponds to DOF set
SG
.- seidint; default=0
superelement id TODO: how is this used by Nastran???
- commentstr; default=’’
a comment for the card
- classmethod add_card(card: BDFCard, comment: str = '') GRID [source]
Adds a GRID card from
BDF.add_card(...)
- Parameters:
- cardBDFCard()
a BDFCard object
- commentstr; default=’’
a comment for the card
- classmethod add_card_lax(card: BDFCard, comment: str = '') GRID [source]
Adds a GRID card from
BDF.add_card(...)
- Parameters:
- cardBDFCard()
a BDFCard object
- commentstr; default=’’
a comment for the card
- cross_reference(model: BDF, grdset: Any | None = None) None [source]
Cross links the card so referenced cards can be extracted directly
- Parameters:
- modelBDF()
the BDF object
- grdsetGRDSET / None; default=None
a GRDSET if available (default=None)
- .. note:: The gridset object will only update the fields that
have not been set
- get_position() ndarray [source]
Gets the point in the global XYZ coordinate system.
- Returns:
- xyz(3, ) float ndarray
the position of the GRID in the global coordinate system
- get_position_assuming_rectangular() NDArray3float [source]
Gets the point in a coordinate system that has unit vectors in the referenced coordinate system, but is not transformed from a cylindrical/spherical system. This is used by cards like CBAR/CBEAM for element offset vectors.
- Returns:
- xyz(3, ) float ndarray
the position of the GRID in the global coordinate system
- get_position_wrt(model: BDF, cid: int) np.ndarray [source]
Gets the location of the GRID which started in some arbitrary system and returns it in the desired coordinate system
- Parameters:
- modelBDF()
the BDF object
- cidint
the desired coordinate ID
- Returns:
- xyz(3, ) float ndarray
the position of the GRID in an arbitrary coordinate system
- get_position_wrt_coord_ref(coord_out: Coord) np.ndarray [source]
Gets the location of the GRID which started in some arbitrary system and returns it in the desired coordinate system
- Parameters:
- coord_outCoord
the desired coordinate system
- Returns:
- xyz(3, ) float ndarray
the position of the GRID in an arbitrary coordinate system
- raw_fields() list[Any] [source]
Gets the fields in their unmodified form
- Returns:
- fieldslist[int/float/str]
the fields that define the card
- repr_fields() list[Any] [source]
Gets the fields in their simplified form
- Returns:
- fieldslist[int/float/str]
the fields that define the card
- safe_cross_reference(model: BDF, xref_errors: dict[str, Any], grdset: Any | None = None) None [source]
Cross links the card so referenced cards can be extracted directly
- Parameters:
- modelBDF()
the BDF object
- grdsetGRDSET / None; default=None
a GRDSET if available (default=None)
- .. note:: The gridset object will only update the fields that
have not been set
- set_position(model: BDF, xyz: np.ndarray, cid: int = 0, xref: bool = True) None [source]
Updates the GRID location
- Parameters:
- xyz(3, ) float ndarray
the location of the node.
- cpint; default=0 (global)
the analysis coordinate system
- xrefbool; default=True
cross-references the coordinate system
- type = 'GRID'
- class pyNastran.bdf.cards.nodes.GRIDB(nid, phi, cd, ps, ringfl, comment='')[source]
Bases:
BaseCard
defines the GRIDB class
Creates the GRIDB card
- classmethod add_card(card, comment='')[source]
Adds a GRIDB card from
BDF.add_card(...)
- Parameters:
- cardBDFCard()
a BDFCard object
- commentstr; default=’’
a comment for the card
- nid
node ID
- ps
local SPC constraint
- raw_fields()[source]
Gets the fields in their unmodified form
- Returns:
- fieldslist[varies]
the fields that define the card
- repr_fields()[source]
Gets the fields in their simplified form
- Returns:
- fieldslist[varies]
the fields that define the card
- ringfl
ringfl
- type = 'GRIDB'
- class pyNastran.bdf.cards.nodes.POINT(nid: int, xyz: ndarray | list[float], cp: int = 0, comment: str = '')[source]
Bases:
BaseCard
1
2
3
4
5
6
POINT
NID
CP
X1
X2
X3
Creates the POINT card
- Parameters:
- nidint
node id
- xyz(3, ) float ndarray; default=None -> [0., 0., 0.]
the xyz/r-theta-z/rho-theta-phi values
- cpint; default=0
coordinate system for the xyz location
- commentstr; default=’’
a comment for the card
- classmethod add_card(card: BDFCard, comment: str = '') POINT [source]
Adds a POINT card from
BDF.add_card(...)
- Parameters:
- cardBDFCard()
a BDFCard object
- commentstr; default=’’
a comment for the card
- cp
Grid point coordinate system
- cross_reference(model: BDF) None [source]
Cross links the card so referenced cards can be extracted directly
- Parameters:
- modelBDF()
the BDF object
- get_position() NDArray3float [source]
Gets the point in the global XYZ coordinate system.
- Returns:
- position(3,) float ndarray
the position of the POINT in the globaly coordinate system
- get_position_wrt(model: Any, cid: int) ndarray [source]
Gets the location of the POINT which started in some arbitrary system and returns it in the desired coordinate system
- Parameters:
- modelBDF()
the BDF model object
- cidint
the desired coordinate ID
- Returns:
- xyz(3,) ndarray
the position of the POINT in an arbitrary coordinate system
- nid
Node ID
- raw_fields() list[str | int | float | None] [source]
Gets the fields in their unmodified form
- Returns:
- fieldslist[varies]
the fields that define the card
- repr_fields() list[str | int | float] [source]
Gets the fields in their simplified form
- Returns:
- fieldslist[varies]
the fields that define the card
- set_position(model: Any, xyz: ndarray, cid: int = 0) None [source]
Updates the POINT location
- Parameters:
- xyz(3,) float ndarray
the location of the node
- cpint; default=0 (global)
the analysis coordinate system
- type = 'POINT'
- write_card(size: int = 8, is_double: bool = False) str [source]
The writer method used by BDF.write_card
- Parameters:
- sizeint
the size of the card (8/16)
- xyz
node location in local frame
- class pyNastran.bdf.cards.nodes.SEQGP(nids, seqids, comment='')[source]
Bases:
BaseCard
defines the SEQGP class
Creates the SEQGP card
- Parameters:
- nidint
the node id
- seqidint/float
the superelement id
- commentstr; default=’’
a comment for the card
- classmethod add_card(card, comment='')[source]
Adds a SEQGP card from
BDF.add_card(...)
- Parameters:
- cardBDFCard()
a BDFCard object
- commentstr; default=’’
a comment for the card
- raw_fields()[source]
Gets the fields in their unmodified form
- Returns:
- fieldslist[varies]
the fields that define the card
- type = 'SEQGP'
- class pyNastran.bdf.cards.nodes.SPOINT(nid, comment='')[source]
Bases:
XPoint
defines the SPOINT class
Creates the SPOINT card
- Parameters:
- nidint
the SPOINT id
- commentstr; default=’’
a comment for the card
- type = 'SPOINT'
- class pyNastran.bdf.cards.nodes.SPOINTs(ids, comment='')[source]
Bases:
XPoints
1
2
3
4
5
6
7
8
9
SPOINT
ID1
THRU
ID2
SPOINT
ID1
ID1
ID3
ID4
ID5
ID6
ID7
ID8
ID8
etc.
Creates the SPOINTs card that contains many SPOINTs
- Parameters:
- idslist[int]
SPOINT ids
- commentstr; default=’’
a comment for the card
- type = 'SPOINT'
- class pyNastran.bdf.cards.nodes.XPoint(nid, comment)[source]
Bases:
BaseCard
common class for EPOINT/SPOINT
- classmethod _export_to_hdf5(h5_file, model: BDF, nids: list[int]) None [source]
exports the nodes in a vectorized way
- cross_reference(model: BDF) None [source]
Cross links the card so referenced cards can be extracted directly
- Parameters:
- modelBDF()
the BDF object
- raw_fields()[source]
Gets the fields in their unmodified form
- Returns:
- fieldslist[varies]
the fields that define the card
- property type
dummy method for EPOINT/SPOINT classes
- class pyNastran.bdf.cards.nodes.XPoints(ids, comment='')[source]
Bases:
BaseCard
common class for EPOINTs and SPOINTs
- classmethod add_card(card, comment='')[source]
Adds a SPOINT/EPOINT card from
BDF.add_card(...)
- Parameters:
- cardBDFCard()
a BDFCard object
- commentstr; default=’’
a comment for the card
- cross_reference(model: BDF) None [source]
Cross links the card so referenced cards can be extracted directly
- Parameters:
- modelBDF()
the BDF object
- raw_fields()[source]
Gets the fields in their unmodified form
- Returns:
- fieldslist[varies]
the fields that define the card
- property type
dummy method for EPOINTs/SPOINTs classes
- pyNastran.bdf.cards.nodes.compress_xpoints(point_type: str, xpoints: list[int]) list[list[int]] [source]
Gets the SPOINTs/EPOINTs in sorted, short form.
uncompressed: SPOINT,1,3,5 compressed: SPOINT,1,3,5
uncompressed: SPOINT,1,2,3,4,5 compressed: SPOINT,1,THRU,5
uncompressed: SPOINT,1,2,3,4,5,7 compressed: SPOINT,7
SPOINT,1,THRU,5
point_type = ‘SPOINT’ spoints = [1, 2, 3, 4, 5] fields = compressed_xpoints(point_type, spoints) >>> fields [‘SPOINT’, 1, ‘THRU’, 5]