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.
Files changed (69) hide show
  1. fiqus/MainFiQuS.py +290 -134
  2. fiqus/data/DataConductor.py +301 -301
  3. fiqus/data/DataFiQuS.py +128 -84
  4. fiqus/data/DataFiQuSCCT.py +150 -150
  5. fiqus/data/DataFiQuSConductor.py +84 -84
  6. fiqus/data/DataFiQuSConductorAC_Strand.py +565 -565
  7. fiqus/data/DataFiQuSMultipole.py +716 -42
  8. fiqus/data/DataFiQuSPancake3D.py +737 -278
  9. fiqus/data/DataMultipole.py +180 -15
  10. fiqus/data/DataRoxieParser.py +90 -51
  11. fiqus/data/DataSettings.py +121 -0
  12. fiqus/data/DataWindingsCCT.py +37 -37
  13. fiqus/data/RegionsModelFiQuS.py +18 -6
  14. fiqus/geom_generators/GeometryCCT.py +905 -905
  15. fiqus/geom_generators/GeometryConductorAC_Strand.py +1391 -1391
  16. fiqus/geom_generators/GeometryMultipole.py +1827 -227
  17. fiqus/geom_generators/GeometryPancake3D.py +316 -117
  18. fiqus/geom_generators/GeometryPancake3DUtils.py +549 -0
  19. fiqus/getdp_runners/RunGetdpCCT.py +4 -4
  20. fiqus/getdp_runners/RunGetdpConductorAC_Strand.py +201 -201
  21. fiqus/getdp_runners/RunGetdpMultipole.py +115 -42
  22. fiqus/getdp_runners/RunGetdpPancake3D.py +28 -6
  23. fiqus/mains/MainCCT.py +2 -2
  24. fiqus/mains/MainConductorAC_Strand.py +132 -132
  25. fiqus/mains/MainMultipole.py +113 -62
  26. fiqus/mains/MainPancake3D.py +63 -23
  27. fiqus/mesh_generators/MeshCCT.py +209 -209
  28. fiqus/mesh_generators/MeshConductorAC_Strand.py +656 -656
  29. fiqus/mesh_generators/MeshMultipole.py +1243 -181
  30. fiqus/mesh_generators/MeshPancake3D.py +275 -192
  31. fiqus/parsers/ParserCOND.py +825 -0
  32. fiqus/parsers/ParserDAT.py +16 -16
  33. fiqus/parsers/ParserGetDPOnSection.py +212 -212
  34. fiqus/parsers/ParserGetDPTimeTable.py +134 -134
  35. fiqus/parsers/ParserMSH.py +53 -53
  36. fiqus/parsers/ParserPOS.py +214 -214
  37. fiqus/parsers/ParserRES.py +142 -142
  38. fiqus/plotters/PlotPythonCCT.py +133 -133
  39. fiqus/plotters/PlotPythonConductorAC.py +855 -855
  40. fiqus/plotters/PlotPythonMultipole.py +18 -18
  41. fiqus/post_processors/PostProcessCCT.py +440 -440
  42. fiqus/post_processors/PostProcessConductorAC.py +49 -49
  43. fiqus/post_processors/PostProcessMultipole.py +353 -229
  44. fiqus/post_processors/PostProcessPancake3D.py +8 -13
  45. fiqus/pre_processors/PreProcessCCT.py +175 -175
  46. fiqus/pro_assemblers/ProAssembler.py +14 -6
  47. fiqus/pro_material_functions/ironBHcurves.pro +246 -246
  48. fiqus/pro_templates/combined/CCT_template.pro +274 -274
  49. fiqus/pro_templates/combined/ConductorAC_template.pro +1025 -1025
  50. fiqus/pro_templates/combined/Multipole_template.pro +1694 -126
  51. fiqus/pro_templates/combined/Pancake3D_template.pro +2294 -1103
  52. fiqus/pro_templates/combined/TSA_materials.pro +162 -0
  53. fiqus/pro_templates/combined/materials.pro +36 -18
  54. fiqus/utils/Utils.py +508 -110
  55. fiqus/utils/update_data_settings.py +33 -0
  56. fiqus-2024.12.1.dist-info/METADATA +132 -0
  57. fiqus-2024.12.1.dist-info/RECORD +84 -0
  58. {fiqus-2024.7.0.dist-info → fiqus-2024.12.1.dist-info}/WHEEL +1 -1
  59. tests/test_FiQuS.py +1 -1
  60. tests/test_geometry_generators.py +101 -2
  61. tests/test_mesh_generators.py +154 -1
  62. tests/test_solvers.py +115 -21
  63. tests/utils/fiqus_test_classes.py +85 -21
  64. tests/utils/generate_reference_files_ConductorAC.py +57 -57
  65. tests/utils/generate_reference_files_Pancake3D.py +4 -5
  66. tests/utils/helpers.py +97 -97
  67. fiqus-2024.7.0.dist-info/METADATA +0 -103
  68. fiqus-2024.7.0.dist-info/RECORD +0 -79
  69. {fiqus-2024.7.0.dist-info → fiqus-2024.12.1.dist-info}/top_level.txt +0 -0
