N2PGetLoadFastener Module#
- class NaxToPy.Modules.static.fasteners.N2PGetLoadFasteners.N2PGetLoadFasteners[source]#
Bases:
object
The N2PGetLoadFasteners class is used to calculate the bearing and bypass loads of a collection of joints.
- Properties:
BypassResults: str -> path to the .h5 file in which the bypass results have been obtained and are to be loaded. ResultsFiles: list[str] -> list of paths to the .op2 or equivalent results files. GetFasteners: N2PGetFasteners -> N2PGetFasteners object with fasteners to be analysed. Model: N2PModelContent -> reduced N2PModelContent object representing the model that is being analysed. JointsList: list[N2PJoint] -> list of N2PJoint objects representing the joints to be anlysed. PlateList: list[N2PPlate] -> list of N2PPlate objects representing the plates to be analysed. LoadCases: list[N2PLoadCase] -> list of N2PLoadCase objects representing the load cases to be analysed. AnalysisName: str -> name of the file that will be exported. ExportLocation: str -> path to the folder in which results will be exported. TypeAnalysis: Literal[“PAG”, “ALTAIR”] -> type of analysis to be executed. TypeExport: Literal[“ALTAIR”, “TXT”, “CSV”, “HDF5”, “REDUCED_HDF5”] -> way in which results will be exported. OptionalAttributes: _N2POptionalAttributes: _N2POptionalAttributes object representing all optional attributes that would usually not be modified.
- calculate()[source]#
Method used to do all the previous calculations and, optionally, export the results.
- Calling example:
>>> loads.calculate()
- export_results()[source]#
Method used to export the obtained results to a CSV file.
- Calling example:
>>> loads.export_results()
- get_analysis(loadCaseList: list[N2PLoadCase] = None)[source]#
Method used to do the previous analysis and, optionally, export the results.
- Parameters:
loadCaseList – list[N2PLoadCase] -> load cases to be analysed
- Calling example:
>>> loads.get_analysis(loads.LoadCases[0:10])
- get_bypass_box()[source]#
Method used to obtain the bypass box and to know what elements to ask results for. Also, if no load cases have been selected, all of them are.
- Calling example:
>>> loads.get_bypass_box()
- get_bypass_loads(loadCaseList: list[N2PLoadCase] = None)[source]#
Method used to obtain the bypass loads of each joint. If an N2PJoint has no diameter, the default diameter is assigned (in case it has been defined by the user). In order to work, the results attribute must have been previously filled (by having called get_results_joints()). If it has not, an error will occur.
- Parameters:
loadCaseList – list[N2PLoadCase] -> load cases to be analysed
- Calling example:
>>> loads.get_bypass_loads(loads.LoadCases[0:10])
- get_forces(loadCaseList: list[N2PLoadCase] = None)[source]#
Method used to obtain the 1D forces of each joint. In order to work, the results attribute must have been previously filled (by having called get_results()). If it has not, an error will occur.
- Parameters:
loadCaseList – list[N2PLoadCase] -> load cases to be analysed
- Calling example:
>>> loads.get_forces(loads.LoadCases[0:10])
- get_results(loadCaseList: list[N2PLoadCase] = None)[source]#
Method used to obtain the results of the model.
The following steps are followed:
1. Results are obtained with the get_results() function. Its outputs are, (a), the results per se, (b), the results in the corners, in case that it has been asked, and (c), the list of broken load cases, that is, the list of load cases that lack an important result. 2. If there are some broken load cases, they are removed from the _load_cases attribute and. If all load cases were broken (meaning that the current _load_cases attribute is empty), an error is displayed.
- Parameters:
loadCaseList – list[N2PLoadCase] -> load cases to be analysed
- Calling example:
>>> loads.get_results(loads.LoadCases[0:10])
- get_results_h5(loadCaseList: list[N2PLoadCase] = None)[source]#
Method used to obtain the results of the model from a .h5 file and assign them to plates and bolts.
- Parameters:
loadCaseList – list[N2PLoadCase] -> load cases to be analysed
- Calling example:
>>> loads.get_results_h5(loads.LoadCases[0:10])
- load_h5()[source]#
Method used to load the results obtained from a previous N2PGetLoadFastener analysis from a .h5 file.
- Calling example:
>>> loads.load_h5()
- property AnalysisName: str#
Property that returns the analysis_name attribute, that is, the name of the file in which results will be extracted.
- property BypassResults: str#
Property that returns the bypass_results attribute, that is, the results obtained from a .h5 file.
- property ExportLocation: str#
Property that returns the export_location attribute, that is, the path in which the results files will be created.
- property GetFasteners: N2PGetFasteners#
Property that returns the get_fasteners attribute, that is, the N2PGetFasteners object from which fasteners are extracted.
- property JointsList: list[N2PJoint]#
Property that returns the joints_list attribute, that is, the list of N2PJoints to be analyzed.
- property LoadCases: list[N2PLoadCase]#
Property that returns the load_cases attributes, that is, the list of the load cases to be analyzed.
- property Model: N2PModelContent#
Property that returns the model attribute, that is, the reduced model that is created to do the analysis.
- property OptionalAttributes#
Property that returns the optional_attributes attribute, that is, the class used to insert the optional attributes.
- property PlateList: list[N2PPlate]#
Property that returns the plate_list attribute, that is, the list of N2PPlates to be analyzed.
- property ResultsFiles: list[str]#
Property that returns the results_files attribute, that is, the results files to be analysed.
- property TypeAnalysis: Literal['ALTAIR', 'PAG']#
Property that returns the path where the type_analysis attribute, that is, whether the results are analyzed in the Altair or PAG style.
- property TypeExport: Literal['ALTAIR', 'TXT', 'CSV', 'HDF5', 'REDUCED_HDF5']#
Property that returns the path where the type_export attribute, that is, whether the results are exported in a txt, csv, or h5 file.
- class NaxToPy.Modules.static.fasteners.N2PGetLoadFasteners._N2POptionalAttributes(loads)[source]#
Bases:
object
The _N2POptionalAttributes class is used to save all optional attributes of N2PGetLoadFasteners.
- Properties:
GetLoadFasteners: N2PGetLoadFasteners -> N2PGetLoadFasteners instance being used for this _N2POptionalAttributes instance. AdjacencyLevel: int -> number of times that the get_elements_attached() funcion is called when laoding a new model. LoadSecondModel: bool -> boolean that shows if another model will be loaded when obtaining the results. CornerData: bool -> boolean that shows if there are results in the corners or not. MaterialFactorMetal: float -> material factor used to create the bypass box for metallic plates. MaterialFactorComposite: float -> material factor used to create the bypass box for composite plates. AreaFactor: float -> area factor used to create the byapss box. MaxIterations: int -> maximum number of iterations allowed to create the bypass box. ProjectionTolerance: float -> tolerance used to determine if a point lies within an element. DefaultDiameter: float -> diameter assigned to joints with no diameter. ExportPrecision: int -> precision used when exporting results to an HDF5 file (4 or 8). LoadCaseNumber: int -> number of load cases analysed at the same time. CompressionEqualsZero: bool -> boolean that shows if the pullthrough force of a compressed plate will be set to zero or kept negative. PullThroughAsIs: bool -> boolean that shows if the pullthrough force of a plate will be calculated or directly extracted from the model. ShearAsIs: bool -> boolean that shows if the shear force of a plate will be calculated or directly extracted from the model.
- property AdjacencyLevel: int#
Property that returns the adjacency_level attribute, that is, the number of times the get_elements_attached() function will be called when loading the new model.
- property AreaFactor: float#
Property that returns the area_factor attribute, that is, the area factor used to create the bypass box.
- property CompressionEqualsZero: bool#
Property that returns the compression_equals_zero attribute, that is, whether or not the pullthrough force will be set to zero when the fastener is compressed.
- property CornerData: bool#
Property that returns the corner_data attribute, that is, whether or not there are results in the corners.
- property DefaultDiameter: float#
Property that returns the default_diameter attribute, that is, the diameter that will be assigned to joints with no diameter.
- property ExportPrecision: int#
Property that returns the export_precision atribute, that is, the precision used when exporting the results to a HDF5 file. It can be either 4 or 8.
- property GetLoadFasteners: N2PGetLoadFasteners#
Property that returns the get_load_fasteners attribute, that is, the N2PGetLoadFasteners instance that is being used for this N2POptionalAttributes instance.
- property LoadCaseNumber: int#
Property that returns the load_case_number attribute, that is, the number of load cases that are analyzed at the same time.
- property LoadSecondModel: bool#
Property that returns the load_second_model attribute, that is, whether or not a second model will be loaded to obtain results in that model.
- property MaterialFactorComposite: float#
Property that returns the material_factor_composite attribute, that is, the material factor used to create the bypass box for composite plates.
- property MaterialFactorMetal: float#
Property that returns the material_factor_metal attribute, that is, the material factor used to create the bypass box for metallic plates.
- property MaxIterations: int#
Property that returns the max_iterations attribute, that is, the maximum number of iterations allowed to create the bypass boxes.
- property ProjectionTolerance: float#
Property that returns the projection_tolerance attribute, that is, the tolerance used when determining if a point lies within an element.
- property PullThroughAsIs: bool#
Property that returns the pullthrough_as_is attribute, that is, whether or not the pullthrough force will be set to the value found in the results files.
- property ShearAsIs: bool#
Property that returns the shear_as_is attribute, that is, whether or not the shear force will be set to the value found in the results files or not.