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).

Functions:

get_cards_by_field

ListBulkDataCards#

list[N2PCard, …].

DictionaryIDsFiles#

dict.

TypeOfFile#

str.

property DictionaryFilesIDs: dict#
property DictionaryIDsFiles: dict#
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#
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 writen

N2PInputData#

class NaxToPy.Core.Classes.N2PNastranInputData.N2PInputData(inputdata)[source]#

Bases: object

General class for the information in an input file of Nastran

DataType#

str.

Lines#

list[str, …].

property DataType: str#
property FilePathId: int#
property Lines: list[str, ...]#