emerge 1.0.0__py3-none-any.whl → 1.0.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.

Potentially problematic release.


This version of emerge might be problematic. Click here for more details.

@@ -309,34 +309,66 @@ class Simulation:
309
309
  logger.info('Different cached data detected, rerunning simulation.')
310
310
  return True
311
311
 
312
- def check_version(self, version: str) -> None:
313
- """Compares the provided version number with the version number of EMerge that is running the script.
314
-
315
- You may remove any call to check_version to suppress VersionErrors and warnings.
316
-
317
- Args:
318
- version (str): The EMerge version you intend to write this code for.
319
-
320
- Raises:
321
- VersionError: A potential version error if incompatibility is possible
312
+ def check_version(self, target_version: str, *, log: bool = False) -> None:
322
313
  """
323
- vM, vm, vp = [float(x) for x in version.split('.')]
324
- cM, cm, cp = [float(x) for x in __version__.split('.')]
325
- if vM != cM:
326
- raise VersionError(f"You are running a script designed for version {version} with a possibly incompatible version of EMerge {__version__}. \n You can upgrade your version of emerge with: pip --upgrade emerge")
327
- if vm != cm:
328
- raise VersionError(f"You are running a script designed for version {version} with a possibly incompatible version of EMerge {__version__}. \n You can upgrade your version of emerge with: pip --upgrade emerge")
329
- if vp != cp:
330
- logger.warning("You are running a script designed for a different version of EMerge.")
331
- logger.warning(f"The script version: {version}")
332
- logger.warning(f"EMerge version: {__version__}")
333
- logger.warning("Usually EMerge works without a problem but Errors may occur.")
334
- logger.warning("You can upgrade your version of emerge with: pip --upgrade emerge")
335
- logger.warning("You may suppress this error by removing the call to .check_version().")
336
- logger.warning("Press Ctrl+C to abort.")
337
- ans = input('Press enter to proceed or [Q] to quit:')
338
- if ans.lower().strip()=='q':
339
- quit()
314
+ Ensure the script targets an EMerge version compatible with the current runtime.
315
+
316
+ Parameters
317
+ ----------
318
+ target_version : str
319
+ The EMerge version this script was written for (e.g. "1.4.0").
320
+ log : bool, optional
321
+ If True and a `logger` is available, emit a single WARNING with the same
322
+ message as the exception. Defaults to False.
323
+
324
+ Raises
325
+ ------
326
+ VersionError
327
+ If the script's target version differs from the running EMerge version.
328
+ """
329
+ try:
330
+ from packaging.version import Version as _V
331
+ v_script = _V(target_version)
332
+ v_runtime = _V(__version__)
333
+ newer = v_script > v_runtime
334
+ older = v_script < v_runtime
335
+ except Exception:
336
+ def _parse(v: str):
337
+ try:
338
+ return tuple(int(p) for p in v.split("."))
339
+ except Exception:
340
+ # Last-resort: compare as strings to avoid crashing the check itself
341
+ return tuple(v.split("."))
342
+ v_script = _parse(target_version)
343
+ v_runtime = _parse(__version__)
344
+ newer = v_script > v_runtime
345
+ older = v_script < v_runtime
346
+
347
+ if not newer and not older:
348
+ return # exact match
349
+
350
+ if newer:
351
+ msg = (
352
+ f"Script targets EMerge {target_version}, but runtime is {__version__}. "
353
+ "The script may rely on features added after your installed version. "
354
+ "Recommended: upgrade EMerge (`pip install --upgrade emerge`). "
355
+ "If you know the script is compatible, you may remove this check."
356
+ )
357
+ else: # older
358
+ msg = (
359
+ f"Script targets EMerge {target_version}, but runtime is {__version__}. "
360
+ "APIs may have changed since the targeted version. "
361
+ "Recommended: update the script for the current EMerge, or run a matching older release. "
362
+ "If you know the script is compatible, you may remove this check."
363
+ )
364
+
365
+ if log:
366
+ try:
367
+ logger.warning(msg)
368
+ except Exception:
369
+ pass
370
+
371
+ raise VersionError(msg)
340
372
 
341
373
  def save(self) -> None:
342
374
  """Saves the current model in the provided project directory."""
@@ -414,7 +446,8 @@ class Simulation:
414
446
  use_gmsh: bool = False,
415
447
  plot_mesh: bool = False,
416
448
  volume_mesh: bool = True,
417
- opacity: float | None = None) -> None:
449
+ opacity: float | None = None,
450
+ labels: bool = False) -> None:
418
451
  """View the current geometry in either the BaseDisplay object (PVDisplay only) or
419
452
  the GMSH viewer.
420
453
 
@@ -424,21 +457,21 @@ class Simulation:
424
457
  plot_mesh (bool, optional): If the mesh should be plot instead of the object. Defaults to False.
425
458
  volume_mesh (bool, optional): If the internal mesh should be plot instead of only the surface boundary mesh. Defaults to True
426
459
  opacity (float | None, optional): The object/mesh opacity. Defaults to None.
