piel.models.physical.electrical.cables.rf.generic

piel.models.physical.electrical.cables.rf.generic#

Functions#

create_coaxial_cable(, geometry_function, ...)

Creates a complete model of a CoaxialCable with relevant geometrical, frequency, timing, and heat transfer descriptions.

Module Contents#

create_coaxial_cable(material_specification_function: Callable[Ellipsis, piel.types.electrical.cables.CoaxialCableMaterialSpecificationType] | None = None, timing_function: Callable[Ellipsis, piel.types.connectivity.timing.TimeMetricsTypes] | piel.types.connectivity.timing.TimeMetricsTypes = TimeMetric(), geometry_function: Callable[Ellipsis, piel.types.electrical.cables.CoaxialCableGeometryType] = calculate_coaxial_cable_geometry, heat_transfer_function: Callable[Ellipsis, piel.types.electrical.cables.CoaxialCableHeatTransferType] = calculate_coaxial_cable_heat_transfer, parameters: dict = {}, **kwargs) piel.types.electrical.cables.CoaxialCable[source]#

Creates a complete model of a CoaxialCable with relevant geometrical, frequency, timing, and heat transfer descriptions.

This function operates on a collection of functions to create a comprehensive model of a CoaxialCable. Each function is parametrized through a parameters dictionary common to all defined internal functions, in order to compose each relevant model accordingly. This is decomposed internally within this method.

Parameters:#

material_specification_functionCallable[…, CoaxialCableMaterialSpecificationType] | None, optional

A function that returns the material specification for the coaxial cable. This function should not take any arguments as it will be called without parameters. If None, no material specification will be set. Defaults to None.

timing_functionCallable[…, TimeMetricsTypes] | TimeMetricsTypes, optional

Either a function that calculates and returns the timing metrics for the coaxial cable, or a TimeMetricsTypes object directly. If a function, it will be called with the parameters from the parameters dict. Defaults to TimeMetrics().

geometry_functionCallable[…, CoaxialCableGeometryType], optional

A function that calculates and returns the geometry specification for the coaxial cable. Defaults to calculate_coaxial_cable_geometry. This function will be called with the parameters from the parameters dict.

heat_transfer_functionCallable[…, CoaxialCableHeatTransferType], optional

A function that calculates and returns the heat transfer characteristics of the coaxial cable. Defaults to calculate_coaxial_cable_heat_transfer. This function will be called with the parameters from the parameters dict.

parametersdict, optional

A dictionary of parameters to be passed to the geometry, timing, and heat transfer functions. These parameters are used to customize the calculations for each aspect of the coaxial cable. Defaults to an empty dictionary.

**kwargs :

Additional keyword arguments to be passed to the CoaxialCable constructor.

Returns:#

: CoaxialCable

A fully specified CoaxialCable object with all relevant properties set.

Notes:#

  • The function creates a Connection object with “in” and “out” PhysicalPorts, using the calculated time metrics.

  • A PhysicalConnection is created using the Connection object.

  • The CoaxialCable is constructed using the results from all calculation functions and the created PhysicalConnection.

  • If material_specification_function is None, no material specification will be set for the CoaxialCable.

  • The timing_function parameter can now be either a callable or a TimeMetricsTypes object directly.

Example:#

>>> def material_spec():
...     return CoaxialCableMaterialSpecification(...)
>>> def timing_calc(**params):
...     return TimeMetric(...)
>>> cable = create_coaxial_cable(
...     material_specification_function=material_spec,
...     timing_function=timing_calc,
...     parameters={'length': 10, 'diameter': 0.5},
...     name='My Coaxial Cable'
... )