@@ -1,84 +1,84 @@
1
- from pydantic import BaseModel, Field, ConfigDict
2
- from typing import Dict, List, Optional
3
-
4
-
5
- class Area(BaseModel):
6
- Material: Optional[str] = Field(
7
- None, description="Material of the area", examples=["Cu", "NbTi", "Nb3Sn"]
8
- )
9
- Boundary: List[int] = (
10
- []
11
- ) # List of curves that define the closed boundary of the area
12
- InnerBoundaries: List[List[int]] = (
13
- []
14
- ) # List of lists of curves that define the closed boundaries of the holes in the area
15
- BoundaryThickness: Optional[Optional[float]] = None # Thickness of the boundary
16
- BoundaryMaterial: Optional[str] = Field(
17
- None,
18
- description="Material of the boundary",
19
- examples=["steel", "Cu", "direct", "etc."],
20
- )
21
- Layer: Optional[int] = Field(
22
- None,
23
- description="Filaments in the strand-model must be assigned to a layer. A layer is a collection of all filaments with the same radius from the center.",
24
- )
25
- LayerIndex: Optional[int] = Field(
26
- None, description="Index of the filament in the layer."
27
- )
28
-
29
- # ========== GEOMETRY YAML CLASSES ========== #
30
- class Material(BaseModel):
31
- Type: Optional[str] = Field(
32
- None, description="Type of material", examples=["NbTi", "Nb3Sn", "Cu"]
33
- )
34
- RRR: Optional[float] = Field(None, description="Residual resistivity ratio")
35
- T_ref_RRR_high: Optional[float] = Field(
36
- None, description="High reference temperature for RRR"
37
- )
38
- T_ref_RRR_low: Optional[float] = Field(
39
- None, description="Low reference temperature for RRR"
40
- )
41
- model_config = ConfigDict(frozen=True)
42
-
43
-
44
- class Point(BaseModel):
45
- Coordinates: List[float] = []
46
-
47
-
48
- class Curve(BaseModel):
49
- Type: str
50
- Points: List[int] = []
51
-
52
- Contact: Optional[str] = Field(
53
- None,
54
- description="If the curve is a contact layer between two surfaces this represents the contact type of strands",
55
- examples=["crossing", "parallel"],
56
- )
57
- Thickness: Optional[float] = Field(
58
- None, description="Thickness of the contact layer"
59
- )
60
- Material: Optional[str] = Field(
61
- None,
62
- description="Material of the contact layer",
63
- examples=["steel", "direct", "Cu"],
64
- )
65
-
66
-
67
-
68
-
69
- class GeometryParameters(BaseModel):
70
- Points: Dict[int, Point] = {}
71
- Curves: Dict[int, Curve] = {}
72
- Areas: Dict[int, Area] = {}
73
-
74
-
75
- class SolutionParameters(BaseModel):
76
- Materials: Dict[str, Material] = {}
77
- Surfaces_excluded_from_TI: List[int] = []
78
-
79
-
80
- class Conductor(BaseModel):
81
- Geometry: GeometryParameters = GeometryParameters()
82
- Solution: SolutionParameters = SolutionParameters()
83
-
84
-
1
+ from pydantic import BaseModel, Field, ConfigDict
2
+ from typing import Dict, List, Optional
3
+
4
+
5
+ class Area(BaseModel):
6
+ Material: Optional[str] = Field(
7
+ None, description="Material of the area", examples=["Cu", "NbTi", "Nb3Sn"]
8
+ )
9
+ Boundary: List[int] = (
10
+ []
11
+ ) # List of curves that define the closed boundary of the area
12
+ InnerBoundaries: List[List[int]] = (
13
+ []
14
+ ) # List of lists of curves that define the closed boundaries of the holes in the area
15
+ BoundaryThickness: Optional[Optional[float]] = None # Thickness of the boundary
16
+ BoundaryMaterial: Optional[str] = Field(
17
+ None,
18
+ description="Material of the boundary",
19
+ examples=["steel", "Cu", "direct", "etc."],
20
+ )
21
+ Layer: Optional[int] = Field(
22
+ None,
23
+ description="Filaments in the strand-model must be assigned to a layer. A layer is a collection of all filaments with the same radius from the center.",
24
+ )
25
+ LayerIndex: Optional[int] = Field(
26
+ None, description="Index of the filament in the layer."
27
+ )
28
+
29
+ # ========== GEOMETRY YAML CLASSES ========== #
30
+ class Material(BaseModel):
31
+ Type: Optional[str] = Field(
32
+ None, description="Type of material", examples=["NbTi", "Nb3Sn", "Cu"]
33
+ )
34
+ RRR: Optional[float] = Field(None, description="Residual resistivity ratio")
35
+ T_ref_RRR_high: Optional[float] = Field(
36
+ None, description="High reference temperature for RRR"
37
+ )
38
+ T_ref_RRR_low: Optional[float] = Field(
39
+ None, description="Low reference temperature for RRR"
40
+ )
41
+ model_config = ConfigDict(frozen=True)
42
+
43
+
44
+ class Point(BaseModel):
45
+ Coordinates: List[float] = []
46
+
47
+
48
+ class Curve(BaseModel):
49
+ Type: str
50
+ Points: List[int] = []
51
+
52
+ Contact: Optional[str] = Field(
53
+ None,
54
+ description="If the curve is a contact layer between two surfaces this represents the contact type of strands",
55
+ examples=["crossing", "parallel"],
56
+ )
57
+ Thickness: Optional[float] = Field(
58
+ None, description="Thickness of the contact layer"
59
+ )
60
+ Material: Optional[str] = Field(
61
+ None,
62
+ description="Material of the contact layer",
63
+ examples=["steel", "direct", "Cu"],
64
+ )
65
+
66
+
67
+
68
+
69
+ class GeometryParameters(BaseModel):
70
+ Points: Dict[int, Point] = {}
71
+ Curves: Dict[int, Curve] = {}
72
+ Areas: Dict[int, Area] = {}
73
+
74
+
75
+ class SolutionParameters(BaseModel):
76
+ Materials: Dict[str, Material] = {}
77
+ Surfaces_excluded_from_TI: List[int] = []
78
+
79
+
80
+ class Conductor(BaseModel):
81
+ Geometry: GeometryParameters = GeometryParameters()
82
+ Solution: SolutionParameters = SolutionParameters()
83
+
84
+