Skip to content

Fixing api leakage | Material manager. #37

@wgbowley

Description

@wgbowley

This is a real bad choose to keep the NdFeB for the tree it makes it such that to take a quality you have
to do the "material variable"."material name" which is just stupid. So I plan to move the name into the meta data just as a name tag to fix that.

NOTE:
Will have to update this archive to reflect the change however
(https://github.com/wgbowley/hercules_challenge/blob/main/poc_axial_generator/rough_calculation/rough_model.py)

from pyfea.domain.materials.manager import MaterialManager

manager = MaterialManager()
magnet_material = manager.use_material("NdFeB", grade="N55")

magnet_material.tree()
density = magnet_material.NdFeB.physical.density
└── Root
    └── NdFeB
        ├── meta
        │   ├── type: magnet_material
        │   ├── composition: Sintered: Neodymium, Iron, Boron
        │   ├── temperature_grade: Standard - non high temperature resistance
        │   └── note: matweb.com: `Alliance N-52 Sintered NdFeB Neodymium Magnet`; femm: N30-55 Series
        ├── chemical
        │   └── molar_mass: 1.08119 (kg·mol⁻¹)
        ├── physical
        │   ├── density: 7.5 k(kg·m⁻³)
        │   ├── poisson_ratio: 0.24 (∅)
        │   ├── shear_modulus: 64.0 G(Pa)
        │   ├── yield_strength: 80.0 M(Pa)
        │   ├── tensile_strength: 80.0 M(Pa)
        │   ├── youngs_modulus: 160.0 G(Pa)
        │   └── bulk_modulus: 102.6 G(Pa)
        ├── electrical
        │   ├── relative_permittivity: [1 1] (∅)
        │   └── temperature_conductivity: [
        │       ├── [273.0 (K), 697.0 k(S_m)]
        │       ├── [293.0 (K), 667.0 k(S_m)]
        │       ├── [323.0 (K), 663.0 k(S_m)]
        │       ├── [373.0 (K), 656.0 k(S_m)]
        │       ├── [423.0 (K), 649.0 k(S_m)]
        │       └── [473.0 (K), 643.0 k(S_m)]
        │       ]
        ├── magnetic
        │   ├── relative_permeability: [1.05 1.05] (∅)
        │   ├── curie_temperature: 583.15 (K)
        │   ├── alpha_remanence: -0.12 (K⁻¹)
        │   ├── beta_coercivity: -0.6 (K⁻¹)
        │   ├── remanence: 1.47 (T)
        │   └── coercivity: 923.0 k(A_m)
        ├── grades
        │   ├── N30: [836.0 k(A_m), 1.1 (T)]
        │   ├── N33: [879.0 k(A_m), 1.14 (T)]
        │   ├── N35: [906.0 k(A_m), 1.17 (T)]
        │   ├── N38: [945.0 k(A_m), 1.22 (T)]
        │   ├── N40: [970.0 k(A_m), 1.25 (T)]
        │   ├── N42: [995.0 k(A_m), 1.28 (T)]
        │   ├── N45: [1.03 M(A_m), 1.32 (T)]
        │   ├── N48: [1.015 M(A_m), 1.37 (T)]
        │   ├── N50: [988.0 k(A_m), 1.4 (T)]
        │   ├── N52: [956.0 k(A_m), 1.43 (T)]
        │   └── N55: [923.0 k(A_m), 1.47 (T)]
        └── thermal
            ├── specific_heat: 460.0 (c)
            ├── max_working_tem: 353.15 (K)
            ├── reference_temperature: 298.15 (K)
            └── temperature_conductivity: [[273.0 (K), 7.83 (k)], [293.0 (K), 7.6 (k)], [323.0 (K), 7.14 (k)], [373.0 (K), 6.38 (k)]]

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions