fiqus 2025.1.1__py3-none-any.whl → 2025.10.0__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 (56) hide show
  1. fiqus/MainFiQuS.py +4 -9
  2. fiqus/data/DataConductor.py +350 -301
  3. fiqus/data/DataFiQuS.py +42 -115
  4. fiqus/data/DataFiQuSCCT.py +150 -150
  5. fiqus/data/DataFiQuSConductor.py +97 -84
  6. fiqus/data/DataFiQuSConductorAC_Strand.py +701 -565
  7. fiqus/data/DataModelCommon.py +439 -0
  8. fiqus/data/DataMultipole.py +0 -13
  9. fiqus/data/DataRoxieParser.py +7 -0
  10. fiqus/data/DataWindingsCCT.py +37 -37
  11. fiqus/data/RegionsModelFiQuS.py +61 -104
  12. fiqus/geom_generators/GeometryCCT.py +904 -905
  13. fiqus/geom_generators/GeometryConductorAC_Strand.py +1863 -1391
  14. fiqus/geom_generators/GeometryMultipole.py +5 -4
  15. fiqus/geom_generators/GeometryPancake3D.py +1 -1
  16. fiqus/getdp_runners/RunGetdpCCT.py +13 -4
  17. fiqus/getdp_runners/RunGetdpConductorAC_Strand.py +341 -201
  18. fiqus/getdp_runners/RunGetdpPancake3D.py +2 -2
  19. fiqus/mains/MainConductorAC_Strand.py +141 -133
  20. fiqus/mains/MainMultipole.py +6 -5
  21. fiqus/mains/MainPancake3D.py +3 -4
  22. fiqus/mesh_generators/MeshCCT.py +209 -209
  23. fiqus/mesh_generators/MeshConductorAC_Strand.py +709 -656
  24. fiqus/mesh_generators/MeshMultipole.py +43 -46
  25. fiqus/mesh_generators/MeshPancake3D.py +7 -4
  26. fiqus/parsers/ParserDAT.py +16 -16
  27. fiqus/parsers/ParserGetDPOnSection.py +212 -212
  28. fiqus/parsers/ParserGetDPTimeTable.py +134 -134
  29. fiqus/parsers/ParserMSH.py +53 -53
  30. fiqus/parsers/ParserPOS.py +214 -214
  31. fiqus/parsers/ParserRES.py +142 -142
  32. fiqus/plotters/PlotPythonCCT.py +133 -133
  33. fiqus/plotters/PlotPythonConductorAC.py +1079 -855
  34. fiqus/plotters/PlotPythonMultipole.py +18 -18
  35. fiqus/post_processors/PostProcessCCT.py +444 -440
  36. fiqus/post_processors/PostProcessConductorAC.py +997 -49
  37. fiqus/post_processors/PostProcessMultipole.py +19 -19
  38. fiqus/pre_processors/PreProcessCCT.py +175 -175
  39. fiqus/pro_material_functions/ironBHcurves.pro +246 -246
  40. fiqus/pro_templates/combined/CCT_template.pro +275 -274
  41. fiqus/pro_templates/combined/ConductorAC_template.pro +1474 -1025
  42. fiqus/pro_templates/combined/Multipole_template.pro +22 -14
  43. fiqus/pro_templates/combined/Pancake3D_template.pro +128 -24
  44. fiqus/utils/Utils.py +12 -7
  45. {fiqus-2025.1.1.dist-info → fiqus-2025.10.0.dist-info}/METADATA +69 -66
  46. fiqus-2025.10.0.dist-info/RECORD +86 -0
  47. {fiqus-2025.1.1.dist-info → fiqus-2025.10.0.dist-info}/WHEEL +1 -1
  48. tests/test_geometry_generators.py +4 -0
  49. tests/test_mesh_generators.py +5 -0
  50. tests/test_solvers.py +41 -4
  51. tests/utils/fiqus_test_classes.py +15 -6
  52. tests/utils/generate_reference_files_ConductorAC.py +57 -57
  53. tests/utils/helpers.py +97 -97
  54. fiqus-2025.1.1.dist-info/RECORD +0 -85
  55. {fiqus-2025.1.1.dist-info → fiqus-2025.10.0.dist-info}/LICENSE.txt +0 -0
  56. {fiqus-2025.1.1.dist-info → fiqus-2025.10.0.dist-info}/top_level.txt +0 -0
