N2PLoadCase#

class NaxToPy.Core.Classes.N2PLoadCase.N2PLoadCase(id_lc, id_original, increments, increments_number_list, lc_type, name, results, solution_type, solver, model_father, n2loadcase)[source]#

Bases: object

Class which contains the information associated to a load case instance of N2PLoadCase object

ID#

int.

Name#

str.

TypeSolution#

str.

Results#

dict[str: N2PResult].

Increments list[N2PIncrement].
NumIncrements#

int.

ActiveN2PIncrement#

N2PIncrement.

TypeLC#

int.

InternalID#

int.

property ActiveIncrement: int#

DEPRECATED PROPERTY. Use ActiveN2PIncrement.ID instead. Returns the active increment of the load case. By default, is the last one.

property ActiveN2PIncrement: N2PIncrement#

Returns the active increment of the load case. By default, is the last one.

property ID: int#
property Increments: list[N2PIncrement]#
property Name: str#
property NumIncrements: int#
property OriginalID: int#
property PathFile: str#

Returns the path of the file where the load cases were imported from

property RefTemp: float#

Returns the reference temperature of the load case

property Results: dict[str, N2PResult]#
property Solver: str#
property TypeLC: str#

Returns the type of Load Case. RAW -> the load case is extracted from the original file. IMPORTED -> the load case has been imported.

property TypeSolution: str#
get_increments(id: int | str) N2PIncrement[source]#

Returns the N2PIncrement object with the id=ID or the id=Name of the Increment

Parameters:

id – str|int -> It can be the ID(int) of the increment or the Name(srt) of the increment

Returns:

N2PIncrement

Return type:

increment

get_result(name: str) N2PResult[source]#

Returns the N2PResult object with the Name of the Result. The name of the results is different depoending on the solver.

Parameters:

name – str

Returns:

N2PResult

Return type:

result

Examples

>>> displ = N2PLoadCase.get_result("DISPLACEMENT")  # If nastran
>>> displ = N2PLoadCase.get_result("U")  # If Abaqus
set_increment(id: int | str) N2PLoadCase[source]#
Method that sets the active increment using an ID where the results will be obtained.

If id=-1 the last increment is used as active.

Parameters:

id – int|str -> Number id or name of the increment is intended to set as active increment

Returns:

‘N2PLoadCase’

Return type:

loadcase