427
-
460
+ labels: (bool, optional): If geometry name labels should be shown. Defaults to False.
428
461
  """
429
462
  if not (self.display is not None and self.mesh.defined) or use_gmsh:
430
463
  gmsh.model.occ.synchronize()
431
464
  gmsh.fltk.run()
432
465
  return
433
466
  for geo in _GEOMANAGER.all_geometries():
434
- self.display.add_object(geo, mesh=plot_mesh, opacity=opacity, volume_mesh=volume_mesh)
467
+ self.display.add_object(geo, mesh=plot_mesh, opacity=opacity, volume_mesh=volume_mesh, label=labels)
435
468
  if selections:
436
- [self.display.add_object(sel, color='red', opacity=0.3) for sel in selections]
469
+ [self.display.add_object(sel, color='red', opacity=0.3, label=labels) for sel in selections]
437
470
  self.display.show()
438
471
 
439
472
  return None
440
473
 
441
- def set_periodic_cell(self, cell: PeriodicCell, excluded_faces: list[FaceSelection] | None = None):
474
+ def set_periodic_cell(self, cell: PeriodicCell, included_faces: FaceSelection | None = None):
442
475
  """Set the given periodic cell object as the simulations peridicity.
443
476
 
444
477
  Args:
@@ -447,6 +480,7 @@ class Simulation:
447
480
  """
448
481
  self.mw.bc._cell = cell
449
482
  self._cell = cell
483
+ self._cell.included_faces = included_faces
450
484
 
451
485
  def commit_geometry(self, *geometries: GeoObject | list[GeoObject]) -> None:
452
486
  """Finalizes and locks the current geometry state of the simulation.
@@ -460,7 +494,7 @@ class Simulation:
460
494
  else:
461
495
  geometries_parsed = unpack_lists(geometries + tuple([item for item in self.data.sim.default.values() if isinstance(item, GeoObject)]))
462
496
 
463
- self.data.sim['geometries'] = geometries_parsed
497
+ self.data.sim['geos'] = {geo.name: geo for geo in geometries_parsed}
464
498
  self.mesher.submit_objects(geometries_parsed)
465
499
  self._defined_geometries = True
466
500
  self.display._facetags = [dt[1] for dt in gmsh.model.get_entities(2)]
emerge/_emerge/solver.py CHANGED
@@ -15,8 +15,8 @@
15
15
  # along with this program; if not, see
16
16
  # <https://www.gnu.org/licenses/>.
17
17
 
18
-
19
18
  from __future__ import annotations
19
+
20
20
  from scipy.sparse import csr_matrix # type: ignore
21
21
  from scipy.sparse.csgraph import reverse_cuthill_mckee # type: ignore
22
22
  from scipy.sparse.linalg import bicgstab, gmres, gcrotmk, eigs, splu # type: ignore
@@ -286,6 +286,7 @@ class Solver:
286
286
  """
287
287
  real_only: bool = False
288
288
  req_sorter: bool = False
289
+ released_gil: bool = False
289
290
 
290
291
  def __init__(self):
291
292
  self.own_preconditioner: bool = False
@@ -479,7 +480,8 @@ class SolverSuperLU(Solver):
479
480
  """ Implements Scipi's direct SuperLU solver."""
480
481
  req_sorter: bool = False
481
482
  real_only: bool = False
482
-
483
+ released_gil: bool = True
484
+
483
485
  def __init__(self):
484
486
  super().__init__()
485
487
  self.atol = 1e-5
@@ -502,6 +504,7 @@ class SolverSuperLU(Solver):
502
504
 
503
505
  def solve(self, A, b, precon, reuse_factorization: bool = False, id: int = -1) -> tuple[np.ndarray, SolveReport]:
504
506
  logger.info(f'[ID={id}] Calling SuperLU Solver.')
507
+
505
508
  self.single = True
506
509
  if not reuse_factorization:
507
510
  logger.trace('Computing LU-Decomposition')
@@ -903,6 +906,10 @@ class SolveRoutine:
903
906
  bool: If the solver is legal
904
907
  """
905
908
  if any(isinstance(solver, solvertype) for solvertype in self.disabled_solver):
909
+ logger.warning(f'The selected solver {solver} cannot be used as it is disabled.')
910
+ return False
911
+ if self.parallel=='MT' and not solver.released_gil:
912
+ logger.warning(f'The selected solver {solver} cannot be used in MultiThreading as it does not release the GIL')
906
913
  return False
907
914
  return True
908
915
 
emerge/beta/dxf.py ADDED
@@ -0,0 +1 @@
1
+ from .._emerge.geo.pcb_tools.dxf import import_dxf
emerge/lib.py CHANGED
@@ -14,6 +14,8 @@
14
14
  """
15
15
  from ._emerge.material import Material, AIR, COPPER, PEC
16
16
  from ._emerge.const import C0, Z0, PI, EPS0, MU0
17
+ from .materials import isola
18
+ from .materials import rogers
17
19
 
18
20
  EISO: float = (Z0/(2*PI))**0.5
19
21
  EOMNI = (3*Z0/(4*PI))**0.5