@@ -1,84 +1,97 @@
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, Union
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[float] = Field(
16
+ None,
17
+ description="Boundary layer thickness in meters",
18
+ examples=1e-6,
19
+ ) # Thickness of the boundary
20
+ BoundaryMaterial: Optional[str] = Field(
21
+ None,
22
+ description="Material of the boundary",
23
+ examples=["steel", "Cu", "direct", "etc."],
24
+ )
25
+ Layer: Optional[int] = Field(
26
+ None,
27
+ 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.",
28
+ )
29
+ LayerIndex: Optional[int] = Field(
30
+ None, description="Index of the filament in the layer."
31
+ )
32
+
33
+ # ========== GEOMETRY YAML CLASSES ========== #
34
+ class Material(BaseModel):
35
+ Type: Optional[str] = Field(
36
+ None, description="Type of material", examples=["NbTi", "Nb3Sn", "Cu"]
37
+ )
38
+ RRR: Optional[float] = Field(None, description="Residual resistivity ratio")
39
+ T_ref_RRR_high: Optional[float] = Field(
40
+ None, description="High reference temperature for RRR"
41
+ )
42
+ T_ref_RRR_low: Optional[float] = Field(
43
+ None, description="Low reference temperature for RRR"
44
+ )
45
+
46
+ Resistivity: Optional[float] = Field(None, description="Resistivity of the material")
47
+ model_config = ConfigDict(frozen=True)
48
+
49
+
50
+ class Point(BaseModel):
51
+ Coordinates: List[float] = []
52
+
53
+
54
+ class Curve(BaseModel):
55
+ Type: str
56
+ Points: List[int] = []
57
+
58
+ Contact: Optional[str] = Field(
59
+ None,
60
+ description="If the curve is a contact layer between two surfaces this represents the contact type of strands",
61
+ examples=["crossing", "parallel"],
62
+ )
63
+ Thickness: Optional[float] = Field(
64
+ None, description="Thickness of the contact layer"
65
+ )
66
+ Material: Optional[str] = Field(
67
+ None,
68
+ description="Material of the contact layer",
69
+ examples=["steel", "direct", "Cu"],
70
+ )
71
+
72
+
73
+ class GeometryParameters(BaseModel):
74
+ Points: Dict[int, Point] = {}
75
+ Curves: Dict[int, Curve] = {}
76
+ Areas: Dict[int, Area] = {}
77
+
78
+ class DataDiffusionBarriers(BaseModel):
79
+ FilamentResistances: List[float] = []
80
+ DiffusionBarrierAreas: List[float] = []
81
+
82
+ class DataGlobalDiffusionBarrier(BaseModel):
83
+ RegionTag: Optional[int] = Field(None)
84
+ InternalRegionTag: Optional[int] = Field(None)
85
+ ContactResistivity: Optional[float] = Field(None)
86
+
87
+ class SolutionParameters(BaseModel):
88
+ Materials: Dict[str, Material] = {}
89
+ DiffusionBarriers: DataDiffusionBarriers = DataDiffusionBarriers()
90
+ Surfaces_excluded_from_TI: List[int] = []
91
+ GlobalDiffusionBarrier: DataGlobalDiffusionBarrier = DataGlobalDiffusionBarrier()
92
+
93
+ class Conductor(BaseModel):
94
+ Geometry: GeometryParameters = GeometryParameters()
95
+ Solution: SolutionParameters = SolutionParameters()
96
+
97
+