fiqus 2024.7.0__py3-none-any.whl → 2024.12.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fiqus/MainFiQuS.py +290 -134
- fiqus/data/DataConductor.py +301 -301
- fiqus/data/DataFiQuS.py +128 -84
- fiqus/data/DataFiQuSCCT.py +150 -150
- fiqus/data/DataFiQuSConductor.py +84 -84
- fiqus/data/DataFiQuSConductorAC_Strand.py +565 -565
- fiqus/data/DataFiQuSMultipole.py +716 -42
- fiqus/data/DataFiQuSPancake3D.py +737 -278
- fiqus/data/DataMultipole.py +180 -15
- fiqus/data/DataRoxieParser.py +90 -51
- fiqus/data/DataSettings.py +121 -0
- fiqus/data/DataWindingsCCT.py +37 -37
- fiqus/data/RegionsModelFiQuS.py +18 -6
- fiqus/geom_generators/GeometryCCT.py +905 -905
- fiqus/geom_generators/GeometryConductorAC_Strand.py +1391 -1391
- fiqus/geom_generators/GeometryMultipole.py +1827 -227
- fiqus/geom_generators/GeometryPancake3D.py +316 -117
- fiqus/geom_generators/GeometryPancake3DUtils.py +549 -0
- fiqus/getdp_runners/RunGetdpCCT.py +4 -4
- fiqus/getdp_runners/RunGetdpConductorAC_Strand.py +201 -201
- fiqus/getdp_runners/RunGetdpMultipole.py +115 -42
- fiqus/getdp_runners/RunGetdpPancake3D.py +28 -6
- fiqus/mains/MainCCT.py +2 -2
- fiqus/mains/MainConductorAC_Strand.py +132 -132
- fiqus/mains/MainMultipole.py +113 -62
- fiqus/mains/MainPancake3D.py +63 -23
- fiqus/mesh_generators/MeshCCT.py +209 -209
- fiqus/mesh_generators/MeshConductorAC_Strand.py +656 -656
- fiqus/mesh_generators/MeshMultipole.py +1243 -181
- fiqus/mesh_generators/MeshPancake3D.py +275 -192
- fiqus/parsers/ParserCOND.py +825 -0
- fiqus/parsers/ParserDAT.py +16 -16
- fiqus/parsers/ParserGetDPOnSection.py +212 -212
- fiqus/parsers/ParserGetDPTimeTable.py +134 -134
- fiqus/parsers/ParserMSH.py +53 -53
- fiqus/parsers/ParserPOS.py +214 -214
- fiqus/parsers/ParserRES.py +142 -142
- fiqus/plotters/PlotPythonCCT.py +133 -133
- fiqus/plotters/PlotPythonConductorAC.py +855 -855
- fiqus/plotters/PlotPythonMultipole.py +18 -18
- fiqus/post_processors/PostProcessCCT.py +440 -440
- fiqus/post_processors/PostProcessConductorAC.py +49 -49
- fiqus/post_processors/PostProcessMultipole.py +353 -229
- fiqus/post_processors/PostProcessPancake3D.py +8 -13
- fiqus/pre_processors/PreProcessCCT.py +175 -175
- fiqus/pro_assemblers/ProAssembler.py +14 -6
- fiqus/pro_material_functions/ironBHcurves.pro +246 -246
- fiqus/pro_templates/combined/CCT_template.pro +274 -274
- fiqus/pro_templates/combined/ConductorAC_template.pro +1025 -1025
- fiqus/pro_templates/combined/Multipole_template.pro +1694 -126
- fiqus/pro_templates/combined/Pancake3D_template.pro +2294 -1103
- fiqus/pro_templates/combined/TSA_materials.pro +162 -0
- fiqus/pro_templates/combined/materials.pro +36 -18
- fiqus/utils/Utils.py +508 -110
- fiqus/utils/update_data_settings.py +33 -0
- fiqus-2024.12.1.dist-info/METADATA +132 -0
- fiqus-2024.12.1.dist-info/RECORD +84 -0
- {fiqus-2024.7.0.dist-info → fiqus-2024.12.1.dist-info}/WHEEL +1 -1
- tests/test_FiQuS.py +1 -1
- tests/test_geometry_generators.py +101 -2
- tests/test_mesh_generators.py +154 -1
- tests/test_solvers.py +115 -21
- tests/utils/fiqus_test_classes.py +85 -21
- tests/utils/generate_reference_files_ConductorAC.py +57 -57
- tests/utils/generate_reference_files_Pancake3D.py +4 -5
- tests/utils/helpers.py +97 -97
- fiqus-2024.7.0.dist-info/METADATA +0 -103
- fiqus-2024.7.0.dist-info/RECORD +0 -79
- {fiqus-2024.7.0.dist-info → fiqus-2024.12.1.dist-info}/top_level.txt +0 -0
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import numpy as np
|
|
3
|
-
import re
|
|
4
|
-
import matplotlib.pyplot as plt
|
|
5
|
-
import matplotlib.pylab as pl
|
|
6
|
-
from matplotlib.animation import FuncAnimation
|
|
7
|
-
import pandas as pd
|
|
8
|
-
from scipy import integrate, interpolate
|
|
9
|
-
from typing import (List, Literal, Callable)
|
|
10
|
-
from pydantic import BaseModel
|
|
11
|
-
|
|
12
|
-
from fiqus.utils.Utils import FilesAndFolders as Util
|
|
13
|
-
from fiqus.data.DataFiQuSConductorAC_Strand import CACStrandSolve, CACStrandPostproc, CACStrandMesh, CACStrandGeometry
|
|
14
|
-
from fiqus.plotters.PlotPythonConductorAC import PlotPython, SimulationData
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class PostProcess:
|
|
18
|
-
"""
|
|
19
|
-
This class loads and stores the data from a simulation and can apply various postprocessing operations on the data.
|
|
20
|
-
The simulation data is saved as a SimulationData object.
|
|
21
|
-
"""
|
|
22
|
-
def __init__(self, fdm, model_data_output_path) -> None:
|
|
23
|
-
self.fdm = fdm
|
|
24
|
-
self.model_data_output_path = model_data_output_path
|
|
25
|
-
self.geometry_name = f"Geometry_{self.fdm.run.geometry}"
|
|
26
|
-
self.mesh_name = f"Mesh_{self.fdm.run.mesh}"
|
|
27
|
-
self.solution_name = f"Solution_{self.fdm.run.solution}"
|
|
28
|
-
|
|
29
|
-
self.simulation_data = SimulationData(model_data_output_path, self.geometry_name, self.mesh_name, self.solution_name)
|
|
30
|
-
|
|
31
|
-
def plot_instantaneous_loss(self):
|
|
32
|
-
print("Total loss: ", self.simulation_data.cumulative_power["TotalLoss"].iloc[-1])
|
|
33
|
-
print("Total filament loss: ", self.simulation_data.cumulative_power["FilamentLoss"].iloc[-1])
|
|
34
|
-
print("Total coupling loss: ", self.simulation_data.cumulative_power["CouplingLoss"].iloc[-1])
|
|
35
|
-
print("Total eddy loss: ", self.simulation_data.cumulative_power["EddyLoss"].iloc[-1])
|
|
36
|
-
plot_options = self.fdm.magnet.postproc.plot_instantaneous_power
|
|
37
|
-
self.simulation_data.plot_instantaneous_power(
|
|
38
|
-
show=plot_options.show,
|
|
39
|
-
title=plot_options.title,
|
|
40
|
-
save_plot=plot_options.save,
|
|
41
|
-
save_folder_path=os.path.join(self.model_data_output_path, self.geometry_name, self.mesh_name, self.solution_name),
|
|
42
|
-
save_file_name=plot_options.save_file_name,
|
|
43
|
-
overwrite=self.fdm.run.overwrite
|
|
44
|
-
)
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
1
|
+
import os
|
|
2
|
+
import numpy as np
|
|
3
|
+
import re
|
|
4
|
+
import matplotlib.pyplot as plt
|
|
5
|
+
import matplotlib.pylab as pl
|
|
6
|
+
from matplotlib.animation import FuncAnimation
|
|
7
|
+
import pandas as pd
|
|
8
|
+
from scipy import integrate, interpolate
|
|
9
|
+
from typing import (List, Literal, Callable)
|
|
10
|
+
from pydantic import BaseModel
|
|
11
|
+
|
|
12
|
+
from fiqus.utils.Utils import FilesAndFolders as Util
|
|
13
|
+
from fiqus.data.DataFiQuSConductorAC_Strand import CACStrandSolve, CACStrandPostproc, CACStrandMesh, CACStrandGeometry
|
|
14
|
+
from fiqus.plotters.PlotPythonConductorAC import PlotPython, SimulationData
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class PostProcess:
|
|
18
|
+
"""
|
|
19
|
+
This class loads and stores the data from a simulation and can apply various postprocessing operations on the data.
|
|
20
|
+
The simulation data is saved as a SimulationData object.
|
|
21
|
+
"""
|
|
22
|
+
def __init__(self, fdm, model_data_output_path) -> None:
|
|
23
|
+
self.fdm = fdm
|
|
24
|
+
self.model_data_output_path = model_data_output_path
|
|
25
|
+
self.geometry_name = f"Geometry_{self.fdm.run.geometry}"
|
|
26
|
+
self.mesh_name = f"Mesh_{self.fdm.run.mesh}"
|
|
27
|
+
self.solution_name = f"Solution_{self.fdm.run.solution}"
|
|
28
|
+
|
|
29
|
+
self.simulation_data = SimulationData(model_data_output_path, self.geometry_name, self.mesh_name, self.solution_name)
|
|
30
|
+
|
|
31
|
+
def plot_instantaneous_loss(self):
|
|
32
|
+
print("Total loss: ", self.simulation_data.cumulative_power["TotalLoss"].iloc[-1])
|
|
33
|
+
print("Total filament loss: ", self.simulation_data.cumulative_power["FilamentLoss"].iloc[-1])
|
|
34
|
+
print("Total coupling loss: ", self.simulation_data.cumulative_power["CouplingLoss"].iloc[-1])
|
|
35
|
+
print("Total eddy loss: ", self.simulation_data.cumulative_power["EddyLoss"].iloc[-1])
|
|
36
|
+
plot_options = self.fdm.magnet.postproc.plot_instantaneous_power
|
|
37
|
+
self.simulation_data.plot_instantaneous_power(
|
|
38
|
+
show=plot_options.show,
|
|
39
|
+
title=plot_options.title,
|
|
40
|
+
save_plot=plot_options.save,
|
|
41
|
+
save_folder_path=os.path.join(self.model_data_output_path, self.geometry_name, self.mesh_name, self.solution_name),
|
|
42
|
+
save_file_name=plot_options.save_file_name,
|
|
43
|
+
overwrite=self.fdm.run.overwrite
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|