Skip to content

Commit

Permalink
Various fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nala1712 authored and daquintero committed Jul 30, 2024
1 parent f95ab42 commit ad40c82
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 13 deletions.
19 changes: 18 additions & 1 deletion piel/experimental/models/cables.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,24 @@ def rg164(
length_m=length_m,
)

return CoaxialCable(name="RG164", geometry=geometry)
ports = [
PhysicalPort(
name="IN",
domain="RF",
connector="SMA",
),
PhysicalPort(
name="OUT",
domain="RF",
connector="SMA",
)
]

return CoaxialCable(
name="RG164",
geometry=geometry,
ports=ports,
)


def cryo_cable(
Expand Down
3 changes: 2 additions & 1 deletion piel/experimental/types/dc.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from typing import Optional
from .device import Device, DeviceConfiguration


Expand All @@ -16,7 +17,7 @@ class Sourcemeter(Device):
Represents a sourcemeter.
"""

configuration: SourcemeterConfiguration
configuration: Optional[SourcemeterConfiguration] = None


class MultimeterConfiguration(DeviceConfiguration):
Expand Down
22 changes: 11 additions & 11 deletions piel/types/electrical/cables.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# TODO This shouldn't be a quantity
class CoaxialCableGeometryType(QuantityType):
core_cross_sectional_area_m2: Optional[float]
core_cross_sectional_area_m2: Optional[float] = None
"""
The cross-sectional area of the core in meters squared.
"""
Expand All @@ -16,12 +16,12 @@ class CoaxialCableGeometryType(QuantityType):
The length of the cable in meters.
"""

sheath_cross_sectional_area_m2: Optional[float]
sheath_cross_sectional_area_m2: Optional[float] = None
"""
The cross-sectional area of the sheath in meters squared.
"""

total_cross_sectional_area_m2: Optional[float]
total_cross_sectional_area_m2: Optional[float] = None
"""
The total cross-sectional area of the cable in meters squared.
"""
Expand All @@ -32,17 +32,17 @@ class CoaxialCableHeatTransferType(QuantityType):
All units are in watts.
"""

core: Optional[float]
core: Optional[float] = None
"""
The computed heat transfer in watts for the core of the cable.
"""

sheath: Optional[float]
sheath: Optional[float] = None
"""
The computed heat transfer in watts for the sheath of the cable.
"""

dielectric: Optional[float]
dielectric: Optional[float] = None
"""
The computed heat transfer in watts for the dielectric of the cable.
"""
Expand All @@ -56,17 +56,17 @@ class CoaxialCableHeatTransferType(QuantityType):


class CoaxialCableMaterialSpecificationType(QuantityType):
core: Optional[MaterialReferenceType]
core: Optional[MaterialReferenceType] = None
"""
The material of the core.
"""

sheath: Optional[MaterialReferenceType]
sheath: Optional[MaterialReferenceType] = None
"""
The material of the sheath.
"""

dielectric: Optional[MaterialReferenceType]
dielectric: Optional[MaterialReferenceType] = None
"""
The material of the dielectric.
"""
Expand Down Expand Up @@ -94,7 +94,7 @@ class DCCableHeatTransferType(QuantityType):
All units are in watts.
"""

core: Optional[float]
core: Optional[float] = None
"""
The computed heat transfer in watts for the core of the cable.
"""
Expand All @@ -108,7 +108,7 @@ class DCCableHeatTransferType(QuantityType):


class DCCableMaterialSpecificationType(QuantityType):
core: Optional[MaterialReferenceType]
core: Optional[MaterialReferenceType] = None
"""
The material of the core.
"""
Expand Down

0 comments on commit ad40c82

Please sign in to comment.