BillOfMaterials#
- class pynumad.objects.bom.BillOfMaterials#
Bases:
objectBill of Materials class.
Contains per-layer material information for each component region of the blade (HP shell, LP shell, and each shear web), stored as
pandas.DataFrameobjects.- hp#
HP-side shell layers. Columns:
layernum,materialid,name,beginsta,endsta,maxwidth,avgwidth,area,thickness,weight,angle,sta_begin_idx,sta_end_idx,seg_start,seg_end.- Type:
pd.DataFrame
- lp#
LP-side shell layers (same columns as
hp).- Type:
pd.DataFrame
- sw#
Shear-web layers. Same columns as
hpplusweb_id(int).- Type:
pd.DataFrame
- mold#
Dict of DataFrames with mold/prefab dimensional data (populated by generate_segmented). Keys: ‘shell’, ‘spar’, ‘LEreinf’, ‘TEreinf’, ‘root’, ‘web’.
- Type:
dict
- lebond#
Total leading-edge bond length [mm].
- Type:
float
- tebond#
Total trailing-edge bond length [mm].
- Type:
float
- swbonds#
Per-web bond-line length arrays [mm].
- Type:
list[ndarray]
- dryweight#
Total dry material weight [kg].
- Type:
float
- generate(ispan, components, materials, keypoints: KeyPoints)#
Generate the Bill-of-Materials.
- Parameters:
ispan (ndarray) – Interpolated span station locations [m].
components (dict) – Component definitions (from
Definition.components).materials (dict) – Material definitions (from
Definition.materials).keypoints (KeyPoints)
- Returns:
self
- generate_segmented(segments, ispan, components, materials, keypoints)#
Generate a segmented Bill-of-Materials.
- Parameters:
segments (list of dict) –
- Each entry describes one blade segment with keys:
’span_nd’ : [start, end] normalized spanwise extents ‘hp_extents’ : [key1, key2] HP chordwise bounds (e.g. [‘le’,’te’]) ‘lp_extents’ : [key1, key2] LP chordwise bounds
ispan (np.ndarray) – Interpolated spanwise stations (m)
components (dict) – Component name -> Component objects
materials (dict) – Material id -> Material objects
keypoints (KeyPoints) – Computed keypoints (must already have key_bonds)
- pynumad.objects.bom.find_layer_extents(layer_dist, layer_n)#
Find the begin and end station indices where a layer count reaches layer_n.
- Parameters:
layer_dist (array-like) – Per-station layer count distribution.
layer_n (scalar) – Layer threshold to find extents for.
- Returns:
begin_station (list[int])
end_station (list[int])
- class pynumad.objects.bom.BillOfMaterialsEntry#
Bases:
objectA simple class to organize the attributes of a Bill of Materials
- layernum#
Layer
- Type:
int
- materialid#
Material ID
- Type:
int
- name#
Component or region name
- Type:
str
- beginsta#
Begin station (m)
- Type:
float
- endsta#
End station (m)
- Type:
float
- maxwidth#
Max width (m)
- Type:
float
- avgwidth#
Average width (m)
- Type:
float
- area#
3D area (m^2)
- Type:
float
- thickness#
Layer thickness (mm)
- Type:
float
- weight#
Computed dry layer weight (g)
- Type:
float