breakdowns Module

defines:
  • pid_to_length = get_length_breakdown(

    model, property_ids=None, stop_if_no_length=True)

  • pid_to_area = get_area_breakdown(

    model, property_ids=None, stop_if_no_area=True, sum_bar_area=True)

  • pid_to_volume = get_volume_breakdown(

    model, property_ids=None, stop_if_no_volume=True)

  • pids_to_mass, mass_type_to_mass = get_mass_breakdown(

    model, property_ids=None, stop_if_no_mass=True, detailed=False)

  • pids_to_mass, pids_to_mass_nonstructural, mass_type_to_mass = get_mass_breakdown(

    model, property_ids=None, stop_if_no_mass=True, detailed=True)

pyNastran.bdf.mesh_utils.breakdowns.get_area_breakdown(model: BDF, property_ids=None, stop_if_no_area: bool = True, sum_bar_area: bool = True) dict[int, float][source]

Gets a breakdown of the area by property region.

Parameters:
model: BDF

a BDF object

property_idslist[int] / int

list of property ID

stop_if_no_areabool; default=True

prevents crashing if there are no elements

sum_bar_areabool; default=True

sum the areas for CBAR/CBEAM/CROD/CONROD/CTUBE elements True : get the area of the model by property id (e.g., A=A_pid*Nelements) False : only get the cross sectional properties (e.g., A=A_pid)

Returns:
pids_to_areadict[int pid]float area

the pid to area dictionary

TODO: What about CONRODs?

#’PBRSECT’, ‘PBCOMP’, ‘PBMSECT’, ‘PBEAM3’, ‘PBEND’, ‘PCOMPS’,

pyNastran.bdf.mesh_utils.breakdowns.get_length_breakdown(model: BDF, property_ids=None, stop_if_no_length: bool = True)[source]

Gets a breakdown of the length by property region.

Returns:
pids_to_lengthdict[int pid]float length

the pid to length dictionary

TODO: What about CONRODs?
pyNastran.bdf.mesh_utils.breakdowns.get_mass_breakdown(model: BDF, property_ids: list[int] = None, stop_if_no_mass: bool = True, detailed: bool = False) Any[source]

Gets a breakdown of the mass by property region.

Parameters:
model: BDF

a BDF object

property_idslist[int] / int

list of property ID

stop_if_no_massbool; default=True

prevents crashing if there are no elements setting this to False really doesn’t make sense for non-DMIG models

detailedbool, optional, defaultFalse

Separates structural and nonstructural mass outputs.

Returns:
pids_to_massdict {intfloat, …}

Map from property id to mass (structural mass only if detailed is True).

pids_to_mass_nonstructuraldict {intfloat, …}, optional

Map from property id to nonstructural mass (only if detailed is True).

mass_type_to_massdict {strfloat, …}

Map from mass id to mass for mass elements. Used for CONM2s

TODO: What about CONRODs, CONM2s

#’PBCOMP’, ‘PBMSECT’, ‘PBEAM3’, ‘PBEND’, ‘PCOMPS’,

..note:: WTMASS is not considered
pyNastran.bdf.mesh_utils.breakdowns.get_material_mass_breakdown_table(model: BDF) tuple[dict[int, float], dict[int, dict[int, float]], dict[int, dict[int, float]], dict[int, dict[int, float]]][source]
pyNastran.bdf.mesh_utils.breakdowns.get_property_mass_breakdown_table(model: BDF)[source]
pyNastran.bdf.mesh_utils.breakdowns.get_thickness_breakdown(model: BDF, property_ids=None, stop_if_no_thickness: bool = False)[source]
pyNastran.bdf.mesh_utils.breakdowns.get_volume_breakdown(model: BDF, property_ids=None, stop_if_no_volume: bool = True)[source]

Gets a breakdown of the volume by property region.

Parameters:
model: BDF

a BDF object

property_idslist[int] / int

list of property ID

stop_if_no_volumebool; default=True

prevents crashing if there are no elements

TODO: What about CONRODs?
#’PBRSECT’,
#’PBCOMP’,
#’PBMSECT’,
#’PBEAM3’,
#’PBEND’,