@@ -280,6 +282,7 @@ DIEL_XT_Duroid_8100 = Material(er=3.54, tand=0.0049, color="#21912b
280
282
  DIEL_XT_Duroid_81000_004IN_Thick = Material(er=3.32, tand=0.0038, color="#21912b", opacity=0.3, name="Rogers XT/duroid 81000 0.004in")
281
283
  DIEL_TEFLON = Material(er=2.1, tand=0.0003, color='#eeeeee', opacity=0.3, name="Teflon")
282
284
 
285
+ DIEL_IS420_approx = Material(er=4.5, tand=0.018, color="#CCDE30", opacity=0.3, name="ISOLA420 approximate")
283
286
 
284
287
  # Legacy FR Materials
285
288
  DIEL_FR1 = Material(er=4.8, tand=0.025, color="#3c9747", opacity=0.3, name="FR-1 (Paper Phenolic)")
@@ -0,0 +1 @@
1
+ from . import isola
@@ -0,0 +1,294 @@
1
+ from .._emerge.material import Material, FreqDependent
2
+ from scipy.interpolate import interp1d
3
+ import numpy as np
4
+
5
+ FS_350HR = np.array([100e6, 500e6, 1e9, 2e9, 5e9, 10e9])
6
+
7
+ def gen_f350(*vals) -> FreqDependent:
8
+ return FreqDependent(scalar=interp1d(FS_350HR, np.array(vals), bounds_error=False, fill_value=(vals[0], vals[-1])))
9
+
10
+
11
+ ############################################################
12
+ # IS370 SHEETS #
13
+ ############################################################
14
+
15
+ IS370HR_1x106_20 = Material(er=gen_f350(3.89, 3.84, 3.81, 3.77, 3.63, 3.63),
16
+ tand=gen_f350(0.0018, 0.021, 0.024, 0.025, 0.03, 0.03),
17
+ color="#1ea430", opacity=0.3, name='Isola 370HR 1x106 2.0mil')
18
+
19
+ IS370HR_1x1067_20 = Material(er=gen_f350(3.99, 3.94, 3.91, 3.88, 3.74, 3.74),
20
+ tand=gen_f350(0.017, 0.020, 0.022, 0.023, 0.028, 0.028),
21
+ color="#1ea430", opacity=0.3, name='Isola 370HR 1x1067 2.0mil')
22
+
23
+ IS370HR_1x1080_25 = Material(er=gen_f350(4.11, 4.06, 4.04, 4.00, 3.88, 3.88),
24
+ tand=gen_f350(0.016, 0.018, 0.021, 0.022, 0.026, 0.026),
25
+ color="#1ea430", opacity=0.3, name='Isola 370HR 1x1080 2.5mil')
26
+
27
+ IS370HR_1x1080_30 = Material(er=gen_f350(4.09, 4.04, 4.02, 3.99, 3.86, 3.86),
28
+ tand=gen_f350(0.16, 0.18, 0.021, 0.022, 0.026, 0.026),
29
+ color="#1ea430", opacity=0.3, name='Isola 370HR 1x1080 3.0mil')
30
+
31
+ IS370HR_1x2113_30 = Material(er=gen_f350(4.34, 4.30, 4.28, 4.25, 4.14, 4.14),
32
+ tand=gen_f350(0.014, 0.016, 0.018, 0.019, 0.022, 0.022),
33
+ color="#1ea430", opacity=0.3, name='Isola 370HR 1x2113 3.0mil')
34
+
35
+ IS370HR_1x1086_30 = Material(er=gen_f350(4.07, 4.02, 4.00, 3.97, 3.84, 3.84),
36
+ tand=gen_f350(0.016, 0.019, 0.021, 0.022, 0.026, 0.026),
37
+ color="#1ea430", opacity=0.3, name='Isola 370HR 1x1086 3.0mil')
38
+
39
+ IS370HR_1x2113_35 = Material(er=gen_f350(4.34, 4.30, 4.28, 4.25, 4.14, 4.14),
40
+ tand=gen_f350(0.014, 0.016, 0.018, 0.019, 0.022, 0.022),
41
+ color="#1ea430", opacity=0.3, name='Isola 370HR 1x2113 3.5 mil')
42
+
43
+ IS370HR_1x3313_35 = Material(er=gen_f350(4.24, 4.19, 4.17, 4.14, 4.03, 4.03),
44
+ tand=gen_f350(0.015, 0.017, 0.019, 0.02, 0.023, 0.023),
45
+ color="#1ea430", opacity=0.3, name='Isola 370HR 1x3313 3.5mil')
46
+
47
+ IS370HR_2x106_35 = Material(er=gen_f350(3.94, 3.89, 3.86, 3.82, 3.68, 3.68),
48
+ tand=gen_f350(0.018, 0.020, 0.023, 0.024, 0.029, 0.029),
49
+ color="#1ea430", opacity=0.3, name='Isola 370HR 2x106 3.5 mil')
50
+
51
+ IS370HR_1x2116_40 = Material(er=gen_f350(4.32, 4.27, 4.26, 4.23, 4.17, 4.17),
52
+ tand=gen_f350(0.014, 0.016, 0.018, 0.019, 0.022, 0.022),
53
+ color="#1ea430", opacity=0.3, name='Isola 370HR 1x2116 4.0 mil')
54
+
55
+ IS370HR_1x2113_40 = Material(er=gen_f350(4.16, 4.12, 4.10, 4.05, 3.99, 3.99),
56
+ tand=gen_f350(0.016, 0.018, 0.020, 0.024, 0.025, 0.025),
57
+ color="#1ea430", opacity=0.3, name='Isola 370HR 1x2113 4.0 mil')
58
+
59
+ IS370HR_1x106_1x1080_40 = Material(er=gen_f350(4.07, 4.02, 4.00, 3.97, 3.84, 3.83),
60
+ tand=gen_f350(0.016, 0.019, 0.021, 0.022, 0.026, 0.026),
61
+ color="#1ea430", opacity=0.3, name='Isola 370HR 1x106/1x1080 4.0mil')
62
+
63
+ IS370HR_1x106_1x1080_43 = Material(er=gen_f350(4.04, 3.99, 3.97, 3.93, 3.80, 3.80),
64
+ tand=gen_f350(0.017, 0.019, 0.022, 0.023, 0.027, 0.027),
65
+ color="#1ea430", opacity=0.3, name='Isola 370HR 1x106/1x1080 4.3mil')
66
+
67
+ IS370HR_2116_45 = Material(er=gen_f350(4.24, 4.19, 4.17, 4.14, 4.03, 4.03),
68
+ tand=gen_f350(0.015, 0.017, 0.019, 0.020, 0.023, 0.023),
69
+ color="#1ea430", opacity=0.3, name='Isola 370HR 1x2116 4.3mil')
70
+
71
+ IS370HR_2x1080_45 = Material(er=gen_f350(4.16, 4.12, 4.10, 4.05, 3.99, 3.99),
72
+ tand=gen_f350(0.016, 0.018, 0.020, 0.021, 0.024, 0.025),
73
+ color="#1ea430", opacity=0.3, name='Isola 370HR 2x1080 4.5mil')
74
+
75
+ IS370HR_1x2116_50 = Material(er=gen_f350(4.18, 4.14, 4.11, 4.08, 3.96, 3.96),
76
+ tand=gen_f350(0.015, 0.017, 0.02, 0.021, 0.024, 0.024),
77
+ color="#1ea430", opacity=0.3, name='Isola 370HR 1x2116 5.0mil')
78
+
79
+ IS370HR_1x1652_50 = Material(er=gen_f350(4.40, 4.36, 4.34, 4.32, 4.21, 4.21),
80
+ tand=gen_f350(0.014, 0.015, 0.017, 0.018, 0.021, 0.021),
81
+ color="#1ea430", opacity=0.3, name='Isola 370HR 1x1652 5.0mil')
82
+
83
+ IS370HR_2x1080_50 = Material(er=gen_f350(4.11, 4.06, 4.04, 4.00, 3.88, 3.88),
84
+ tand=gen_f350(0.016, 0.018, 0.021, 0.022, 0.026, 0.026),
85
+ color="#1ea430", opacity=0.3, name='Isola 370HR 2x1080 5.0mil')
86
+
87
+ IS370HR_1x106_1x2113_53 = Material(er=gen_f350(4.13, 4.08, 4.06, 4.02, 3.90, 3.90),
88
+ tand=gen_f350(0.016, 0.018, 0.021, 0.021, 0.025, 0.025),
89
+ color="#1ea430", opacity=0.3, name='Isola 370HR 1x106/1x2113 5.3mil')
90
+
91
+ IS370HR_1x1652_55 = Material(er=gen_f350(4.34, 4.30, 4.28, 4.25, 4.14, 4.14),
92
+ tand=gen_f350(0.014, 0.016, 0.018, 0.019, 0.022, 0.022),
93
+ color="#1ea430", opacity=0.3, name='Isola 370HR 1x1652 5.5mil')
94
+
95
+ IS370HR_2x1080_60 = Material(er=gen_f350(4.09, 4.04, 4.02, 3.99, 3.86, 3.86),
96
+ tand=gen_f350(0.016, 0.018, 0.021, 0.022, 0.026, 0.026),
97
+ color="#1ea430", opacity=0.3, name='Isola 370HR 2x1080 6.0mil')
98
+
99
+ IS370HR_1x1652_60 = Material(er=gen_f350(4.24, 4.19, 4.17, 4.14, 4.03, 4.03),
100
+ tand=gen_f350(0.015, 0.017, 0.019, 0.020, 0.023, 0.023),
101
+ color="#1ea430", opacity=0.3, name='Isola 370HR 1x1652 6.0mil')
102
+
103
+ IS370HR_2x1086_60 = Material(er=gen_f350(4.09, 4.04, 4.02, 3.99, 3.86, 3.86),
104
+ tand=gen_f350(0.016, 0.018, 0.021, 0.022, 0.026, 0.026),
105
+ color="#1ea430", opacity=0.3, name='Isola 370HR 2x1086 6.0mil')
106
+
107
+ IS370HR_1x7628_70 = Material(er=gen_f350(4.42, 4.38, 4.36, 4.34, 4.24, 4.24),
108
+ tand=gen_f350(0.014, 0.015, 0.017, 0.018, 0.02, 0.02),
109
+ color="#1ea430", opacity=0.3, name='Isola 370HR 1x7626 7.0mil')
110
+
111
+ IS370HR_2x2113_70 = Material(er=gen_f350(4.18, 4.14, 4.11, 4.08, 3.96, 3.96),
112
+ tand=gen_f350(0.016, 0.017, 0.02, 0.021, 0.024, 0.024),
113
+ color="#1ea430", opacity=0.3, name='Isola 370HR 2x2113 7.0mil')
114
+
115
+ IS370HR_2x3313_70 = Material(er=gen_f350(4.24, 4.19, 4.17, 4.14, 4.03, 4.03),
116
+ tand=gen_f350(0.015, 0.017, 0.019, 0.020, 0.023, 0.023),
117
+ color="#1ea430", opacity=0.3, name='Isola 370HR 2x3313 7.0mil')
118
+
119
+ IS370HR_1x7628_75 = Material(er=gen_f350(4.38, 4.34, 4.32, 4.29, 4.19, 4.19),
120
+ tand=gen_f350(0.014, 0.015, 0.017, 0.018, 0.021, 0.021),
121
+ color="#1ea430", opacity=0.3, name='Isola 370HR 1x7628 7.5mil')
122
+
123
+ IS370HR_2x2116_80 = Material(er=gen_f350(4.32, 4.27, 4.26, 4.23, 4.17, 4.17),
124
+ tand=gen_f350(0.014, 0.016, 0.018, 0.019, 0.022, 0.022),
125
+ color="#1ea430", opacity=0.3, name='Isola 370HR 2x2116 8.0mil')
126
+
127
+ IS370HR_2x3313_80 = Material(er=gen_f350(4.16, 4.12, 4.10, 4.05, 3.99, 3.99),
128
+ tand=gen_f350(0.016, 0.018, 0.020, 0.021, 0.024, 0.025),
129
+ color="#1ea430", opacity=0.3, name='Isola 370HR 2x3313 8.0mil')
130
+
131
+ IS370HR_1x7628_80 = Material(er=gen_f350(4.34, 4.30, 4.28, 4.25, 4.14, 4.14),
132
+ tand=gen_f350(0.014, 0.016, 0.018, 0.019, 0.022, 0.022),
133
+ color="#1ea430", opacity=0.3, name='Isola 370HR 1x7628 8.0mil')
134
+
135
+ IS370HR_2x2116_90 = Material(er=gen_f350(4.24, 4.19, 4.17, 4.14, 4.03, 4.03),
136
+ tand=gen_f350(0.015, 0.017, 0.019, 0.020, 0.023, 0.023),
137
+ color="#1ea430", opacity=0.3, name='Isola 370HR 2x2116 9.0mil')
138
+
139
+ IS370HR_2x2116_100 = Material(er=gen_f350(4.18, 4.14, 4.11, 4.08, 3.96, 3.96),
140
+ tand=gen_f350(.016, 0.017, 0.020, 0.021, 0.024, 0.024),
141
+ color="#1ea430", opacity=0.3, name='Isola 370HR 2x2116 10.0mil')
142
+
143
+ IS370HR_2x1652_100 = Material(er=gen_f350(4.40, 4.36, 4.34, 4.32, 4.21, 4.21),
144
+ tand=gen_f350(0.014, 0.015, 0.017, 0.018, 0.021, 0.021),
145
+ color="#1ea430", opacity=0.3, name='Isola 370HR 2x1652 10.0mil')
146
+
147
+ IS370HR_2x1652_120 = Material(er=gen_f350(4.24, 4.19, 4.17, 4.14, 4.03, 4.03),
148
+ tand=gen_f350(0.015, 0.017,0.019, 0.020, 0.023, 0.023),
149
+ color="#1ea430", opacity=0.3, name='Isola 370HR 2x1652 12.0mil')
150
+
151
+ IS370HR_2x1080_1x7628_120 = Material(er=gen_f350(4.30, 4.25, 4.24, 4.21, 4.09, 4.09),
152
+ tand=gen_f350(0.015, 0.016, 0.018, 0.019, 0.022, 0.022),
153
+ color="#1ea430", opacity=0.3, name='Isola 370HR 2x1080/1x7623 12.0mil')
154
+
155
+ IS370HR_2x7628_140 = Material(er=gen_f350(4.42, 4.38, 4.36, 4.34, 4.24, 4.24),
156
+ tand=gen_f350(0.014, 0.015, 0.017, 0.018, 0.020, 0.020),
157
+ color="#1ea430", opacity=0.3, name='Isola 370HR 2x7628 14.0mil')
158
+
159
+ IS370HR_2x7628_160 = Material(er=gen_f350(4.34, 4.30, 4.28, 4.25, 4.14, 4.14),
160
+ tand=gen_f350(0.014, 0.016, 0.018, 0.019, 0.022, 0.022),
161
+ color="#1ea430", opacity=0.3, name='Isola 370HR 2x7628 16.0mil')
162
+
163
+ IS370HR_1x1080_2x7628_180 = Material(er=gen_f350(4.44, 4.40, 4.39, 4.36, 4.26, 4.26),
164
+ tand=gen_f350(0.013, 0.014, 0.017, 0.017, 0.020, 0.020),
165
+ color="#1ea430", opacity=0.3, name='Isola 370HR 1x1080/2x7628 18.0mil')
166
+
167
+ IS370HR_2x7628_1x2116_180 = Material(er=gen_f350(4.36, 4.32, 4.30, 4.27, 4.15, 4.15),
168
+ tand=gen_f350(0.014, 0.016, 0.018, 0.019, 0.021, 0.021),
169
+ color="#1ea430", opacity=0.3, name='Isola 370HR 2x7628/1x2116 18.0mil ')
170
+
171
+ IS370HR_3x7628_210 = Material(er=gen_f350(4.42, 4.38, 4.36, 4.34, 4.24, 4.24),
172
+ tand=gen_f350(0.014, 0.015, 0.017, 0.018, 0.020, 0.020),
173
+ color="#1ea430", opacity=0.3, name='Isola 370HR 3x7628 21.0mil')
174
+
175
+ IS370HR_3x7628_240 = Material(er=gen_f350(4.34, 4.30, 4.28, 4.25, 4.14, 4.14),
176
+ tand=gen_f350(0.014, 0.016, 0.018, 0.019, 0.022, 0.022),
177
+ color="#1ea430", opacity=0.3, name='Isola 370HR 3x7628 24.0mil')
178
+
179
+ IS370HR_4x7628_280 = Material(er=gen_f350(4.42, 4.38, 4.36, 4.34, 4.24, 4.24),
180
+ tand=gen_f350(0.014, 0.015, 0.017, 0.018, 0.020, 0.020),
181
+ color="#1ea430", opacity=0.3, name='Isola 370HR 4x7628 28.0mil')
182
+
183
+ IS370HR_4x7628_1x1080_310 = Material(er=gen_f350(4.38, 4.34, 4.32, 4.30, 4.19, 4.19),
184
+ tand=gen_f350(0.014, 0.015, 0.017, 0.018, 0.021, 0.021),
185
+ color="#1ea430", opacity=0.3, name='Isola 370HR 4x7628/1x1080 31.0mil')
186
+
187
+ IS370HR_5x7628_350 = Material(er=gen_f350(4.42, 4.38, 4.36, 4.34, 4.24, 4.24),
188
+ tand=gen_f350(0.014, 0.015, 0.017, 0.018, 0.020, 0.020),
189
+ color="#1ea430", opacity=0.3, name='Isola 370HR 5x7628 35.0mil')
190
+
191
+ IS370HR_5x7628_1x2116_390 = Material(er=gen_f350(4.40, 4.36, 4.34, 4.34, 4.24, 4.24),
192
+ tand=gen_f350(0.014, 0.015, 0.017, 0.018, 0.020, 0.020),
193
+ color="#1ea430", opacity=0.3, name='Isola 370HR 5x7628/1x2116 39.0mil')
194
+
195
+ IS370HR_6x7628_420 = Material(er=gen_f350(4.42, 4.38, 4.36, 4.34, 4.24, 4.24),
196
+ tand=gen_f350(0.014, 0.015, 0.017, 0.018, 0.020, 0.020),
197
+ color="#1ea430", opacity=0.3, name='Isola 370HR 6x7628 42.0mil')
198
+
199
+ ############################################################
200
+ # IS370 SHEETS #
201
+ ############################################################
202
+
203
+ FS_420 = np.array([100e6, 1e9, 2e9, 10e9])
204
+
205
+ def gen_f420(*vals) -> FreqDependent:
206
+ return FreqDependent(scalar=interp1d(FS_420, np.array(vals), bounds_error=False, fill_value=(vals[0], vals[-1])))
207
+
208
+ IS420_1x106_20 = Material(er=gen_f420(4.3, 4.1, 3.95, 3.9),
209
+ tand=gen_f420(0.18, 0.18, 0.021, 0.024),
210
+ color="#1ea430", opacity=0.3, name="Isola 420 1x106 2.0mil")
211
+ IS420_1x1080_30 = Material(er=gen_f420(4.65, 4.26, 4.15, 4.1),
212
+ tand=gen_f420(0.018, 0.018, 0.021, 0.023),
213
+ color="#1ea430", opacity=0.3, name="Isola 420 1x1080 3.0mil")
214
+ IS420_1x2116_40 = Material(er=gen_f420(4.6, 4.52, 4.35, 4.25),
215
+ tand=gen_f420(0.016, 0.016, 0.017, 0.017),
216
+ color="#1ea430", opacity=0.3, name="Isola 420 1x2116 4.0mil")
217
+ IS420_1x2116_50 = Material(er=gen_f420(4.75, 4.37, 4.25, 4.2),
218
+ tand=gen_f420(0.016, 0.016, 0.017, 0.017),
219
+ color="#1ea430", opacity=0.3, name="Isola 420 1x2116 5.0mil")
220
+ IS420_1x1652_60 = Material(er=gen_f420(4.75, 4.4, 4.25, 4.2),
221
+ tand=gen_f420(0.017, 0.017, 0.018, 0.019),
222
+ color="#1ea430", opacity=0.3, name="Isola 420 1x1652 6.0mil")
223
+ IS420_1x7628_70 = Material(er=gen_f420(4.9, 4.58, 4.45, 4.35),
224
+ tand=gen_f420(0.016, 0.016, 0.017, 0.017),
225
+ color="#1ea430", opacity=0.3, name="Isola 420 1x7628 7.0mil")
226
+ IS420_1x7628_80 = Material(er=gen_f420(4.85, 4.5, 4.4, 4.35),
227
+ tand=gen_f420(0.016, 0.016, 0.017, 0.018),
228
+ color="#1ea430", opacity=0.3, name="Isola 420 1x7628 8.0mil")
229
+ IS420_2x2116_100 = Material(er=gen_f420(4.75, 4.37, 4.25, 4.2),
230
+ tand=gen_f420(0.016, 0.016, 0.017, 0.017),
231
+ color="#1ea430", opacity=0.3, name="Isola 420 2x2116 10.0mil")
232
+ IS420_2x1652_120 = Material(er=gen_f420(4.75, 4.4, 4.25, 4.2),
233
+ tand=gen_f420(0.017, 0.017, 0.018, 0.019),
234
+ color="#1ea430", opacity=0.3, name="Isola 420 2x1652 12.0mil")
235
+ IS420_2x7628_140 = Material(er=gen_f420(4.9, 4.57, 4.45, 4.4),
236
+ tand=gen_f420(0.016, 0.016, 0.017, 0.017),
237
+ color="#1ea430", opacity=0.3, name="Isola 420 2x7628 14.0mil")
238
+ IS420_2x7628_160 = Material(er=gen_f420(4.85, 4.5, 4.4, 4.35),
239
+ tand=gen_f420(0.016, 0.016, 0.017, 0.018),
240
+ color="#1ea430", opacity=0.3, name="Isola 420 2x7628 16.0mil")
241
+ IS420_3x1652_180 = Material(er=gen_f420(4.75, 4.4, 4.25, 4.2),
242
+ tand=gen_f420(0.017, 0.017, 0.018, 0.019),
243
+ color="#1ea430", opacity=0.3, name="Isola 420 3x1652 18.0mil")
244
+ IS420_3x7628_200 = Material(er=gen_f420(4.91, 4.6, 4.45, 4.35),
245
+ tand=gen_f420(0.016, 0.016, 0.017, 0.017),
246
+ color="#1ea430", opacity=0.3, name="Isola 420 3x7628 20.0mil")
247
+ IS420_3x7628_210 = Material(er=gen_f420(4.9, 4.57, 4.45, 4.4),
248
+ tand=gen_f420(0.016, 0.016, 0.017, 0.017),
249
+ color="#1ea430", opacity=0.3, name="Isola 420 3x7628 21.0mil")
250
+ IS420_3x7628_240 = Material(er=gen_f420(4.85, 4.5, 4.4, 4.35),
251
+ tand=gen_f420(0.016, 0.016, 0.017, 0.018),
252
+ color="#1ea430", opacity=0.3, name="Isola 420 3x7628 24.0mil")
253
+ IS420_4x7628_280 = Material(er=gen_f420(4.9, 4.57, 4.45, 4.4),
254
+ tand=gen_f420(0.016, 0.016, 0.017, 0.017),
255
+ color="#1ea430", opacity=0.3, name="Isola 420 4x7628 28.0mil")
256
+ IS420_4x7628_300 = Material(er=gen_f420(4.87, 4.53, 4.42, 4.37),
257
+ tand=gen_f420(0.016, 0.016, 0.017, 0.018),
258
+ color="#1ea430", opacity=0.3, name="Isola 420 4x7628 30.0mil")
259
+ IS420_5x7628_390 = Material(er=gen_f420(4.85, 4.5, 4.4, 4.35),
260
+ tand=gen_f420(0.016, 0.016, 0.017, 0.018),
261
+ color="#1ea430", opacity=0.3, name="Isola 420 5x7628 39.0mil")
262
+ IS420_6x7628_470 = Material(er=gen_f420(4.85, 4.5, 4.4, 4.35),
263
+ tand=gen_f420(0.016, 0.016, 0.017, 0.018),
264
+ color="#1ea430", opacity=0.3, name="Isola 420 6x7628 47.0mil")
265
+ IS420_8x7628_580 = Material(er=gen_f420(4.89, 4.55, 4.46, 4.36),
266
+ tand=gen_f420(0.016, 0.016, 0.017, 0.017),
267
+ color="#1ea430", opacity=0.3, name="Isola 420 8x7628 58.0mil")
268
+ IS420_106_20 = Material(er=gen_f420(4.3, 4.1, 3.95, 3.9),
269
+ tand=gen_f420(0.018, 0.019, 0.02, 0.024),
270
+ color="#1ea430", opacity=0.3, name="Isola 420 106 2.0mil")
271
+ IS420_106_23 = Material(er=gen_f420(4.28, 4.02, 3.87, 3.82),
272
+ tand=gen_f420(0.019, 0.02, 0.021, 0.025),
273
+ color="#1ea430", opacity=0.3, name="Isola 420 106 2.3mil")
274
+ IS420_1080_28 = Material(er=gen_f420(4.5, 4.3, 4.05, 4.0),
275
+ tand=gen_f420(0.017, 0.018, 0.019, 0.021),
276
+ color="#1ea430", opacity=0.3, name="Isola 420 1080 2.8mil")
277
+ IS420_1080_35 = Material(er=gen_f420(4.38, 4.14, 4.0, 3.94),
278
+ tand=gen_f420(0.018, 0.019, 0.02, 0.024),
279
+ color="#1ea430", opacity=0.3, name="Isola 420 1080 3.5mil")
280
+ IS420_2113_39 = Material(er=gen_f420(4.64, 4.4, 4.26, 4.2),
281
+ tand=gen_f420(0.017, 0.018, 0.018, 0.02),
282
+ color="#1ea430", opacity=0.3, name="Isola 420 2113 3.9mil")
283
+ IS420_2116_46 = Material(er=gen_f420(4.74, 4.5, 4.36, 4.3),
284
+ tand=gen_f420(0.017, 0.017, 0.018, 0.019),
285
+ color="#1ea430", opacity=0.3, name="Isola 420 2116 4.6mil")
286
+ IS420_2116_52 = Material(er=gen_f420(4.64, 4.4, 4.26, 4.2),
287
+ tand=gen_f420(0.017, 0.018, 0.018, 0.02),
288
+ color="#1ea430", opacity=0.3, name="Isola 420 2116 5.2mil")
289
+ IS420_7628_74 = Material(er=gen_f420(4.85, 4.64, 4.5, 4.34),
290
+ tand=gen_f420(0.016, 0.016, 0.017, 0.018),
291
+ color="#1ea430", opacity=0.3, name="Isola 420 7628 7.4mil")
292
+ IS420_7628_83 = Material(er=gen_f420(4.75, 4.54, 4.4, 4.24),
293
+ tand=gen_f420(0.017, 0.017, 0.017, 0.018),
294
+ color="#1ea430", opacity=0.3, name="Isola 420 7628 8.3mil")
@@ -0,0 +1,58 @@
1
+ from .._emerge.material import Material, FreqDependent
2
+ from scipy.interpolate import interp1d
3
+ import numpy as np
4
+
5
+ FS_300P= np.array([1e9, 3e9, 5e9, 10e9, 15e9, 20e9])
6
+
7
+ def gen_f300p(*vals) -> FreqDependent:
8
+ return FreqDependent(scalar=interp1d(FS_300P, np.array(vals), bounds_error=False, fill_value=(vals[0], vals[-1])))
9
+
10
+
11
+
12
+ ############################################################
13
+ # ROGERS 300P #
14
+ ############################################################
15
+
16
+ RO300P_1x1035_20 = Material(er=gen_f300p(3.14, 3.14, 3.13, 3.12, 3.11, 3.10),
17
+ tand=gen_f300p(0.0013, 0.0016, 0.0019, 0.0020, 0.0022, 0.0023),
18
+ color="#1ea430", opacity=0.3, name='Rogers 300P 1x1035 2.0mil')
19
+
20
+ RO300P_1x1035_25 = Material(er=gen_f300p(3.07, 3.07, 3.06, 3.05, 3.04, 3.03),
21
+ tand=gen_f300p(0.0012, 0.0015, 0.0018, 0.0020, 0.0022, 0.0023),
22
+ color="#1ea430", opacity=0.3, name='Rogers 300P 1x1035 2.5mil')
23
+
24
+ RO300P_1x106_25 = Material(er=gen_f300p(3.02, 3.01, 3.01, 3.00, 2.99, 2.98),
25
+ tand=gen_f300p(0.0011, 0.0014, 0.0017, 0.0019, 0.0021, 0.0022),
26
+ color="#1ea430", opacity=0.3, name='Rogers 300P 1x106 2.5mil')
27
+
28
+ RO300P_1x1078_30 = Material(er=gen_f300p(3.18, 3.18, 3.17, 3.16, 3.15, 3.14),
29
+ tand=gen_f300p(0.0014, 0.0016, 0.0019, 0.0021, 0.0023, 0.0024),
30
+ color="#1ea430", opacity=0.3, name='Rogers 300P 1x1078 3.0mil')
31
+
32
+ RO300P_1x1035_30 = Material(er=gen_f300p(3.02, 3.01, 3.01, 3.00, 2.99, 2.99),
33
+ tand=gen_f300p(0.0011, 0.0014, 0.0017, 0.0019, 0.0021, 0.0022),
34
+ color="#1ea430", opacity=0.3, name='Rogers 300P 1x1035 3.0mil')
35
+
36
+ RO300P_1x1078_35 = Material(er=gen_f300p(3.11, 3.11, 3.10, 3.09, 3.08, 3.07),
37
+ tand=gen_f300p(0.0013, 0.0015, 0.0018, 0.0020, 0.0022, 0.0023),
38
+ color="#1ea430", opacity=0.3, name='Rogers 300P 1x1078 3.5mil')
39
+
40
+ RO300P_1x1080_35 = Material(er=gen_f300p(3.11, 3.11, 3.10, 3.09, 3.08, 3.07),
41
+ tand=gen_f300p(0.0013, 0.0015, 0.0018, 0.0020, 0.0022, 0.0023),
42
+ color="#1ea430", opacity=0.3, name='Rogers 300P 1x1080 3.5mil')
43
+
44
+ RO300P_1x2113_40 = Material(er=gen_f300p(3.28, 3.27, 3.27, 3.26, 3.25, 3.24),
45
+ tand=gen_f300p(0.0015, 0.0017, 0.0020, 0.0022, 0.0024, 0.0025),
46
+ color="#1ea430", opacity=0.3, name='Rogers 300P 1x2113 4.0mil')
47
+
48
+ RO300P_1x1080_40 = Material(er=gen_f300p(3.07, 3.07, 3.06, 3.05, 3.04, 3.03),
49
+ tand=gen_f300p(0.0012, 0.0015, 0.0018, 0.0020, 0.0022, 0.0023),
50
+ color="#1ea430", opacity=0.3, name='Rogers 300P 1x1080 4.0mil')
51
+
52
+ RO300P_1x2116_50 = Material(er=gen_f300p(3.29, 3.29, 3.28, 3.27, 3.26, 3.25),
53
+ tand=gen_f300p(0.0015, 0.0018, 0.0020, 0.0022, 0.0024, 0.0025),
54
+ color="#1ea430", opacity=0.3, name='Rogers 300P 1x2116 5.0mil')
55
+
56
+ RO300P_1x2116_55 = Material(er=gen_f300p(3.25, 3.25, 3.24, 3.23, 3.22, 3.21),
57
+ tand=gen_f300p(0.0015, 0.0017, 0.0020, 0.0021, 0.0023, 0.0024),
58
+ color="#1ea430", opacity=0.3, name='Rogers 300P 1x2116 5.5mil')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: emerge
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: An open source EM FEM simulator in Python
5
5
  Project-URL: Homepage, https://github.com/FennisRobert/EMerge
6
6
  Project-URL: Issues, https://github.com/FennisRobert/EMerge/issues
@@ -20,6 +20,8 @@ Provides-Extra: cudss
20
20
  Requires-Dist: cupy-cuda12x; extra == 'cudss'
21
21
  Requires-Dist: nvidia-cudss-cu12; extra == 'cudss'
22
22
  Requires-Dist: nvmath-python[cu12]; extra == 'cudss'
23
+ Provides-Extra: dxf
24
+ Requires-Dist: ezdxf; extra == 'dxf'
23
25
  Provides-Extra: umfpack
24
26
  Requires-Dist: scikit-umfpack; (sys_platform != 'win32') and extra == 'umfpack'
25
27
  Description-Content-Type: text/markdown