N2PNastranInputData#
- class NaxToPy.Core.Classes.N2PNastranInputData.N2PNastranInputData(dictcardscston2p: dict, inputfiledata)[source]#
Bases:
object
Class with the complete data of a MEF input file (text file).
Note
The property
N2PModelContent.ModelInputData
can be aN2PNastranInputData
if the input file is from Nastran (.bdf) or Opstitruct (.fem), or aN2PAbaqusInputData
(.inp) if is from Abaqus.Example
>>> model = n2p.load_model("my_nastran_input_file.bdf") >>> inputdata = model.ModelInputData # This is a N2PNastranInputData
- get_cards_by_field(fields: list[str], row: int = 0, col: int = 0) list[N2PCard] [source]#
Method that returns a list with the N2PCard objects of the input FEM file that meet the condition. In other words, that field is equal to the string in the position defined. If no row or column is defined, the string will compare with the position (0,0) of the card, that is the name of the card.
- Parameters:
fields – str | list[str]
row – int (optional)
col – int (optional)
- Returns:
list[N2PCard, ]
- rebuild_file(folder: str) None [source]#
Method that writes the solver input file with the same file structure that was read in the folder is specified
- Parameters:
folder – str -> Path of the folder where the file or files will be written.
- property DictionaryFilesIDs: dict#
Dictionary FilePaths (string) as keys and with ID (int) as values.
- property DictionaryIDsFiles: dict#
Dictionary with ID (int) as keys and FilePaths (string) as values.
- property ListBulkDataCards: list[N2PCard]#
List with the N2PCard objects of the input FEM file. It has all bulk data cards of the model
- property ListComments: list[N2PInputData]#
List with all the comments in the FEM Input File
- property ListInstructions: list[N2PInputData]#
Executive Control Statements and Control Case Commands
- Type:
List with the instructions of the model. They are the commands above the BEGIN BULK
- property TypeOfFile: str#
Type of file read. It may be “NASTRAN” or “OPTISTRUCT” .