dmig
Module¶
-
class
pyNastran.bdf.cards.dmig.
DMI
(name, matrix_form, tin, tout, nrows, ncols, GCj, GCi, Real, Complex=None, comment='', finalize=True)[source]¶ Bases:
pyNastran.bdf.cards.dmig.NastranMatrix
1 2 3 4 5 6 7 8 9 DMI NAME 0 FORM TIN TOUT M N DMI NAME J I1 A(I1,J) A(I1,J) A(I1+1,J) A(I1+2,J) etc. I2 etc. -
_properties
= ['shape', 'ifo', 'is_real', 'is_complex', 'is_polar', 'matrix_type', 'tin_dtype', 'tout_dtype']¶
-
classmethod
add_card
(card, comment='')[source]¶ Adds a DMI card from
BDF.add_card(...)
Parameters: - card : BDFCard()
a BDFCard object
- comment : str; default=’‘
a comment for the card
-
ifo
¶ #: 4-Lower Triangular; 5=Upper Triangular; 6=Symmetric; 8=Identity (m=nRows, n=m)
#: Form of the matrix: 1=Square (not symmetric); 2=Rectangular; #: 3=Diagonal (m=nRows,n=1); 4=Lower Triangular; 5=Upper Triangular; #: 6=Symmetric; 8=Identity (m=nRows, n=m) self.matrix_form = integer(card, 3, ‘matrix_form’)
-
is_complex
¶ real vs. complex attribute
-
is_polar
¶ - Used by:
- DMIG
- DMIJ
- DMIJI
- DMIK
- Not used by:
- DMI
- DMIAX
- DMIG, UACCEL
- DMIGOUT
- DMIGROT
-
is_real
¶ real vs. complex attribute
-
matrix_type
¶ gets the matrix type
1 Square matrix (not symmetric) 2 General rectangular matrix 3 Diagonal matrix (M=number of rows, N = 1) #4 Lower triangular factor #5 Upper triangular factor 6 Symmetric matrix 8 Identity matrix (M=number of rows, N = M)
-
raw_fields
(self)[source]¶ Warning
All the writers are bad because Nastran insists on making columns a single DMI card. This makes writing a card much harder, so there are a lot of NotImplementedErrors floating about.
This is an invalid method, but is not disabled because it’s currently needed for checking results
-
shape
¶ gets the matrix shape
-
type
= 'DMI'¶
-
-
class
pyNastran.bdf.cards.dmig.
DMIAX
(name, matrix_form, tin, tout, ncols, GCNj, GCNi, Real, Complex=None, comment='')[source]¶ Bases:
pyNastran.bdf.cards.base_card.BaseCard
Direct Matrix Input for Axisymmetric Analysis
Defines axisymmetric (fluid or structure) related direct input matrix terms. The matrix is defined by a single header entry and one or more column entries. Only one header entry is required. A column entry is required for each column with nonzero elements.
1 2 3 4 5 6 7 8 9 DMIAX NAME 0 IFO TIN TOUT 1 2 3 4 5 6 7 8 9 DMIAX NAME GJ CJ NJ G1 C1 N1 A1 B1 G2 C2 etc. 1 2 3 4 5 6 7 8 9 DMIAX B2PP 0 1 3 DMIAX B2PP 32 1027 3 4.25+6 2.27+3 Creates a DMIAX card
Parameters: - name : str
the name of the matrix
- matrix_form : int
matrix shape 1=Square 2=General Rectangular 6=Symmetric
- tin : int
matrix input precision 1=Real, Single Precision 3=Complex, Single Precision
- tout : int
matrix output precision 1=Real, Single Precision 2=Real, Double Precision 3=Complex, Single Precision 4=Complex, Double Precision
- GCNj : List[(node, dof, harmonic_number)]???
the jnode, jDOFs
- GCNi : List[(node, dof, harmonic_number)]???
the inode, iDOFs
- Real : List[float]???
The real values
- Complex : List[float]???; default=None
The complex values (if the matrix is complex)
- comment : str; default=’‘
a comment for the card
-
classmethod
add_card
(card, comment='')[source]¶ Adds a NastranMatrix (DMIAX) card from
BDF.add_card(...)
Parameters: - card : BDFCard()
a BDFCard object
- comment : str; default=’‘
a comment for the card
-
is_complex
¶ is the matrix complex
-
is_polar
¶ is the matrix polar (vs real/imag)?
-
is_real
¶ is the matrix real?
-
matrix_form
= None¶ ifo/4-Lower Triangular; 5=Upper Triangular; 6=Symmetric; 8=Identity (m=nRows, n=m)
-
matrix_type
¶ gets the matrix type
-
tin_dtype
¶ gets the input dtype
-
tout
= None¶ 0-Set by cell precision
-
tout_dtype
¶ gets the output dtype
-
type
= 'DMIAX'¶
-
class
pyNastran.bdf.cards.dmig.
DMIG
(name, ifo, tin, tout, polar, ncols, GCj, GCi, Real, Complex=None, comment='', finalize=True)[source]¶ Bases:
pyNastran.bdf.cards.dmig.NastranMatrix
Defines direct input matrices related to grid, extra, and/or scalar points. The matrix is defined by a single header entry and one or more column entries. A column entry is required for each column with nonzero elements.
1 2 3 4 5 6 7 8 9 DMIG NAME 0 IFO TIN TOUT POLAR NCOL DMIG NAME GJ CJ G1 C1 A1 B1 G2 C2 A2 B2 Creates a DMIG card
Parameters: - name : str
the name of the matrix
- ifo : int
matrix shape 4=Lower Triangular 5=Upper Triangular 6=Symmetric 8=Identity (m=nRows, n=m)
- tin : int
matrix input precision 1=Real, Single Precision 2=Real, Double Precision 3=Complex, Single Precision 4=Complex, Double Precision
- tout : int
matrix output precision 0=same as tin 1=Real, Single Precision 2=Real, Double Precision 3=Complex, Single Precision 4=Complex, Double Precision
- polar : int; default=0
Input format of Ai, Bi Integer=blank or 0 indicates real, imaginary format Integer > 0 indicates amplitude, phase format
- ncols : int
???
- GCj : List[(node, dof)]
the [jnode, jDOFs]
- GCi : List[(node, dof)]
the inode, iDOFs
- Real : List[float]
The real values
- Complex : List[float]; default=None
The complex values (if the matrix is complex)
- comment : str; default=’‘
a comment for the card
-
_properties
= ['is_real', 'is_complex', 'is_polar', 'matrix_type', 'shape', 'tin_dtype', 'tout_dtype']¶
-
type
= 'DMIG'¶
-
class
pyNastran.bdf.cards.dmig.
DMIG_UACCEL
(tin, ncol, load_sequences, comment='')[source]¶ Bases:
pyNastran.bdf.cards.base_card.BaseCard
Direct Matrix Input of Enforced Static Acceleration Defines rigid body accelerations in the basic coordinate system.
1 2 3 4 5 6 7 8 DMIG UACCEL “0” “9” TIN NCOL DMIG UACCEL L G1 C1 X1 G2 C2 X2 G3 C3 X3 DMIG UACCEL 0 9 1 4 DMIG UACCEL 2 2 3 386.4 DMIG UACCEL 3 2 4 3.0 DMIG UACCEL 4 2 6 1.0 -
classmethod
add_card
(card, comment='')[source]¶ Adds a DMIG,UACCEL card from
BDF.add_card(...)
Parameters: - card : BDFCard()
a BDFCard object
- comment : str; default=’‘
a comment for the card
-
name
= 'UACCEL'¶
-
type
= 'DMIG'¶
-
classmethod
-
class
pyNastran.bdf.cards.dmig.
DMIJ
(name, matrix_form, tin, tout, polar, ncols, GCj, GCi, Real, Complex=None, comment='', finalize=True)[source]¶ Bases:
pyNastran.bdf.cards.dmig.NastranMatrix
Direct Matrix Input at js-Set of the Aerodynamic Mesh Defines direct input matrices related to collation degrees-of-freedom (js-set) of aerodynamic mesh points for CAERO1, CAERO3, CAERO4 and CAERO5 and for the slender body elements of CAERO2. These include W2GJ, FA2J and input pressures and downwashes associated with AEPRESS and AEDW entries. The matrix is described by a single header entry and one or more column entries. A column entry is required for each column with nonzero elements. For entering data for the interference elements of a CAERO2, use DMIJI or DMI.
Creates a DMIJ card
Parameters: - name : str
the name of the matrix
- matrix_form : int
matrix shape 4=Lower Triangular 5=Upper Triangular 6=Symmetric 8=Identity (m=nRows, n=m)
- tin : int
matrix input precision 1=Real, Single Precision 2=Real, Double Precision 3=Complex, Single Precision 4=Complex, Double Precision
- tout : int
matrix output precision 0=same as tin 1=Real, Single Precision 2=Real, Double Precision 3=Complex, Single Precision 4=Complex, Double Precision
- polar : int; default=0
Input format of Ai, Bi Integer=blank or 0 indicates real, imaginary format Integer > 0 indicates amplitude, phase format
- ncols : int
???
- GCj : List[(node, dof)]???
the jnode, jDOFs
- GCi : List[(node, dof)]???
the inode, iDOFs
- Real : List[float]???
The real values
- Complex : List[float]???; default=None
The complex values (if the matrix is complex)
- comment : str; default=’‘
a comment for the card
-
_properties
= ['shape', 'ifo', 'is_real', 'is_complex', 'is_polar', 'matrix_type', 'tin_dtype', 'tout_dtype']¶
-
type
= 'DMIJ'¶
-
class
pyNastran.bdf.cards.dmig.
DMIJI
(name, ifo, tin, tout, polar, ncols, GCj, GCi, Real, Complex=None, comment='', finalize=True)[source]¶ Bases:
pyNastran.bdf.cards.dmig.NastranMatrix
Direct Matrix Input at js-Set of the Interference Body Defines direct input matrices related to collation degrees-of-freedom (js-set) of aerodynamic mesh points for the interference elements of CAERO2. These include W2GJ, FA2J and input pressures and downwashes associated with AEPRESS and AEDW entries. The matrix is described by a single header entry and one or more column entries. A column entry is required for each column with nonzero elements. For entering data for the slender elements of a CAERO2, or a CAERO1, 3, 4 or 5 use DMIJ or DMI.
Creates a DMIJI card
Parameters: - name : str
the name of the matrix
- ifo : int
matrix shape 4=Lower Triangular 5=Upper Triangular 6=Symmetric 8=Identity (m=nRows, n=m)
- tin : int
matrix input precision 1=Real, Single Precision 2=Real, Double Precision 3=Complex, Single Precision 4=Complex, Double Precision
- tout : int
matrix output precision 0=same as tin 1=Real, Single Precision 2=Real, Double Precision 3=Complex, Single Precision 4=Complex, Double Precision
- polar : int; default=0
Input format of Ai, Bi Integer=blank or 0 indicates real, imaginary format Integer > 0 indicates amplitude, phase format
- ncols : int
???
- GCj : List[(node, dof)]???
the jnode, jDOFs
- GCi : List[(node, dof)]???
the inode, iDOFs
- Real : List[float]???
The real values
- Complex : List[float]???; default=None
The complex values (if the matrix is complex)
- comment : str; default=’‘
a comment for the card
-
_properties
= ['shape', 'ifo', 'is_real', 'is_complex', 'is_polar', 'matrix_type', 'tin_dtype', 'tout_dtype']¶
-
type
= 'DMIJI'¶
-
class
pyNastran.bdf.cards.dmig.
DMIK
(name, ifo, tin, tout, polar, ncols, GCj, GCi, Real, Complex=None, comment='', finalize=True)[source]¶ Bases:
pyNastran.bdf.cards.dmig.NastranMatrix
Direct Matrix Input at ks-Set of the Aerodynamic Mesh Defines direct input matrices related to physical (displacement) degrees-of-freedom (ks-set) of aerodynamic grid points. These include WKK, WTFACT and input forces associated with AEFORCE entries. The matrix is described by a single header entry and one or more column entries. A column entry is required for each column with nonzero elements.
1 2 3 4 5 6 7 8 9 DMIK NAME 0 IFO TIN TOUT POLAR NCOL DMIK NAME GJ CJ G1 C1 A1 B1 G2 C2 A2 B2 DMIK ALPH1 0 9 2 0 1 DMIK ALPH1 1 1 1 1 1.0 2 1 1.0 Creates a DMIK card
Parameters: - name : str
the name of the matrix
- ifo : int
matrix shape 4=Lower Triangular 5=Upper Triangular 6=Symmetric 8=Identity (m=nRows, n=m)
- tin : int
matrix input precision 1=Real, Single Precision 2=Real, Double Precision 3=Complex, Single Precision 4=Complex, Double Precision
- tout : int
matrix output precision 0=same as tin 1=Real, Single Precision 2=Real, Double Precision 3=Complex, Single Precision 4=Complex, Double Precision
- polar : int; default=0
Input format of Ai, Bi Integer=blank or 0 indicates real, imaginary format Integer > 0 indicates amplitude, phase format
- ncols : int
???
- GCj : List[(node, dof)]
the jnode, jDOFs
- GCi : List[(node, dof)]
the inode, iDOFs
- Real : List[float]
The real values
- Complex : List[float]; default=None
The complex values (if the matrix is complex)
- comment : str; default=’‘
a comment for the card
-
_properties
= ['shape', 'ifo', 'is_real', 'is_complex', 'is_polar', 'matrix_type', 'tin_dtype', 'tout_dtype']¶
-
type
= 'DMIK'¶
-
class
pyNastran.bdf.cards.dmig.
DTI
(name, fields, comment='')[source]¶ Bases:
pyNastran.bdf.cards.base_card.BaseCard
1 2 3 4 5 6 7 8 DTI UNITS “1” MASS FORCE LENGTH TIME STRESS MSC
1 2 3 4 5 6 7 8 DTI UNITS “1” MASS FORCE LENGTH TIME TEMPERATURE NX
Creates a DTI card
Parameters: - name : str
UNITS
- fields : List[varies]
the fields
- comment : str; default=’‘
a comment for the card
-
classmethod
add_card
(card, comment)[source]¶ Adds a DTI card from
BDF.add_card(...)
Parameters: - card : BDFCard()
a BDFCard object
- comment : str; default=’‘
a comment for the card
-
type
= 'DTI'¶
-
class
pyNastran.bdf.cards.dmig.
NastranMatrix
(name, matrix_form, tin, tout, polar, ncols, GCj, GCi, Real, Complex=None, comment='', finalize=True)[source]¶ Bases:
pyNastran.bdf.cards.base_card.BaseCard
Base class for the DMIG, DMIJ, DMIJI, DMIK matrices
Creates a NastranMatrix
Parameters: - name : str
the name of the matrix
- matrix_form : int
matrix shape 4=Lower Triangular 5=Upper Triangular 6=Symmetric 8=Identity (m=nRows, n=m)
- tin : int
matrix input precision 1=Real, Single Precision 2=Real, Double Precision 3=Complex, Single Precision 4=Complex, Double Precision
- tout : int
matrix output precision 0=same as tin 1=Real, Single Precision 2=Real, Double Precision 3=Complex, Single Precision 4=Complex, Double Precision
- polar : int; default=0
Input format of Ai, Bi Integer=blank or 0 indicates real, imaginary format Integer > 0 indicates amplitude, phase format
- ncols : int
???
- GCj : List[(node, dof)]
the jnode, jDOFs
- GCi : List[(node, dof)]
the inode, iDOFs
- Real : List[float]
The real values
- Complex : List[float]; default=None
The complex values (if the matrix is complex)
- comment : str; default=’‘
a comment for the card
-
classmethod
add_card
(card, comment='')[source]¶ Adds a NastranMatrix (DMIG, DMIJ, DMIK, DMIJI) card from
BDF.add_card(...)
Parameters: - card : BDFCard()
a BDFCard object
- comment : str; default=’‘
a comment for the card
-
get_matrix
(self, is_sparse=False, apply_symmetry=True)[source]¶ Builds the Matrix
Parameters: - is_sparse : bool; default=False
should the matrix be returned as a sparse matrix. Slower for dense matrices.
- apply_symmetry : bool; default=True
If the matrix is symmetric (ifo=6), returns a symmetric matrix. Supported as there are symmetric matrix routines.
Returns: - M : numpy.ndarray or scipy.coomatrix
the matrix
- rows : dict[int] = [int, int]
dictionary of keys=rowID, values=(Grid,Component) for the matrix
- cols: dict[int] = [int, int]
dictionary of keys=columnID, values=(Grid,Component) for the matrix
Warning
is_sparse=True WILL fail ..
-
is_complex
¶ real vs. complex attribute
-
is_polar
¶ - Used by:
- DMIG
- DMIJ
- DMIJI
- DMIK
- Not used by:
- DMI
- DMIAX
- DMIG, UACCEL
- DMIGOUT
- DMIGROT
-
is_real
¶ real vs. complex attribute
-
matrix_form
= None¶ 4-Lower Triangular; 5=Upper Triangular; 6=Symmetric; 8=Identity (m=nRows, n=m)
-
matrix_type
¶ gets the matrix type
-
polar
= None¶ Input format of Ai, Bi. (Integer=blank or 0 indicates real, imaginary format; Integer > 0 indicates amplitude, phase format.)
-
shape
¶ gets the matrix shape
-
tin_dtype
¶ gets the input dtype
-
tout
= None¶ 0-Set by cell precision
-
tout_dtype
¶ gets the output dtype
-
pyNastran.bdf.cards.dmig.
_export_dmig_to_hdf5
(h5_file, model, dict_obj, encoding)[source]¶ export dmigs, dmijs, dmijis, dmiks, dmis
-
pyNastran.bdf.cards.dmig.
_fill_dense_column_matrix
(self, nrows, ncols, ndim, rows, cols, apply_symmetry)[source]¶ helper method for get_matrix
-
pyNastran.bdf.cards.dmig.
_fill_dense_rectangular_matrix
(self, nrows, ncols, ndim, rows, cols, apply_symmetry)[source]¶ helper method for get_matrix
-
pyNastran.bdf.cards.dmig.
_fill_sparse_matrix
(self, nrows, ncols)[source]¶ helper method for get_matrix
-
pyNastran.bdf.cards.dmig.
get_matrix
(self, is_sparse=False, apply_symmetry=True)[source]¶ Builds the Matrix
Parameters: - is_sparse : bool
should the matrix be returned as a sparse matrix (default=True). Slower for dense matrices.
- apply_symmetry: bool
If the matrix is symmetric (matrix_form=6), returns a symmetric matrix. Supported as there are symmetric matrix routines. TODO: unused…
Returns: - M : ndarray
the matrix
- rows : Dict[(nid, nid)] = float
dictionary of keys=rowID, values=(Grid,Component) for the matrix
- cols : Dict[](int, int)] = float
dictionary of keys=columnID, values=(Grid,Component) for the matrix
Warning
is_sparse=True WILL fail ..