libs.simulation package¶
Subpackages¶
- libs.simulation.ngsolve package
- Subpackages
- libs.simulation.ngsolve.CSGeometries package
- Submodules
- libs.simulation.ngsolve.CSGeometries.CSGComponents module
- libs.simulation.ngsolve.CSGeometries.CSGCuboidMagnet module
- libs.simulation.ngsolve.CSGeometries.CSGEnvironment module
- libs.simulation.ngsolve.CSGeometries.CSGGMRSensor module
- libs.simulation.ngsolve.CSGeometries.CSGGear module
- libs.simulation.ngsolve.CSGeometries.CSGGearRack module
- libs.simulation.ngsolve.CSGeometries.CSGHallSensor module
- libs.simulation.ngsolve.CSGeometries.CSGMagnets module
- libs.simulation.ngsolve.CSGeometries.CSGRodMagnet module
- libs.simulation.ngsolve.CSGeometries.CSGSensorTemplate module
- libs.simulation.ngsolve.CSGeometries.CSGSensors module
- libs.simulation.ngsolve.CSGeometries.CSGShaft module
- Module contents
- libs.simulation.ngsolve.CSGeometries package
- Submodules
- libs.simulation.ngsolve.CSGeometry module
- libs.simulation.ngsolve.NGField module
- libs.simulation.ngsolve.NGMesh module
NGMeshNGMesh.add_fd()NGMesh.aspect_ratio()NGMesh.copy_2d()NGMesh.copy_3d()NGMesh.copy_mesh()NGMesh.copy_surface()NGMesh.data_handlerNGMesh.facedescriptor_list()NGMesh.init_mesh()NGMesh.init_mesh_tNGMesh.max_surfnr()NGMesh.meshNGMesh.mesh_badnessNGMesh.mesh_diagnose()NGMesh.mpNGMesh.netgen_meshNGMesh.nr_bcs()NGMesh.pmap2d()NGMesh.pmap3d()NGMesh.restrict_mesh()NGMesh.rotate_gear_mesh()NGMesh.skewness()NGMesh.smoothness()NGMesh.transfer_materials()NGMesh.update()
- Module contents
- Subpackages
Submodules¶
libs.simulation.MagneticField module¶
- class libs.simulation.MagneticField.MagneticField¶
Bases:
objectMetaclass for magnetic fields. The virtual methods a magnetic field must provide to be able to communicate with the other classes of the application are specified in this class.
- abstract create_field(data_handler, t: float) None¶
Method to initialize the magnetic field and perform the necessary calculations.
- Parameters:
data_handler (DataHandler) – Object of the Data class containing all simulation relevant data.
t (float) – Current time stamp:
- abstract draw() None¶
Method to draw the magnetic field.
- abstract get_b_field(x: ndarray, y: ndarray, z: ndarray) ndarray | None¶
Method to extract the magnetic flux density on positions defined by a grid on x, y and z.
- Parameters:
x (numpy.ndarray) – x grid.
y (numpy.ndarray) – y grid.
z (numpy.ndarray) – z grid.
- Returns:
Magnetic flux density on the grid passed.
- Return type:
Union[np.ndarray, None]
- abstract get_h_field(x: ndarray, y: ndarray, z: ndarray) ndarray | None¶
Method to extract the magnetic field strength on positions defined by a grid on x, y and z.
- Parameters:
x (numpy.ndarray) – x grid.
y (numpy.ndarray) – y grid.
z (numpy.ndarray) – z grid.
- Returns:
Magnetic field strength on the grid passed.
- Return type:
Union[np.ndarray, None]
libs.simulation.MagneticFieldFactory module¶
- class libs.simulation.MagneticFieldFactory.MagneticFieldFactory¶
Bases:
objectClass handles the initialisation of the magnetic field based on the existing implementations.
- static init_field(field_type: str, data_handler: DataHandler) NGField¶
Initialize an object of the MagneticField class based on a subclass.
- Parameters:
field_type (string) – Specifies the requested implementation.
data_handler (DataHandler) – Object of the Data class containing all simulation relevant data.
- Returns:
Object of a certain magnetic field subclass.
- Return type:
libs.simulation.SimulationHandler module¶
- class libs.simulation.SimulationHandler.SimulationHandler¶
Bases:
object- static draw(multiprocessing_tasks, data_stack: List[DataHandler], gui_handler: GUIHandler, idx: int) None | Future¶
- static draw_process(data_handler: DataHandler)¶
- static draw_thread(multiprocessing_tasks, data_stack: List[DataHandler], gui_handler: GUIHandler, idx: int) None¶
Method updates the data handler with the entries in the gui, performs a simulation of the frame at t0 and draws the result in the netgen gui
- static run(multiprocessing_tasks, data_stack: List[DataHandler], config_handler: ConfigHandler, gui_handler: GUIHandler, idx: int | None = None) None | Future¶
Method updates the data handler with the entries in the gui and performs the simulation
- static run_process(data_handler: DataHandler, max_memory: float, shared_list: Manager, queue: Queue) None¶
- static run_thread(multiprocessing_tasks, data_stack: List[DataHandler], config_handler: ConfigHandler, gui_handler: GUIHandler, idx: int | None = None) None¶