API reference
The public names of the package, module by module. The formula families of the engine, the reductions, the scan and the functions that the families extend are on the theory pages.
LineCableModels
LineCableModels.LineCableModels — Module
LineCableModelsCompute the series impedances and shunt admittances of cables per unit length. The data model declares the parts of a cable, and a problem places cables above or in the earth. A formulation selects the formulas, and a backend executes the computation. The Gmsh and Measurements extensions add the finite-element backend and the propagation of input uncertainty.
Commons
LineCableModels.Commons — Module
LineCableModels.CommonsDefine the grammar that the other modules extend with methods, and the option records of formulations and backends.
LineCableModels.Commons.AbstractBackend — Type
abstract type AbstractBackendRepresent the common supertype of backend singletons that execute a formulation.
LineCableModels.Commons.AbstractFormulation — Type
abstract type AbstractFormulationRepresent the common supertype of formulations and formula families.
LineCableModels.Commons.ComputationOptions — Type
struct ComputationOptions{B, NT<:NamedTuple}Store the declared options of a backend owner B for one computation. Read option values through properties of the record.
values::NamedTuple: Options, each in the type of its default.
LineCableModels.Commons.ComputationOptions — Method
ComputationOptions(
::Type{B};
kw...
) -> LineCableModels.Commons.ComputationOptions
Build the options of B from defaults and the supplied keywords. select converts each value to its declared type, then validate checks the record.
Arguments
B: backend type that declares the options.
Keywords
kw...: option values that replace the defaults.
Returns
- A
ComputationOptionsrecord with the declared keys in their declared order.
Errors
- Throws
ArgumentErrorfor a keyword that is not an option ofB.
LineCableModels.Commons.FormulationOptions — Type
struct FormulationOptions{O, NT<:NamedTuple}Store the declared options of a formula or formulation owner O as a typed record. Read option values through properties of the record.
values::NamedTuple: Options, each in the type of its default.
LineCableModels.Commons.FormulationOptions — Method
FormulationOptions(::Type{O}; kw...) -> Any
Build the options of O from defaults and the supplied keywords. select converts each value to its declared type, then validate checks the record.
Arguments
O: formula or formulation type that declares the options.
Keywords
kw...: option values that replace the defaults.
Returns
- A
FormulationOptionsrecord with the declared keys in their declared order.
Errors
- Throws
ArgumentErrorfor a keyword that is not an option ofO.
LineCableModels.Commons.build — Function
build(Target, declarations...)Construct one completed Target from its declarations, such as the design of a cable from its declared parts.
LineCableModels.Commons.compute — Function
compute(problem, formulation; kw...)
compute(backend, problem, formulation; kw...)Run one computation of problem with formulation. A method of backend selects the default backend. A backend passed first chooses another.
Arguments
problem: problem to compute.formulation: formulas and their controls.
Keywords
kw...: computation options of the selected backend.
Returns
- The result of the selected backend.
LineCableModels.Commons.defaults — Function
defaults(owner)Return the declared option keys and default values of an owner.
Arguments
owner: formula, formulation, or backend type.
Returns
- A
NamedTuplewhose value types define the option types.
LineCableModels.Commons.resolve — Function
resolve(context, declaration)Return the geometry that declaration takes in context. The outline of a part gives its geometry to the layer or part declared around it, and a placement locates a cross-section in its frame.
LineCableModels.Commons.select — Function
select(default, value)Convert an option to its declared type or lift a formula selection into its slot.
Arguments
default: default value or formula family that determines the selection type.value: supplied option value or formula selection. A selection is an identifier, an identifier paired with options, or a formula.
Returns
- The converted option or selected formula.
LineCableModels.Commons.select — Method
select(
declared::NamedTuple,
supplied::NamedTuple
) -> NamedTuple
Merge supplied options into their defaults, then convert each value through select.
Arguments
declared: option keys and default values.supplied: option values that replace defaults.
Returns
- A
NamedTuplewith the declared keys, order, and value types.
Errors
- Throws
ArgumentErrorfor a supplied key thatdeclaredlacks.
LineCableModels.Commons.validate — Function
validate(subject, context...)Reject an invalid input before its consumer uses it. Return subject, the first positional argument, unchanged.
subject is user input or an input derived from it. The optional context says what the subject is checked for: its consumer, such as the problem, formulation, physical model or result being built, or, for the result of a law or record, the function that produced it. Data that the check needs follows the context. A method can warn on a value that it can compute but that is questionable, such as one outside a formula's range of validity.
Errors
- Throws a native exception that identifies the invalid field, value, and required condition.
Materials
LineCableModels.Materials — Module
LineCableModels.MaterialsDefine the electromagnetic and thermal properties of the materials of a cable.
LineCableModels.Materials.Material — Type
Material(kind::Symbol, rho::Real; ...) -> Any
Material(kind::Symbol, rho::Real, eps_r::Real; ...) -> Any
Material(
kind::Symbol,
rho::Real,
eps_r::Real,
mu_r::Real;
...
) -> Any
Material(
kind::Symbol,
rho::Real,
eps_r::Real,
mu_r::Real,
T0::Real;
...
) -> Any
Material(
kind::Symbol,
rho::Real,
eps_r::Real,
mu_r::Real,
T0::Real,
alpha::Real;
rho_thermal,
theta_max,
tan_delta,
sigma_solar
) -> Any
Construct a material of class kind. The arguments and keywords are the fields of Material.
Returns
- A
Material{T, kind}, whereTis the floating type that the properties promote to.
Errors
- Throws
DomainErrorwhen a property is outside its physical domain or is not finite. The resistivity alone can be infinite. - Throws
DomainErrorwhen the class is not:conductor,:insulatoror:semicon.
LineCableModels.Materials.Material — Type
struct Material{T<:Real, K}Store the electromagnetic and thermal properties of one material. Its class, :conductor, :insulator or :semicon, is the type parameter K, so laws and formulations dispatch on it.
rho::Real: Electrical resistivity at the reference temperatureT0[Ω·m].eps_r::Real: Relative permittivity [dimensionless].mu_r::Real: Relative permeability [dimensionless].T0::Real: Reference temperature [°C].alpha::Real: Temperature coefficient of resistivity [1/°C].rho_thermal::Real: Thermal resistivity [K·m/W].theta_max::Real: Maximum continuous operating temperature [°C].tan_delta::Real: Polarization loss tangent, apart from the conduction thatrhogives [dimensionless].sigma_solar::Real: Solar-absorption coefficient [dimensionless].
LineCableModels.Materials.Material — Method
Material(
_::Val{K},
rho::Real,
eps_r::Real,
mu_r::Real,
T0::Real,
alpha::Real,
rho_thermal::Real,
theta_max::Real,
tan_delta::Real,
sigma_solar::Real
) -> Any
Construct a material of class K, given as Val(K) so that the compiler knows the class. The arguments are the fields of Material, in their order.
Returns
- A
Material{T, K}, whereTis the floating type that the properties promote to.
Errors
- Throws
DomainErrorwhen a property is outside its physical domain or is not finite. The resistivity alone can be infinite. - Throws
DomainErrorwhen the class is not:conductor,:insulatoror:semicon.
LineCableModels.Materials.material — Method
material(
;
kind,
rho,
eps_r,
mu_r,
T0,
alpha,
rho_thermal,
theta_max,
tan_delta,
sigma_solar
)
Build the Material of class kind from its properties, given as keywords with the names and defaults of the positional constructor.
Returns
- A
Material{T, kind}, whereTis the floating type that the properties promote to.
Earth
LineCableModels.Earth — Module
LineCableModels.EarthDescribe the earth below the air as an ordered stack of layers, semi-infinite air first.
LineCableModels.Earth.EarthLayer — Type
struct EarthLayer{T<:Real}Store the static properties of one earth or air layer.
rho::Real: Electrical resistivity [Ω·m].eps_r::Real: Relative permittivity, negative where an equivalent earth parametrizes an inductive stack [dimensionless].mu_r::Real: Relative permeability [dimensionless].thickness::Real: Thickness, infinite for a semi-infinite layer [m].
LineCableModels.Earth.EarthLayer — Method
EarthLayer(
rho::Real,
eps_r::Real,
mu_r::Real,
thickness::Real
) -> Any
Construct one layer after floating and promoting its properties. The arguments are the fields of EarthLayer.
Errors
- Throws
DomainErrorwhenrho,mu_rorthicknessis not positive, or wheneps_rormu_ris not finite.
LineCableModels.Earth.EarthLayer — Method
EarthLayer(rho::Real, eps_r::Real, mu_r::Real) -> Any
Construct one semi-infinite layer: its thickness is infinite in the floating type that its properties promote to.
LineCableModels.Earth.EarthModel — Type
struct EarthModel{T<:Real, N}Store an earth description: semi-infinite air above the earth layers, the last of them semi-infinite.
layers::NTuple{N, EarthLayer{T}} where {T<:Real, N}: Layers from the top down, semi-infinite air first.
LineCableModels.Earth.EarthModel — Method
EarthModel(
layers::Tuple{EarthLayer{T<:Real}, Vararg{EarthLayer{T<:Real}}}
) -> EarthModel
Construct an earth model from its layers, semi-infinite air first.
Errors
- Throws
ArgumentErrorunless the first layer is semi-infinite air, the last is semi-infinite and each layer between has a finite thickness.
LineCableModels.Earth.homogeneous — Method
homogeneous(; rho, eps_r, mu_r)
Build the EarthModel of semi-infinite air, of relative permittivity and permeability 1, above one semi-infinite earth layer.
Keywords
rho: electrical resistivity of the earth [Ω·m].eps_r: relative permittivity of the earth [dimensionless].mu_r: relative permeability of the earth [dimensionless].
Returns
- An
EarthModel{T, 2}, whereTis the floating type that the earth's properties promote to.
DataModel
LineCableModels.DataModel — Module
LineCableModels.DataModelDescribe the cross-section of a cable. Its declared parts build a design, which holds the placed regions and the tables that map them to terminals, repeats, lays and fills. Designs placed in one cross-section of a line, with the conductor index of each terminal, build a system. The macros @cable and @terminal and the builders of the layers, the stranded conductor and the armor declare the parts of a cable.
LineCableModels.DataModel.AbstractCablePart — Type
abstract type AbstractCablePartSupertype of the declared parts of a cable: a region, or a node that layers, names, repeats, lays or encloses parts.
LineCableModels.DataModel.AbstractLayoutPattern — Type
abstract type AbstractLayoutPatternSupertype of the patterns that place the copies of a Repeat. A pattern resolves against the outline inside its members, and placements gives the placement of each member and the cross-section that the members share.
LineCableModels.DataModel.AbstractPrimitive — Type
abstract type AbstractPrimitive{T<:Real} <: AbstractShape{T<:Real}Supertype of the cross-sections that a part declares. A primitive states its dimensions and its placement.
LineCableModels.DataModel.AbstractShape — Type
abstract type AbstractShape{T<:Real}Supertype of the exact cross-sections of the parts of a cable, in the floating type T.
LineCableModels.DataModel.AnnularSector — Type
struct AnnularSector{T<:Real} <: AbstractShape{T<:Real}Represent an annular sector: the region between the inner radius $r_i$ and the outer radius $r_o$ over the angular span $\Delta\phi$, symmetric about the x-axis of its placement. A circular pattern bends a rectangular strand of width $w$ and height $h$ into an annular sector of the same area:
\[\frac{\Delta\phi}{2}\left(r_o^2 - r_i^2\right) = w h.\]
ri::Real: Inner radius [m].ro::Real: Outer radius [m].span::Real: Angular span [rad].at::Placement: Placement of the center of curvature. Its x-axis is the symmetry axis of the sector.
LineCableModels.DataModel.AnnularSector — Method
AnnularSector(
ri::Real,
ro::Real,
span::Real,
at::Placement
) -> LineCableModels.DataModel.AnnularSector
Construct an annular sector from its fields, in the floating type that they promote to.
Errors
- Throws
DomainErrorwhen a radius is negative or not finite, whenrodoes not exceedri, or whenspanis outside (0, 2π].
LineCableModels.DataModel.Annulus — Type
struct Annulus{T<:Real} <: AbstractPrimitive{T<:Real}Represent an annular cross-section, such as a tubular conductor or an insulation layer.
ri::Real: Inner radius [m].ro::Real: Outer radius [m].at::Placement: Placement of the center in the cable cross-section.
LineCableModels.DataModel.Annulus — Method
Annulus(ri::Real, ro::Real, at::Placement) -> Annulus
Construct an annulus between the radii ri and ro [m] at the placement at, in the floating type that they promote to.
Errors
- Throws
DomainErrorwhenriis negative or not finite, or whenrois not finite or does not exceedri.
LineCableModels.DataModel.Annulus — Method
Annulus(ri::Real, ro::Real) -> Annulus
Construct an annulus between the radii ri and ro [m], centered at the origin.
LineCableModels.DataModel.BlueprintConductor — Type
struct BlueprintConductor{T<:Real}Represent one terminal of a cable as the equivalent tube that coaxial formulations read. The material of the tube reproduces the direct-current resistance and the geometric mean radius of the conductive regions of the terminal.
terminal::Int64: Row of the terminal in the terminals of the design.assembly::Int64: Row of the concentric assembly that holds the conductor.r_in::Real: Inner radius of the tube [m].r_ex::Real: Outer radius of the tube [m].material::Material{T, :conductor} where T<:Real: Material of the tube.
LineCableModels.DataModel.BlueprintDielectric — Type
struct BlueprintDielectric{T<:Real, M<:Material}Represent one dielectric layer of the interval of a conductor, an annulus about the center of its assembly.
conductor::Int64: Row of the conductor whose dielectric interval holds the layer.r_in::Real: Inner radius of the layer [m].r_ex::Real: Outer radius of the layer [m].material::Material: Material of the layer, as the design declares it.
LineCableModels.DataModel.CableBlueprint — Type
struct CableBlueprint{T<:Real, V<:(AbstractVector{<:LineCableModels.DataModel.BlueprintDielectric})}Describe a cable for coaxial formulations. Each terminal is an equivalent tube with the dielectric layers of its interval, and the tubes lie in concentric assemblies. flatten builds it from a CableDesign.
id::String: Name of the cable.conductors::Array{LineCableModels.DataModel.BlueprintConductor{T}, 1} where T<:Real: Equivalent tube of each terminal, from the inside out.dielectrics::AbstractVector{<:LineCableModels.DataModel.BlueprintDielectric}: Dielectric layers, from the inside out.dielectric_ranges::Vector{UnitRange{Int64}}: Range of the dielectric layers in the interval of each conductor.mu_r_ins::Vector{T} where T<:Real: Relative permeability of the interval of each conductor, with the correction for the helical path of its current [dimensionless].
assembly_ranges::Vector{UnitRange{Int64}}: Range of the conductors of each concentric assembly.positions::Array{Tuple{T, T}, 1} where T<:Real: Center of each concentric assembly in the frame of the cable, in [m].
LineCableModels.DataModel.CableDesign — Type
struct CableDesign{T<:Real, O<:AbstractCablePart, V<:(AbstractVector{<:LineCableModels.DataModel.PlacedRegion}), B<:AbstractShape}Describe one cable by its declared parts and the regions that they resolve to, with tables that map the regions to terminals, sub-cables, repeats, lays, compactions and fills. Each table row holds resolved values in the floating type T, to which numbers from shapes and materials promote. A row exists only for a fact that holds. The declarations stay in tree. The resolved shapes of all regions are in T.
id::String: Name of the cable.tree::AbstractCablePart: Declared parts, as given tobuild.regions::AbstractVector{<:LineCableModels.DataModel.PlacedRegion}: Placed regions, from the inside out. Together they cover the cross-section.outer::AbstractShape: Outline of the cable.terminals::Vector{@NamedTuple{name::Symbol, scope::Vector{@NamedTuple{repeat::Int64, copy::Int64}}, regions::Vector{Int64}}}: Terminals, each as(name, scope, regions), in the order of their first region. A row gives the declared name and the regions of the terminal. Its scope lists the copies that contain the terminal as(repeat, copy)rows, from the outermost, and it is empty for a terminal of the cable's own scope.
assemblies::Array{@NamedTuple{at::Placement{T}, regions::Vector{Int64}, members::Vector{Int64}}, 1} where T<:Real: Sub-cables, each as(at, regions, members): its placement, its own regions and the rows of the sub-cables inside it. Row 1 is the cable.
repeats::Array{@NamedTuple{placements::Array{Placement{T}, 1}, copies::Vector{UnitRange{Int64}}}, 1} where T<:Real: Repeats, each as(placements, copies): the placement and the regions of each copy.lays::Array{@NamedTuple{repeat::Int64, radii::Vector{T}, pitches::Vector{T}, overlengths::Vector{T}, axis::Tuple{T, T}}, 1} where T<:Real: Lays, each as(repeat, radii, pitches, overlengths, axis). A row gives the row of the laid repeat and the point that its copies wind about [m]. For each copy, it gives the lay radius [m], the pitch signed by the handedness [m] and the overlength [dimensionless].
compactions::Array{@NamedTuple{repeat::Int64, factor::T}, 1} where T<:Real: Compactions, each as(repeat, factor): the row of a compacted repeat and its area factor [dimensionless].
fills::Vector{@NamedTuple{region::Int64, contents::Vector{Int64}}}: Fills, each as(region, contents): the fill region of an enclosure and the regions inside it. A fill whose conductive contents all belong to one terminal is interstitial to that conductor.
LineCableModels.DataModel.CableSystem — Type
struct CableSystem{T<:Real, D<:(AbstractVector{<:CableDesign}), V<:(AbstractVector{<:LineCableModels.DataModel.PlacedRegion})}Describe the cables of a line in one cross-section: the design of each cable, its placement and the conductor index of each of its terminals. A conductor index k ≥ 1 connects a terminal to the conductor k of the circuit. Terminals with one index form one conductor, and the index zero eliminates a terminal. The system places the regions of each cable in its own frame. Cables can touch, and the system keeps their placements as declared.
id::String: Name of the system.line_length::Real: Length of the line [m].designs::AbstractVector{<:CableDesign}: Designs of the cables, one per cable.placements::Array{Placement{T}, 1} where T<:Real: Placement of each cable in the frame of the system.regions::AbstractVector{<:LineCableModels.DataModel.PlacedRegion}: Placed regions of the cables in the frame of the system, cable by cable.terminals::Vector{@NamedTuple{cable::Int64, terminal::Int64, connection::Int64, regions::Vector{Int64}}}: Terminals, each as(cable, terminal, connection, regions), cable by cable in the order of the terminals of each design. A row gives the cable, the row of the terminal in the terminals of its design, its conductor index and its regions in the system.
LineCableModels.DataModel.Circle — Type
struct Circle{T<:Real} <: AbstractPrimitive{T<:Real}Represent a circular cross-section, such as a solid conductor or a round wire.
r::Real: Radius [m].at::Placement: Placement of the center in the cable cross-section.
LineCableModels.DataModel.Circle — Method
Circle(r::Real, at::Placement) -> Circle
Construct a circle of radius r [m] at the placement at, in the floating type that both promote to.
Errors
- Throws
DomainErrorwhenris not positive and finite.
LineCableModels.DataModel.Circle — Method
Circle(r::Real) -> Circle
Construct a circle of radius r [m] centered at the origin.
LineCableModels.DataModel.CircularPattern — Type
struct CircularPattern{T<:Real, R<:Union{Offset{T<:Real}, T<:Real}} <: AbstractLayoutPatternPlace n members evenly on a circle about the center of the enclosing part. The circle has a declared radius, or it lies at an Offset from the outline of the part inside the members, which the pattern resolves against with its members. The offset $t$ gives the radius
\[R = S + t + \delta,\]
where $S$ is the support of that outline [m], and $\delta$ is the radial half extent of a member: the radius of a circle, or half the height of a rectangle [m].
n::Int64: Number of members [dimensionless].r::Union{Offset{T}, T} where T<:Real: Radius of the circle through the member centers [m], or the offset of the members from the outline of the part inside them.
φ0::Real: Angle of the first member [rad].span::Real: Counterclockwise angular span of the members [rad].gap_frac::Real: Clearance between adjacent members, as a fraction of their width [dimensionless].
LineCableModels.DataModel.CircularPattern — Method
CircularPattern(n::Integer; r, φ0, span, gap_frac)
Construct the circular pattern of n members on the circle of radius r [m], or with the members at the Offset r from the outline of the part inside them. The keywords are the fields of CircularPattern: by default, the first member lies at angle zero and the members fill the full circle without clearance.
Errors
- Throws
DomainErrorwhennis not positive, when a radiusris negative or not finite, whenspanis outside (0, 2π], or whenφ0orgap_fracis not finite orgap_fracis negative.
LineCableModels.DataModel.DifferenceShape — Type
struct DifferenceShape{T<:Real, O<:AbstractShape{T<:Real}, H<:(AbstractVector{<:AbstractShape})} <: AbstractShape{T<:Real}Represent a cross-section with holes: the outer cross-section without the cross-sections inside it, such as the fill between the wires of a course.
outer::AbstractShape: Outer cross-section.holes::AbstractVector{<:AbstractShape}: Outlines removed from the outer one. They lie inside it, and each lies outside the others.
LineCableModels.DataModel.Enclosure — Type
struct Enclosure{F<:Region, C<:AbstractCablePart} <: AbstractCablePartFill a container around parts with a material. The fill region declares the container as its primitive, either explicitly or as an offset from the part inside the enclosure. It takes the container without the outlines of the outermost regions of its contents, those that lie inside no other content's outline. The design refuses an empty hollow inside such an outline as a gap.
The outline of the enclosure is the outline of its container. The container is a circle or an annulus, and the regions inside it lie between its inner and outer radii. resolve throws ArgumentError for any other container.
fill::Region: Region of the fill material, whose primitive declares the container.contents::AbstractCablePart: Parts inside the container.
LineCableModels.DataModel.Helix — Type
struct Helix{L<:LayRatio, T<:Real}Represent the helical path of the members of a course along the cable.
lay::LayRatio: Lay of the helix.dir::Int64: Handedness of the lay,1or-1[dimensionless].φ0::Real: Angle at which the helix starts [rad].
LineCableModels.DataModel.Helix — Method
Helix(
lay::LayRatio;
dir,
φ0
) -> Helix{L, Float64} where L<:LayRatio
Construct the helix of lay. The keywords are the fields of Helix: by default, the handedness is 1 and the helix starts at angle zero.
Errors
- Throws
ArgumentErrorwhendiris not1or-1, andDomainErrorwhenφ0is not finite.
LineCableModels.DataModel.Lay — Type
struct Lay{H<:Helix, R<:Repeat} <: AbstractCablePartLay the copies of a repeat along the cable. Each copy follows the helix about the center of the repeat, at the lay radius of its centroid:
\[r = \left| \frac{\sum_i A_i \mathbf c_i}{\sum_i A_i} \right|,\]
where $A_i$ [m²] and $\mathbf c_i$ [m] are the area and centroid of each region of the copy. The helix has the pitch and overlength at that radius, the pitch signed by the direction of the helix.
helix::Helix: Helix that the copies follow.part::Repeat: Repeat whose copies the helix lays.
LineCableModels.DataModel.LayRatio — Type
struct LayRatio{T<:Real}Store the ratio of the lay length of a helix to the mean diameter of its course.
q::Real: Lay length over the mean lay diameter [dimensionless].
LineCableModels.DataModel.LayRatio — Method
LayRatio(q::Real) -> LayRatio
Construct the lay ratio q [dimensionless].
Errors
- Throws
DomainErrorwhenqis not positive and finite.
LineCableModels.DataModel.Offset — Type
struct Offset{T<:Real}Declare a distance outward from the outline of the part inside, which the offset resolves against. As the cross-section of a region, it is a layer of that thickness around the outline, such as an insulation, a semiconducting screen or a jacket. As the radius of a CircularPattern, it is the clearance between the outline and the members.
t::Real: Distance outward from the outline [m].
LineCableModels.DataModel.Offset — Method
Offset(t::Real) -> Offset
Declare the distance t [m] outward from the outline of the part inside.
Errors
- Throws
DomainErrorwhentis negative or not finite.
LineCableModels.DataModel.PlacedRegion — Type
struct PlacedRegion{R<:Region, S<:AbstractShape}Represent one region as a cable or a system places it: its declaration and its resolved cross-section.
source::Region: Declared region.shape::AbstractShape: Resolved cross-section in the frame of the cable or the system that places the region.
LineCableModels.DataModel.Placement — Type
Placement(x::Real, y::Real) -> Any
Placement(x::Real, y::Real, φ::Real) -> Any
Construct a placement after floating and promoting its coordinates. The arguments are the fields of Placement, and the rotation is zero unless given.
Errors
- Throws
DomainErrorwhen a coordinate or the rotation is not finite.
LineCableModels.DataModel.Placement — Type
struct Placement{T<:Real}Represent a planar translation and a rotation relative to a parent frame.
x::Real: Horizontal translation [m].y::Real: Vertical translation [m].φ::Real: Counterclockwise rotation [rad].
LineCableModels.DataModel.Placement — Method
Rotate point by the rotation of placement, then translate it by the position of placement:
\[x = x_0 + u \cos\phi - v \sin\phi, \qquad y = y_0 + u \sin\phi + v \cos\phi,\]
where $(u, v)$ is point [m], $(x_0, y_0)$ is the position of placement [m] and $\phi$ is its rotation [rad].
Returns
- The point
(x, y)in the parent frame [m].
LineCableModels.DataModel.Rectangle — Type
struct Rectangle{T<:Real} <: AbstractPrimitive{T<:Real}Represent a rectangular strand before a circular pattern bends it onto its course: its width lies along the course and its height across it.
w::Real: Width along the local x-axis [m].h::Real: Height along the local y-axis [m].at::Placement: Placement of the center in the cable cross-section.
LineCableModels.DataModel.Rectangle — Method
Rectangle(w::Real, h::Real) -> Rectangle
Construct a rectangle of width w and height h [m] centered at the origin, in the floating type that they promote to.
Errors
- Throws
DomainErrorwhenworhis not positive and finite.
LineCableModels.DataModel.Region — Type
struct Region{P<:Union{AbstractPrimitive, Offset}, M<:Material} <: AbstractCablePartDeclare a part of one material in one cross-section.
tag::Symbol: Name of the region within the cable.primitive::Union{AbstractPrimitive, Offset}: Declared cross-section: a primitive, or an offset from the outline of the part inside.material::Material: Material of the region. Its class tells whether the region conducts.
LineCableModels.DataModel.Repeat — Type
struct Repeat{P<:AbstractLayoutPattern, R<:AbstractCablePart} <: AbstractCablePartRepeat a part at the placements of a pattern. The part is declared in its own frame, and the pattern places each copy about the center of the enclosing part. A repeated region is a strand, and the pattern bends a rectangular strand into an annular sector of the same area on its course. Each copy is a scope: the terminals declared in the part are distinct terminals in every copy. The outline of the copies is the circle about the center that contains them.
pattern::AbstractLayoutPattern: Pattern that places the copies.part::AbstractCablePart: Part that the pattern copies.
LineCableModels.DataModel.Stack — Type
struct Stack{V<:(AbstractVector{<:AbstractCablePart})} <: AbstractCablePartLayer parts outward. Each part resolves against the outline of the parts inside it.
items::AbstractVector{<:AbstractCablePart}: Parts from the inside out.
LineCableModels.DataModel.Stack — Method
Stack(
items::AbstractCablePart...
) -> Stack{Vector{AbstractCablePart}}
Layer items outward, from the inside out.
Errors
- Throws
ArgumentErrorwhen no part is given.
LineCableModels.DataModel.Terminal — Type
struct Terminal{P<:AbstractCablePart} <: AbstractCablePartAssign the conductive regions of a part to one terminal, which its name identifies within its scope. The regions of one terminal form one node of the circuit. A terminal around a part takes the conductive regions of every terminal inside it, the copies of a repeat included, and the parts of one name in one scope share one terminal.
name::Symbol: Name that identifies the terminal within its scope.part::AbstractCablePart: Part whose conductive regions belong to the terminal.
LineCableModels.DataModel.area — Function
area(shape)Return the cross-sectional area of shape [m²]:
\[A_\mathrm{circle} = \pi r^2, \qquad A_\mathrm{annulus} = \pi \left(r_o^2 - r_i^2\right), \qquad A_\mathrm{rectangle} = w h, \qquad A_\mathrm{sector} = \frac{\Delta\phi}{2} \left(r_o^2 - r_i^2\right),\]
where $r$ is the radius of a circle, $r_i$ and $r_o$ are inner and outer radii, $w$ and $h$ are the width and height of a rectangle [m], and $\Delta\phi$ [rad] is the angular span of a sector. A DifferenceShape has the area of its outer cross-section less the areas of its holes.
LineCableModels.DataModel.armor — Method
armor(material::Material; shape, n, lay, fill, tag)
Declare a course of round armor wires of material laid on the part inside it. The wires lie at no offset from the outline of that part. A fill completes the layer that they occupy, as thick as their diameter. Its region takes the name <tag>_fill.
Keywords
shape: cross-section of one wire, aCircle.n: number of wires.lay:LayRatioof the course.fill: material of the fill. Default: an insulator with infinite resistivity and unit relative permittivity and permeability.tag: name of the regions of the wires. Default::armor.
Returns
Errors
- Throws
DomainErrorwhen the wires do not fit on their course.
LineCableModels.DataModel.bedding — Method
bedding(material::Material; t, tag)
Declare a bedding layer of material around the part inside it. It takes the keywords of insulation, with the default tag :bedding.
LineCableModels.DataModel.boundary — Function
boundary(shape)Return the outline of shape. A circle and an annular sector are their own outlines. The outline of an annulus is the circle of its outer radius. The outline of a DifferenceShape is the outline of its outer cross-section. The next part resolves against the outline, and an enclosure removes it from its fill.
LineCableModels.DataModel.centroid — Function
centroid(shape)Return the centroid (x, y) of shape in the cable cross-section [m]. For an annular sector, the centroid lies on its symmetry axis at the distance
\[d = \frac{4 \sin(\Delta\phi / 2) \left(r_o^3 - r_i^3\right)} {3 \Delta\phi \left(r_o^2 - r_i^2\right)}\]
from its center of curvature, where $\Delta\phi$ is its angular span and $r_i$ and $r_o$ are its inner and outer radii. A circle and an annulus have their centroid at their center. A DifferenceShape of area $A$ has the centroid
\[\mathbf c = \frac{A_o \mathbf c_o - \sum_h A_h \mathbf c_h}{A},\]
where $A_o$ and $\mathbf c_o$ are the area and centroid of its outer cross-section, and $A_h$ and $\mathbf c_h$ those of each hole.
LineCableModels.DataModel.core — Method
core(material::Material; r, tag)
Declare a solid round conductor of material at the center of the cable.
Keywords
r: radius [m].tag: name of the region. Default::core.
Returns
LineCableModels.DataModel.distance — Function
distance(shape)Return the radius of a circle about the origin that shape does not enter [m]:
\[\max(0, d - r_o, r_i - d),\]
where $d$ is the distance from the origin to the center of shape, and $r_i$ and $r_o$ are its inner and outer radii. The inner radius of a circle is zero, and the center of an annular sector is its center of curvature.
LineCableModels.DataModel.flatten — Method
flatten(
design::CableDesign
) -> LineCableModels.DataModel.CableBlueprint
Reduce a cable design to its CableBlueprint. Each terminal becomes a tube about the center of the cable. The tube spans the conductive regions of the terminal and the fills between them, from their nearest to their farthest extent. The regions outside the tube, up to the next terminal, become the layers of its dielectric interval. Regions inside the first terminal lie in no interval.
The conductive regions $i$ of a terminal carry direct current in parallel. A region of resistivity $\rho_i$, cross-section $A_i$ and overlength $\ell_i$ along its helices has the conductance $G_i = A_i / (\rho_i \ell_i)$ per unit length. Its share of the current is $w_i = G_i / \sum_j G_j$. The terminal has the resistance $R = 1 / \sum_i G_i$ and the temperature coefficient $\alpha = \sum_i w_i \alpha_i$. Its turns per unit length are $N = \sum_i w_i N_i$, where $N_i$ sums the inverse pitches of the helices of region $i$, signed by their direction. Its geometric mean radius $g$ follows from
\[\log g = \sum_i w_i^2 \log g_i + 2 \sum_{i < j} w_i w_j \log d_{ij}.\]
An annulus about the center of inner radius $a$ and outer radius $b$ has the self term
\[\log g_i = \log b - \mu_i \left[\frac{a^4}{(b^2 - a^2)^2} \log\frac{b}{a} - \frac{3a^2 - b^2}{4 (b^2 - a^2)}\right],\]
which is $\log b - \mu_i / 4$ for a circle and $\log b$ for a thin shell, $a = b$. Any other region has the self term $\log \sqrt{A_i / \pi} - \mu_i / 4$ of the circle of its area. The mutual distance $d_{ij}$ is the distance between the centroids. For a region inside the hole of an annulus, it is the mean distance of Rosa (1908), Eq. (57):
\[\log d_{ij} = \frac{b^2 \log b - a^2 \log a}{b^2 - a^2} - \frac{1}{2}.\]
The tube of inner radius $r_i$ and outer radius $r_e$ takes the resistivity $R \pi (r_e^2 - r_i^2)$. Its relative permeability gives the self term of an annulus the value $\log g$:
\[\mu_\mathrm{tube} = \frac{\log r_e - \log g} {\frac{r_i^4}{(r_e^2 - r_i^2)^2} \log\frac{r_e}{r_i} - \frac{3 r_i^2 - r_e^2}{4 (r_e^2 - r_i^2)}},\]
with the first term of the denominator zero for $r_i = 0$. The interval of the tube reaches from $r_e$ to $r_d$, and its layer $k$ of relative permeability $\mu_k$ reaches from $a_k$ to $b_k$. The interval has
\[\mu_{ins} = \frac{\sum_k \mu_k \log(b_k / a_k)}{\log(r_d / r_e)} \left[1 + \frac{2 \pi^2 N^2 (r_d^2 - r_e^2)}{\log(r_d / r_e)}\right],\]
and $\mu_{ins} = 1$ without layers.
Returns
- A
CableBlueprintwith one concentric assembly, the cable.
Errors
- Throws
ArgumentErrorwhen a terminal lies in a copy of a repeat, or when a fill surrounds the regions of several terminals or of none. - Throws
ArgumentErrorwhen the regions of a terminal are not contiguous from the inside out or do not tile an annulus about the center, or when a dielectric layer is not such an annulus. - Throws
ArgumentErrorwhen the conductive regions of one terminal have different reference temperatures.
LineCableModels.DataModel.insulation — Method
insulation(material::Material; t, tag)
Declare an insulation layer of material around the part inside it.
Keywords
t: thickness [m].tag: name of the region. Default::insulation.
Returns
LineCableModels.DataModel.jacket — Method
jacket(material::Material; t, tag)
Declare a jacket layer of material around the part inside it. It takes the keywords of insulation, with the default tag :jacket.
LineCableModels.DataModel.overlength — Method
overlength(helix::Helix, radius::Real) -> Any
Return the ratio of the length of helix to the length of the cable, at the lay radius radius [m]:
\[\frac{\ell}{\ell_0} = \sqrt{1 + \left(\frac{\pi}{q}\right)^2},\]
where $q$ is the lay ratio. A path at zero radius lies straight along the axis, with ratio 1.
LineCableModels.DataModel.pitch — Method
pitch(helix::Helix, radius::Real) -> Any
Return the lay length of helix at the lay radius radius [m]:
\[p = 2 q r,\]
where $q$ is the lay ratio [dimensionless] and $r$ the radius [m].
LineCableModels.DataModel.placements — Function
placements(pattern, member)Return the course that pattern lays with member, as (placements, shape): the placement of each member in the frame of the enclosing part, and the cross-section that every member shares. A circular pattern of radius $R$, first angle $\phi_0$ and span $\Delta\phi$ places member $k = 0, \ldots, n - 1$ at the angle $\phi_k = \phi_0 + k \delta$.
A circle is placed unchanged, centered at $(R \cos\phi_k, R \sin\phi_k)$, with the step $\delta = \Delta\phi / n$ for a full turn, $\delta = \Delta\phi / (n - 1)$ for a partial span, and $\delta = 0$ for one member. A rectangle of width $w$ and height $h$ becomes an AnnularSector of the same area about the center of the part, rotated by $\phi_k$, with $\delta = \Delta\phi / n$ and
\[r_i = \max\left(0, R - \frac{h}{2}\right), \qquad r_o = r_i + h, \qquad \Delta\phi_\mathrm{sector} = \frac{2 w h}{r_o^2 - r_i^2}.\]
Radii, widths and heights are in [m], and angles in [rad].
Errors
- Throws
DomainErrorwhen the members do not fit on the pattern with its clearance.
LineCableModels.DataModel.r_ex — Function
r_ex(shape)Return the outer radius of a circular shape [m].
LineCableModels.DataModel.r_in — Function
r_in(shape)Return the inner radius of a circular shape [m]: zero for a circle.
LineCableModels.DataModel.screen — Method
screen(material::Material; t, tag)
Declare a screen layer of material around the part inside it, such as a semiconducting screen. It takes the keywords of insulation, with the default tag :screen.
LineCableModels.DataModel.sheath — Method
sheath(material::Material; t, tag)
Declare a sheath layer of material around the part inside it. It takes the keywords of insulation, with the default tag :sheath.
LineCableModels.DataModel.stranded — Method
stranded(
material::Material;
center,
shape,
n,
lay,
boundary,
fill,
tag
)
Declare a stranded conductor of material at the center of the cable. Courses of round wires or rectangular strands lie around a center wire, inside the outline that boundary declares. Each course lies on the course inside it, at no offset from its outline. A circular pattern bends a rectangular strand into an annular sector of the same area on its course. A fill takes boundary without the wires and sectors, and its region takes the name <tag>_fill.
Keywords
center: cross-section of the center wire.shape: cross-section of one strand, a circle or a rectangle.n: number of members in each course, from the inside out.lay:LayRatioof every course.boundary: outline of the conductor, aCirclethat the fill takes.fill: material of the fill. Default: an insulator with infinite resistivity and unit relative permittivity and permeability.tag: name of the regions of the center wire and the courses. Default::stranded.
Returns
Errors
- Throws
DomainErrorwhen a course does not fit on the course inside it, or when a wire or sector crossesboundary.
LineCableModels.DataModel.support — Function
support(shape)Return the radius of a circle about the origin that contains shape [m]:
\[S = \sqrt{x_c^2 + y_c^2} + r_o,\]
where $(x_c, y_c)$ is the center of shape and $r_o$ its outer radius [m]. A DifferenceShape has the support of its outer cross-section.
LineCableModels.DataModel.@cable — Macro
@cable id begin
parts...
endBuild the cable id from the parts of the block, from the inside out, as build(CableDesign, id, parts...) does.
Arguments
id: name of the cable.parts: declared parts from the inside out, each on its own line of the block.
Returns
- A
CableDesign.
Examples
copper = Material(:conductor, 1.7241e-8, 1, 1, 20, 0.00393)
polyethylene = Material(:insulator, 1.0e14, 2.3)
wire = @cable "insulated_wire" begin
@terminal :core begin
core(copper; r = 4.0e-3) # [m]
end
insulation(polyethylene; t = 1.0e-3) # [m]
end
@assert r_ex(wire.outer) ≈ 5.0e-3
# outputLineCableModels.DataModel.@terminal — Macro
@terminal name begin
parts...
endAssign the conductive regions of the parts of the block to the terminal name, as Terminal(name, Stack(parts...)) does.
Arguments
name: name of the terminal, aSymbol.parts: declared parts from the inside out, each on its own line of the block.
Returns
- A
Terminal.
LineCableModels.Commons.build — Method
build(
_::Type{CableDesign},
id::AbstractString,
parts::AbstractCablePart...
) -> CableDesign{T, Stack{Vector{AbstractCablePart}}} where T<:Real
Build the cable id from its parts. The parts resolve from the center of the cable outward into placed regions. Each node of the declaration records its facts in the tables of the design, such as the conductive regions of a terminal or the copies of a repeat. The cable is the one sub-cable of its design, at the origin.
Arguments
id: name of the cable.parts: declared parts, from the inside out.
Returns
- A
CableDesign.
Errors
- Throws
ArgumentErrorwhen no part is given or when a conductive region lies outside everyTerminal. - Throws
DomainErrorwhen a part overlaps the part inside it or leaves a gap around it, or when a region leaves its enclosure.
LineCableModels.Commons.build — Method
build(
::Type{CableSystem},
designs::AbstractVector{<:CableDesign},
placements::AbstractVector{<:Placement};
connections,
id,
line_length
)
Build the system id of the cables of a line in one cross-section. Each cable is a design at a placement in the frame of the system, which places the regions of the cable. The connection of a cable maps each terminal name of its design to a conductor index. Every terminal of that name takes the index, in each copy that declares the name, so copies that share a name form one conductor. The system keeps the placements as declared, so cables can touch.
Arguments
designs: designs of the cables.placements: placement of each cable in the frame of the system, its translation in [m] and its rotation in [rad].
Keywords
connections: oneNamedTupleper cable. It maps each terminal name of its design to a conductor indexk ≥ 1, or to zero to eliminate the terminal, as in(core = 1, sheath = 2, armour = 0).id: name of the system.line_length: length of the line [m].
Returns
- A
CableSystem.
Errors
- Throws
DimensionMismatchwhen the designs, placements and connections differ in number. - Throws
ArgumentErrorwhen a connection omits a terminal name of its cable, or specifies a name that the cable lacks. - Throws
DomainErrorwhen a conductor index is negative, when the line length is not positive and finite, or when two cables overlap.
Base.:* — Method
*(parent::Placement, child::Placement) -> Any
Compose child, a placement in the frame of parent, into the frame that holds parent:
\[x = x_p + x_c \cos\phi_p - y_c \sin\phi_p, \qquad y = y_p + x_c \sin\phi_p + y_c \cos\phi_p, \qquad \phi = \phi_p + \phi_c,\]
where $(x_p, y_p)$ and $(x_c, y_c)$ are the positions of parent and child [m], and $\phi_p$ and $\phi_c$ are their rotations [rad].
Engine
LineCableModels.Engine — Module
LineCableModels.EngineCompute the series impedances and shunt admittances of cables per unit length. The problem describes the cables, the earth, the operating temperature, and the frequencies. A formulation selects the formulas, and a backend executes the computation. The trait backend gives a formulation type's default backend. A backend passed first to compute chooses another. Each formula family is a child module with one Formula type whose identifier names the formula.
LineCableModels.Engine.ε₀ — Constant
The permittivity ε₀ of vacuum [F/m].
LineCableModels.Engine.μ₀ — Constant
The permeability μ₀ of vacuum, 4π × 10⁻⁷ [H/m].
LineCableModels.Engine.AbstractEarthProperties — Type
abstract type AbstractEarthProperties <: LineCableModels.Commons.AbstractFormulationRepresent the common supertype of the laws of earth properties and of the models of the equivalent earth.
LineCableModels.Engine.AbstractEarthReturn — Type
abstract type AbstractEarthReturn <: LineCableModels.Commons.AbstractFormulationRepresent the common supertype of earth-return impedance and potential-coefficient formulas.
LineCableModels.Engine.AbstractInsulationAdmittance — Type
abstract type AbstractInsulationAdmittance <: LineCableModels.Commons.AbstractFormulationRepresent the common supertype of admittivity laws for insulator layers.
LineCableModels.Engine.AbstractInsulationImpedance — Type
abstract type AbstractInsulationImpedance <: LineCableModels.Commons.AbstractFormulationRepresent the common supertype of magnetic series-impedance formulas across annular dielectrics.
LineCableModels.Engine.AbstractInternalImpedance — Type
abstract type AbstractInternalImpedance <: LineCableModels.Commons.AbstractFormulationRepresent the common supertype of surface-impedance formulas for tubular conductors.
LineCableModels.Engine.AbstractResistivity — Type
abstract type AbstractResistivity <: LineCableModels.Commons.AbstractFormulationRepresent the common supertype of temperature laws for conductor resistivity.
LineCableModels.Engine.AbstractSemiconAdmittance — Type
abstract type AbstractSemiconAdmittance <: LineCableModels.Commons.AbstractFormulationRepresent the common supertype of admittivity laws for semicon layers.
LineCableModels.Engine.AbstractShunt — Type
abstract type AbstractShunt <: LineCableModels.Commons.AbstractFormulationRepresent the common supertype of formulas for potential coefficients inside cables.
LineCableModels.Engine.CoaxialFormulation — Type
struct CoaxialFormulation{I<:LineCableModels.Engine.InternalImpedance.Formula, D<:LineCableModels.Engine.InsulationImpedance.Formula, K<:LineCableModels.Engine.InsulationAdmittance.Formula, S<:LineCableModels.Engine.SemiconAdmittance.Formula, Z<:(NamedTuple{(:air, :earth, :mixed), <:Tuple{Vararg{LineCableModels.Engine.EarthReturn.Formula}}}), Y<:(NamedTuple{(:air, :earth, :mixed), <:Tuple{Vararg{LineCableModels.Engine.EarthReturn.Formula}}}), U<:LineCableModels.Engine.Shunt.Formula, R<:LineCableModels.Engine.Resistivity.Formula, P<:LineCableModels.Engine.EarthProperties.Formula, E<:LineCableModels.Engine.EarthProperties.Formula, L<:Tuple{Vararg{LineCableModels.Commons.AbstractFormulation}}, O<:LineCableModels.Commons.FormulationOptions} <: LineCableModels.Commons.AbstractFormulationSelect the formulas for a coaxial line-parameters computation, with the longitudinal wavenumber Γ [1/m] and matrix reductions as options. Equal earth formulas share one block at each frequency.
internal_impedance::LineCableModels.Engine.InternalImpedance.Formula: Formula for the surface impedances of each equivalent conductor.insulation_impedance::LineCableModels.Engine.InsulationImpedance.Formula: Formula for the magnetic series-impedance term across each dielectric interval.insulation_admittance::LineCableModels.Engine.InsulationAdmittance.Formula: Admittivity law for insulator layers.semicon_admittance::LineCableModels.Engine.SemiconAdmittance.Formula: Admittivity law for semicon layers.earth_impedance::NamedTuple{(:air, :earth, :mixed), <:Tuple{Vararg{LineCableModels.Engine.EarthReturn.Formula}}}: Earth-return impedance formula of each domain of a pair,(air, earth, mixed).earth_admittance::NamedTuple{(:air, :earth, :mixed), <:Tuple{Vararg{LineCableModels.Engine.EarthReturn.Formula}}}: Earth-return potential-coefficient formula of each domain of a pair,(air, earth, mixed).shunt::LineCableModels.Engine.Shunt.Formula: Formula for potential coefficients inside each cable.resistivity::LineCableModels.Engine.Resistivity.Formula: Temperature law for conductor resistivity.earth_properties::LineCableModels.Engine.EarthProperties.Formula: Frequency law for the properties of each earth layer.equivalent_earth::LineCableModels.Engine.EarthProperties.Formula: Model of the equivalent earth of the layers below the air.formulas::Tuple{Vararg{LineCableModels.Commons.AbstractFormulation}}: Distinct formulas of the slots, computed once at construction.options::LineCableModels.Commons.FormulationOptions: Options: the longitudinal wavenumberΓ[1/m] and the reductions.
LineCableModels.Engine.CoaxialFormulation — Method
CoaxialFormulation(
;
internal_impedance,
insulation_impedance,
insulation_admittance,
semicon_admittance,
earth_impedance,
earth_admittance,
shunt,
resistivity,
earth_properties,
equivalent_earth,
kw...
) -> CoaxialFormulation{I, D, K, S, Z, Y, U, R, P, E, <:Tuple{Vararg{LineCableModels.Commons.AbstractFormulation}}, LineCableModels.Commons.FormulationOptions{CoaxialFormulation, @NamedTuple{Γ::ComplexF64, bundle::Bool, kron::Bool, transposition::Bool}}} where {I<:LineCableModels.Engine.InternalImpedance.Formula, D<:LineCableModels.Engine.InsulationImpedance.Formula, K<:LineCableModels.Engine.InsulationAdmittance.Formula, S<:LineCableModels.Engine.SemiconAdmittance.Formula, Z<:(NamedTuple{(:air, :earth, :mixed), <:Tuple{LineCableModels.Engine.EarthReturn.Formula, LineCableModels.Engine.EarthReturn.Formula, LineCableModels.Engine.EarthReturn.Formula}}), Y<:(NamedTuple{(:air, :earth, :mixed), <:Tuple{LineCableModels.Engine.EarthReturn.Formula, LineCableModels.Engine.EarthReturn.Formula, LineCableModels.Engine.EarthReturn.Formula}}), U<:LineCableModels.Engine.Shunt.Formula, R<:LineCableModels.Engine.Resistivity.Formula, P<:LineCableModels.Engine.EarthProperties.Formula, E<:LineCableModels.Engine.EarthProperties.Formula}
Build a coaxial formulation. Each formula keyword accepts :id, :id => (key = value, ...), a formula of its family, or :default, the default of its slot. Other keywords set the formulation options. Earth slots with the same identifier must hold equal formulas.
Keywords
internal_impedance: conductor surface-impedance formula. Default::schelkunoff1934.insulation_impedance: magnetic dielectric-interval formula. Default::ametani1980.insulation_admittance: admittivity law for insulator layers. Default::lossless.semicon_admittance: admittivity law for semicon layers. Default::lossless.earth_impedance: earth-return impedance formula, or a record(air, earth, mixed)of them. A domain left out takes the default. Default::martins2026.earth_admittance: earth-return potential-coefficient formula, or a record(air, earth, mixed)of them. A domain left out takes the default. Default::martins2026.shunt: formula for potential coefficients inside cables. Default::series.resistivity: conductor resistivity law. Default::linear.earth_properties: frequency law of each earth layer. Default::constant.equivalent_earth: model of the equivalent earth of the layers below the air. Default::bottommost.Γ: longitudinal wavenumber [1/m], one value or one per frequency. Default:0.bundle: merge conductors with the same positive connection index. Default:true.kron: remove conductors with connection index zero byeliminate!. Default:true.transposition: apply ideal cyclic transposition. Default:false.
Returns
- A
CoaxialFormulationwith typed formula slots and options.
Errors
- Throws
ArgumentErrorfor an unknown formula identifier or option, or invalid integration controls. - Throws
ArgumentErrorfor different formulas of one identifier in the earth slots. - Throws
DomainErrorfor an earth formula that does not give the quantity of its slot. - Throws
DomainErrorfor a model of the equivalent earth inearth_properties, or a law inequivalent_earth. - Throws
DomainErrorfor a nonzeroΓwith an earth formula that does not read it. - Throws
DomainErrorwhenΓis empty or nonfinite.
LineCableModels.Engine.CoaxialInput — Type
struct CoaxialInput{T<:Real, L<:(AbstractArray{<:Material{T<:Real}, 1})}Hold the numerical input of a computation in the coaxial model. Each conductor of the system is an equivalent tube, and the dielectric layers of its interval surround it. Each cable has a center and an outer radius. Its plan comes from reductions under the bundle and kron options of the formulation. CoaxialInput(problem, options) builds the input once from the blueprints of the designs and from the placements and the connections of the system. The values have the problem's type T, and the conductors follow the terminals of the system, cable by cable and from the inside out.
cable::Vector{Int64}: Cable of each conductor.connection::Vector{Int64}: Conductor index of each conductor in the circuit,k ≥ 1or zero.label::Vector{String}: Label of each conductor,cable:<i>:<terminal>.r_in::Vector{T} where T<:Real: Inner radius of the tube of each conductor [m].r_ex::Vector{T} where T<:Real: Outer radius of the tube of each conductor [m].material::Array{Material{T, :conductor}, 1} where T<:Real: Material of the tube of each conductor.r_ins_ex::Vector{T} where T<:Real: For each conductor, the outer radius of its dielectric interval, or the conductor's own outer radius for an empty interval [m].
mu_r_ins::Vector{T} where T<:Real: Relative permeability of the dielectric interval of each conductor, corrected for the helical path of its current [dimensionless].
dielectric_ranges::Vector{UnitRange{Int64}}: Range of the dielectric layers in the interval of each conductor.dielectric_r_in::Vector{T} where T<:Real: Inner radius of each dielectric layer [m].dielectric_r_ex::Vector{T} where T<:Real: Outer radius of each dielectric layer [m].dielectric_material::AbstractVector{<:Material{T}} where T<:Real: Material of each dielectric layer.assemblies::Vector{UnitRange{Int64}}: Range of the conductors of each concentric assembly.x::Vector{T} where T<:Real: Horizontal coordinate of the center of each cable in the frame of the system [m].y::Vector{T} where T<:Real: Vertical coordinate of the center of each cable in the frame of the system [m].radius::Vector{T} where T<:Real: Outer radius [m] of each cable.earth_layer::Vector{Int64}: Layer of the earth model at the center of each cable: 1 for the air,kfor the(k - 1)-th earth layer.bundles::Vector{Tuple{Int64, Int64}}: Conductor pairs(first, other)to merge withbundle!, or an empty list.kept::Vector{Int64}: Indices to keep in result order, with the first conductor of each positive index first.
eliminated::Vector{Int64}: Indices to remove: other conductors withbundle, index zero withkron.terminals::Vector{String}: Label of each kept row: the label of its conductor, or the labels of a bundle joined by+.
LineCableModels.Engine.FEM — Type
struct FEM{K<:LineCableModels.Engine.InsulationAdmittance.Formula, S<:LineCableModels.Engine.SemiconAdmittance.Formula, R<:LineCableModels.Engine.Resistivity.Formula, P<:LineCableModels.Engine.EarthProperties.Formula, E<:LineCableModels.Engine.EarthProperties.Formula, L<:Tuple{Vararg{LineCableModels.Commons.AbstractFormulation}}, O<:LineCableModels.Commons.FormulationOptions} <: LineCableModels.Commons.AbstractFormulationSelect the material laws for a finite-element line-parameters computation, with the longitudinal wavenumber Γ [1/m] and matrix reductions as options. The Gmsh extension supplies the field solver.
insulation_admittance::LineCableModels.Engine.InsulationAdmittance.Formula: Admittivity law for insulator layers.semicon_admittance::LineCableModels.Engine.SemiconAdmittance.Formula: Admittivity law for semicon layers.resistivity::LineCableModels.Engine.Resistivity.Formula: Temperature law for conductor resistivity.earth_properties::LineCableModels.Engine.EarthProperties.Formula: Frequency law for the properties of each earth layer.equivalent_earth::LineCableModels.Engine.EarthProperties.Formula: Model of the equivalent earth of the layers below the air.formulas::Tuple{Vararg{LineCableModels.Commons.AbstractFormulation}}: Formulas of the slots, which a computation validates against its problem.options::LineCableModels.Commons.FormulationOptions: Options: the longitudinal wavenumberΓ[1/m] and the reductions.
LineCableModels.Engine.FEM — Method
FEM(
;
insulation_admittance,
semicon_admittance,
resistivity,
earth_properties,
equivalent_earth,
kw...
) -> FEM{K, S, R, P, E, <:Tuple{LineCableModels.Engine.InsulationAdmittance.Formula, LineCableModels.Engine.SemiconAdmittance.Formula, LineCableModels.Engine.Resistivity.Formula, LineCableModels.Engine.EarthProperties.Formula, LineCableModels.Engine.EarthProperties.Formula}, LineCableModels.Commons.FormulationOptions{FEM, @NamedTuple{Γ::ComplexF64, bundle::Bool, kron::Bool, transposition::Bool}}} where {K<:LineCableModels.Engine.InsulationAdmittance.Formula, S<:LineCableModels.Engine.SemiconAdmittance.Formula, R<:LineCableModels.Engine.Resistivity.Formula, P<:LineCableModels.Engine.EarthProperties.Formula, E<:LineCableModels.Engine.EarthProperties.Formula}
Build a finite-element formulation. Each formula keyword accepts :id, :id => (key = value, ...), a formula of its family, or :default, the default of its slot. Other keywords set the formulation options.
Keywords
insulation_admittance: admittivity law for insulator layers. Default::lossless.semicon_admittance: admittivity law for semicon layers. Default::lossless.resistivity: conductor resistivity law. Default::linear.earth_properties: frequency law of each earth layer. Default::constant.equivalent_earth: model of the equivalent earth of the layers below the air. Default::bottommost.Γ: longitudinal wavenumber [1/m], one value or one per frequency. Default:0.bundle: merge conductors with the same positive connection index. Default:true.kron: remove conductors with connection index zero byeliminate!. Default:true.transposition: apply ideal cyclic transposition. Default:false.
Returns
- An
FEMformulation with typed material laws and options.
Errors
- Throws
ArgumentErrorfor an unknown formula identifier or option. - Throws
DomainErrorfor a model of the equivalent earth inearth_properties, or a law inequivalent_earth. - Throws
DomainErrorwhenΓis empty or nonfinite.
LineCableModels.Engine.GmshBackend — Type
struct GmshBackend <: LineCableModels.Commons.AbstractBackendRepresent the backend that executes FEM through the Gmsh extension.
LineCableModels.Engine.LCMBackend — Type
struct LCMBackend <: LineCableModels.Commons.AbstractBackendRepresent the backend that executes the coaxial formulation in process.
LineCableModels.Engine.LineParameters — Type
struct LineParameters{T<:Real, F<:LineCableModels.Commons.AbstractFormulation, N<:NamedTuple}Store the line parameters of a problem: the series impedance and the shunt admittance per unit length of the retained conductors at each frequency. Each row has the label of its conductor, and the record keeps the formulation that computed it and the length of the line.
Z::Array{Complex{T}, 3} where T<:Real: Series impedance of the line [Ω/m], with one matrix per frequency.Y::Array{Complex{T}, 3} where T<:Real: Shunt admittance of the line [S/m], with one matrix per frequency.frequencies::Vector{T} where T<:Real: Frequencies of the scan [Hz].terminals::Vector{String}: Label of each retained conductor:cable:<i>:<terminal>, or the labels of a bundle joined by+.
line_length::Real: Length of the line [m].formulation::LineCableModels.Commons.AbstractFormulation: Formulation that computed the result.trace::NamedTuple: The backend's matrices that buildZandY, each anArray{Complex{T}, 3}whose last index is the frequency, or empty when the computation did not keep them. A backend's trace has one type whether or not the computation keeps them. ForLCMBackend,Zin[Ω/m] andPin[m/F] are the matrices inside the cables, by conductor.Zg[Ω/m] andPg[m/F] are the matrices of the earth return, by cable.
LineCableModels.Engine.LineParametersProblem — Type
struct LineParametersProblem{T<:Real, S<:CableSystem, E<:(EarthModel{T<:Real})}Describe a line-parameters computation by its cable system, earth, temperature, and frequencies. The computation converts numerical inputs to T, which is at least Float64.
system::CableSystem: Cables of the line in one cross-section, with the conductor index of each terminal.earth::EarthModel: Air and the earth below the cables.temperature::Real: Temperature of every conductor and dielectric [°C].frequencies::Vector{T} where T<:Real: Frequencies of the scan in strict order from low to high [Hz].
LineCableModels.Engine.LineParametersProblem — Method
LineParametersProblem(
system::CableSystem,
earth::EarthModel;
temperature,
frequencies
)
Build a problem for the cables of system above or in earth. Promote numerical inputs with Float64 to select the computation type.
Arguments
system: cables and their connections in a cross-section, with the line length.earth: air and earth material properties.
Keywords
temperature: temperature of every conductor and dielectric [°C]. Default:20.frequencies: positive, finite frequencies in strict order from low to high [Hz].
Returns
Errors
- Throws
DomainErrorfor an empty frequency vector or a nonfinite temperature. - Throws
DomainErrorfor a nonpositive or nonfinite frequency or frequencies outside strict order from low to high. - Throws
ArgumentErrorwhen no terminal connects to a conductor indexk ≥ 1. - Throws
ArgumentErrorwhen a cable crosses the interface between air and earth. A cable can touch the interface.
LineCableModels.Engine.backend — Function
backend(F)Return the default backend of a formulation type. Pass a backend first to compute to choose another.
Arguments
F: formulation type.
Returns
- A backend singleton.
LineCableModels.Engine.nominal — Method
nominal(value::Real) -> AbstractFloat
Return a real number unchanged or a complex number with nominal real and imaginary parts. Kernel branches and integration breakpoints use nominal values to exclude uncertainty from their decisions. The Measurements extension gives a Measurement its nominal value.
Arguments
value: numeric quantity.
Returns
- The nominal value, in the unit of
value.
LineCableModels.Engine.@air — Macro
@air(selection, rest...)Select the formula of the air domain of an earth slot, in a line of @formulation. The tags of a chain merge into one record with a key per domain, in any order. A domain not given takes the default of the slot.
Arguments
selection: what the slot accepts,:id,:id => (key = value, ...)or a formula.rest: the tags after this one.
Returns
- A
NamedTuplewith the keyairand the keys of the tags after it.
LineCableModels.Engine.@earth — Macro
@earth(selection, rest...)Select the formula of the earth domain of an earth slot, in a chain of tags as @air describes.
Arguments
selection: what the slot accepts,:id,:id => (key = value, ...)or a formula.rest: the tags after this one.
Returns
- A
NamedTuplewith the keyearthand the keys of the tags after it.
LineCableModels.Engine.@formulation — Macro
@formulation Type begin
lines...
endBuild a formulation from the lines of a block. Each line is a keyword of the constructor of Type, or of CoaxialFormulation without a type. A selection per domain is a chain of the tags @air, @earth and @mixed.
Arguments
Type: formulation type.block: one line per keyword, a slot or an option of the formulation.
Returns
- The formulation that the constructor builds from the keywords.
Errors
- The constructor throws
ArgumentErrorfor a slot or option that the formulation lacks. - Julia refuses a line that is not an assignment when it lowers the call.
Examples
formulation = @formulation begin
earth_impedance = @air :gary1976 @earth :saad1996 @mixed :lucca1994
earth_admittance = :ideal
transposition = true
end
@assert formulation === CoaxialFormulation(;
earth_impedance = (air = :gary1976, earth = :saad1996, mixed = :lucca1994),
earth_admittance = :ideal, transposition = true)
# outputLineCableModels.Engine.@mixed — Macro
@mixed(selection, rest...)Select the formula of the mixed domain of an earth slot, in a chain of tags as @air describes.
Arguments
selection: what the slot accepts,:id,:id => (key = value, ...)or a formula.rest: the tags after this one.
Returns
- A
NamedTuplewith the keymixedand the keys of the tags after it.
LineCableModels.Commons.compute — Method
compute(
problem::LineParametersProblem,
formulation::LineCableModels.Commons.AbstractFormulation;
kw...
) -> LineParameters
Compute line parameters with the default backend from backend.
Arguments
problem: cable system, earth, temperature, and frequencies.formulation: formulas and formulation controls.
Keywords
kw...: computation options of the default backend.
Returns
- A
LineParametersrecord.
Errors
- Throws
ArgumentErrorfor an unknown computation option or an unavailable backend implementation.
LineCableModels.Commons.compute — Method
compute(
backend::LineCableModels.Commons.AbstractBackend,
problem::LineParametersProblem,
formulation::LineCableModels.Commons.AbstractFormulation;
kw...
) -> LineParameters{Float64, F, @NamedTuple{Z::Array{ComplexF64, 3}, P::Array{ComplexF64, 3}}} where F<:FEM
Build the computation options once and compute line parameters on the supplied backend.
Arguments
backend: backend singleton that executes the computation.problem: cable system, earth, temperature, and frequencies.formulation: formulas and formulation controls.
Keywords
kw...: computation options ofbackend.
Returns
- A
LineParametersrecord.
Errors
- Throws
ArgumentErrorfor an unknown computation option or an unsupported formulation.
LineCableModels.Commons.compute — Method
compute(
_::LineCableModels.Engine.LCMBackend,
problem::LineParametersProblem{T<:Real, S, E} where {S<:CableSystem, E<:(EarthModel{T<:Real})},
formulation::CoaxialFormulation,
options::LineCableModels.Commons.ComputationOptions{LineCableModels.Engine.LCMBackend}
) -> LineParameters
Validate the problem for the formulation and its formulas, build numerical input and buffers, and solve the coaxial line parameters at each frequency.
Arguments
LCMBackend: backend that executes the coaxial formulas.problem: cable system, earth, temperature, and frequencies.formulation: coaxial formulas and formulation controls.options: backend controls. The optiontraceretains intermediate matrices whentrue.
Returns
- A
LineParametersrecord with series impedances in [Ω/m], shunt admittances in [S/m], conductor labels, and the selected trace arrays.
Errors
- Throws
DimensionMismatchwhen a longitudinal-wavenumber vector has a different length than the frequencies. - Throws
DomainErrorwhen a cable touches the interface for the earth-return formula:martins2026.
LineCableModels.Commons.validate — Method
validate(
problem::LineParametersProblem,
_::LineCableModels.Commons.AbstractFormulation
) -> LineParametersProblem
Accept a problem for a formula without a condition on the problem.
Arguments
problem: line-parameters problem.AbstractFormulation: formulation or formula without a more specific validation method.
Returns
problem, unchanged.
LineCableModels.Commons.validate — Method
validate(
problem::LineParametersProblem,
options::LineCableModels.Commons.FormulationOptions{<:Union{CoaxialFormulation, FEM}}
) -> LineParametersProblem
Check that a vector longitudinal wavenumber has one entry per frequency.
Arguments
problem: line-parameters problem.options: options of a formulation, with a scalar or vectorΓ[1/m].
Returns
problem, unchanged.
Errors
- Throws
DimensionMismatchwhen aΓvector and the frequency vector have different lengths.
LineCableModels.Commons.validate — Method
validate(
problem::LineParametersProblem,
formulation::CoaxialFormulation
) -> LineParametersProblem
Check the options of the formulation against the frequencies.
Arguments
problem: line-parameters problem.formulation: coaxial formulation.
Returns
problem, unchanged.
Errors
- Throws
DimensionMismatchwhen aΓvector and the frequency vector have different lengths.
LineCableModels.Commons.validate — Method
validate(
input::LineCableModels.Engine.CoaxialInput,
formulation::CoaxialFormulation
) -> LineCableModels.Engine.CoaxialInput
Check that the formula of each earth place treats the pairs of layers of the input, before the loop. A pair of two conductors in the air takes the place air, a pair of two conductors below the air takes earth, and any other pair takes mixed.
Arguments
input: numerical cable geometry with the layer of each cable.formulation: coaxial formulation with its earth-return formulas.
Returns
input, unchanged.
Errors
- Throws
DomainErrorfor a place whose formula does not treat a pair of the input.
LineCableModels.Commons.validate — Method
validate(
earth::Tuple{LineCableModels.Engine.EarthReturn.Formula{ID}, LineCableModels.Engine.EarthReturn.Formula{ID}},
_::Type{CoaxialFormulation}
) -> Tuple{LineCableModels.Engine.EarthReturn.Formula{ID}, LineCableModels.Engine.EarthReturn.Formula{ID}} where ID
Check that earth slots with one identifier share one formula. Its impedance and potential coefficients depend on the same circumference currents.
Arguments
earth: pair of earth-return formulas with the same identifier.CoaxialFormulation: formulation type that consumes the slots.
Returns
earth, unchanged.
Errors
- Throws
ArgumentErrorwhen the two formulas differ.
CAD
LineCableModels.CAD — Module
LineCableModels.CADDescribe the planar curves that bound cable regions and draw their contours on a target. Walk a system or design through its regions, contours and paths to their curves. Targets define how to draw each curve in their own primitives.
LineCableModels.CAD.Arc — Type
struct Arc{T<:Real}Represent a circular curve from the x-axis of its placement over a signed angular span. A positive span runs counterclockwise and a negative span clockwise.
at::Placement: Center [m] and initial direction [rad].r::Real: Radius [m].span::Real: Signed angular span [rad].
LineCableModels.CAD.Arc — Method
Arc(
at::Placement,
r::Real,
span::Real
) -> LineCableModels.CAD.Arc
Construct an arc at at with radius r [m] and signed angular span [rad]. The placement translates in [m] and rotates in [rad]. The arguments promote to a shared floating type.
Errors
- Throws
DomainErrorwhenris not positive and finite, or whenspanis not finite or does not satisfy $0 < |\mathrm{span}| \leq 2\pi$.
LineCableModels.CAD.Arc — Method
Evaluate the arc at t [dimensionless] in [0, 1]:
\[\boldsymbol{p}(t) = \mathrm{at}\bigl(r\cos(t\,\mathrm{span}), r\sin(t\,\mathrm{span})\bigr),\]
where $r$ is its radius [m], $\mathrm{span}$ its signed angular span [rad], and $\mathrm{at}$ rotates by the initial direction [rad] and translates by the center coordinates [m]. Return coordinates in [m].
LineCableModels.CAD.Contour — Type
struct Contour{T<:Real}Represent the closed paths that bound a region of the plane. Each path runs counterclockwise about the region it bounds. Each hole follows the same orientation.
outer::Array{LineCableModels.CAD.Curve{T}, 1} where T<:Real: Outer path of curves with coordinates in [m] and angles in [rad].holes::Array{Array{LineCableModels.CAD.Curve{T}, 1}, 1} where T<:Real: Paths of holes with coordinates in [m] and angles in [rad].
LineCableModels.CAD.Contour — Method
Contour(annulus::Annulus) -> LineCableModels.CAD.Contour
Construct the counterclockwise quadrants of annulus: its outer radius bounds the outer path and its inner radius bounds one hole. Radii and center coordinates are in [m]. Both paths start at angle zero, independent of the placement's rotation [rad].
LineCableModels.CAD.Contour — Method
Contour(
shape::LineCableModels.DataModel.DifferenceShape
) -> LineCableModels.CAD.Contour
Construct the contour of shape, whose dimensions and positions are in [m] and angles in [rad]. Keep the contour of shape.outer and append Contour(hole).outer for each member of shape.holes to its holes. All paths run counterclockwise about the regions they bound.
LineCableModels.CAD.Contour — Method
Contour(circle::Circle{T}) -> LineCableModels.CAD.Contour
Construct the four counterclockwise quadrant arcs of circle, whose radius and center coordinates are in [m]. Arc $k = 0, \ldots, 3$ starts at the angle $k \pi / 2$ and spans $\pi / 2$ [rad], independent of the placement's rotation. The contour has no holes.
LineCableModels.CAD.Contour — Method
Contour(
sector::LineCableModels.DataModel.AnnularSector{T}
) -> LineCableModels.CAD.Contour
Construct the closed path of sector, whose radii and center coordinates are in [m] and whose angular span and placement rotation are in [rad]. A partial turn of span $\Delta\phi$ about the rotation $\phi$ follows the outer arc from $\phi - \Delta\phi / 2$ with span $\Delta\phi$, the radial edge, the inner arc from $\phi + \Delta\phi / 2$ with span $-\Delta\phi$ and the closing radial edge. With a zero inner radius, two segments join the outer arc to the center. A full turn gives the contour of a circle or annulus.
LineCableModels.CAD.Contour — Method
Contour(
outer::Array{Union{LineCableModels.CAD.Arc{T<:Real}, LineCableModels.CAD.Segment{T<:Real}}, 1},
holes::Array{Array{Union{LineCableModels.CAD.Arc{T<:Real}, LineCableModels.CAD.Segment{T<:Real}}, 1}, 1}
) -> LineCableModels.CAD.Contour
Construct a contour from its outer path and the paths of its holes, whose coordinates are in [m] and angles in [rad]. Each path is nonempty and closed. The tolerance is sqrt(eps(T)) times the largest absolute coordinate at a path's ends. That scale is at least one meter.
Errors
- Throws
DomainErrorif a path is empty or its ends do not meet.
LineCableModels.CAD.Segment — Type
struct Segment{T<:Real}Represent a straight curve between two points in the cross-section plane.
a::Tuple{T, T} where T<:Real: Coordinates att = 0in [m].b::Tuple{T, T} where T<:Real: Coordinates att = 1in [m].
LineCableModels.CAD.Segment — Method
Evaluate the segment at t [dimensionless] in [0, 1]:
\[\boldsymbol{p}(t) = \boldsymbol{a} + t(\boldsymbol{b} - \boldsymbol{a}),\]
where $\boldsymbol{a}$ and $\boldsymbol{b}$ are its endpoint coordinates [m]. Return coordinates in [m].
LineCableModels.CAD.Segment — Method
Segment(
a::Tuple{Real, Real},
b::Tuple{Real, Real}
) -> LineCableModels.CAD.Segment
Construct a segment from the points a and b [m], in the floating type that their coordinates promote to.
Errors
- Throws
DomainErrorwhen a coordinate is not finite or the points coincide.
LineCableModels.CAD.draw — Function
Draw on target in the target's own primitives. The walk reads each system's or design's already placed regions, then placed.shape, its contour, paths and curves. Coordinates are in [m] and angles in [rad].
A target defines methods for Segment and Arc, and can override any level above them. Each method returns what the target made.
A system or design returns a vector of results from its regions. A placed region returns the result for placed.shape. An AbstractShape returns the result for its contour. A contour returns a named tuple of outer and holes results. For a path, the result is a vector of results from its curves.
Gmsh extension
LineCableModelsGmshExt.LineCableModelsGmshExt — Module
LineCableModelsGmshExtCompute finite-element series impedances and shunt admittances with Gmsh and GetDP. Build and mesh the cross-section, solve every frequency, and reduce the terminal matrices.
LineCableModels.Commons.defaults — Method
defaults(
_::Type{LineCableModels.Engine.GmshBackend}
) -> @NamedTuple{mesh_size_factor::Float64, domain_size_factor::Float64, pml_reflection::Float64, workers::Int64, solver_threads::Int64, keep_run_directory::Bool, trace::Bool, gmsh_verbosity::Int64, getdp_verbosity::Int64, overrides::@NamedTuple{PmlSideThicknessFactor::Float64, PmlTopThicknessFactor::Float64, PmlBottomThicknessFactor::Float64, PmlSideLayers::Int64, PmlTopLayers::Int64, PmlBottomLayers::Int64, PmlSideGrading::Float64, PmlTopGrading::Float64, PmlBottomGrading::Float64, ExteriorMeshSizeFactor::Float64, InterfaceRefinementFactor::Float64, ConductorGeometryTolerance::Float64, ConductorSkinDepthElements::Float64, ConductorMeshGrowth::Float64, ConductorSkinDepths::Float64, ConductorThicknessElements::Int64, VolumeQuadrature::Int64, PhysicalVolumeQuadrature::Int64, PmlQuadrangles::Int64, PmlQuadrature::Int64, MumpsOrdering::Int64, PetscPrealloc::Int64, MumpsErrorAnalysis::Int64, MumpsRefinementMax::Int64, MumpsBackwardErrorTolerance::Float64, ThinLayerStrips::Int64}}
Return the declared computation options of the Gmsh backend. The backend runs getdpjll's GetDP. A build of your own is selected through getdpjll's getdp_path preference.
Arguments
GmshBackend: backend type.
Returns
mesh_size_factor: factor that scales every native resolution target [dimensionless]. Larger values coarsen the mesh.domain_size_factor: multiplier of the earth length scale for the domain's half-width [dimensionless].pml_reflection: nominal attenuation target of the PML in the open interval (0, 1) [dimensionless].workers: number of Gmsh and GetDP processes at once.solver_threads: number of BLAS and OpenMP threads of each GetDP process.keep_run_directory: whether to keep the run directory.trace: whether to keep the primitive matricesZ[Ω/m] andP[Ω·m] by terminal in the result.gmsh_verbosity: Gmsh's-vlevel, from 0 to 5.getdp_verbosity: GetDP's-vlevel, from 0 to 5.overrides: native expert controls by native name, each at its default inOVERRIDES.
LineCableModels.Commons.compute — Method
compute(
backend::LineCableModels.Engine.GmshBackend,
problem::LineParametersProblem,
formulation::FEM;
kw...
) -> LineParameters{Float64, F, @NamedTuple{Z::Array{ComplexF64, 3}, P::Array{ComplexF64, 3}}} where F<:FEM
Build and validate the computation options once, then pass them with the problem and formulation to the backend's computation method.
Arguments
backend: Gmsh backend singleton.problem: cable system, earth, temperature, and frequencies.formulation: finite-element formulation and its material laws.
Keywords
kw...: computation options declared bydefaults.
Errors
- Throws
ArgumentErrorfor an unknown or invalid computation option or an unsupported formulation.
LineCableModels.Commons.compute — Method
compute(
_::LineCableModels.Engine.GmshBackend,
problem::LineParametersProblem,
formulation::FEM,
options::LineCableModels.Commons.ComputationOptions{LineCableModels.Engine.GmshBackend}
) -> LineParameters{Float64, F, @NamedTuple{Z::Array{ComplexF64, 3}, P::Array{ComplexF64, 3}}} where F<:FEM
Validate the problem for the formulation and its formulas. Build and mesh its cross-section, solve the finite-element problem at every frequency, and apply the selected conductor reductions. For any number type of problem, the backend computes the nominal problem with each number replaced by the Float64 value of its nominal.
Arguments
GmshBackend: backend that runs Gmsh and GetDP.problem: cables, earth, temperature [°C], and frequencies [Hz].formulation: finite-element material laws and reduction controls.options: mesh, solver, trace, and run-directory controls.
Returns
- A
LineParameters{Float64}record without uncertainty, with series impedances [Ω/m], shunt admittances [S/m], terminal labels, and primitive matrices when traced.
Errors
- Throws for invalid problem data or unavailable native executables.
- Retains the run directory on failure. Native process errors identify the frequency and log, with its last twenty lines.
Index
LineCableModels.CADLineCableModels.CommonsLineCableModels.DataModelLineCableModels.EarthLineCableModels.EngineLineCableModels.Engine.EarthPropertiesLineCableModels.Engine.EarthReturnLineCableModels.Engine.InsulationAdmittanceLineCableModels.Engine.InsulationImpedanceLineCableModels.Engine.InternalImpedanceLineCableModels.Engine.ResistivityLineCableModels.Engine.SemiconAdmittanceLineCableModels.Engine.ShuntLineCableModels.LineCableModelsLineCableModels.MaterialsLineCableModelsGmshExt.LineCableModelsGmshExtMeasurementsExtLineCableModels.Engine.EarthProperties.FORMULASLineCableModels.Engine.EarthReturn.FORMULASLineCableModels.Engine.InsulationAdmittance.FORMULASLineCableModels.Engine.InsulationImpedance.FORMULASLineCableModels.Engine.InternalImpedance.FORMULASLineCableModels.Engine.Resistivity.FORMULASLineCableModels.Engine.SemiconAdmittance.FORMULASLineCableModels.Engine.Shunt.FORMULASLineCableModels.Engine.ε₀LineCableModels.Engine.μ₀LineCableModelsGmshExt.OVERRIDESLineCableModels.CAD.ArcLineCableModels.CAD.ArcLineCableModels.CAD.ArcLineCableModels.CAD.ContourLineCableModels.CAD.ContourLineCableModels.CAD.ContourLineCableModels.CAD.ContourLineCableModels.CAD.ContourLineCableModels.CAD.ContourLineCableModels.CAD.CurveLineCableModels.CAD.SegmentLineCableModels.CAD.SegmentLineCableModels.CAD.SegmentLineCableModels.Commons.AbstractBackendLineCableModels.Commons.AbstractFormulationLineCableModels.Commons.ComputationOptionsLineCableModels.Commons.ComputationOptionsLineCableModels.Commons.FormulationOptionsLineCableModels.Commons.FormulationOptionsLineCableModels.DataModel.AbstractCablePartLineCableModels.DataModel.AbstractLayoutPatternLineCableModels.DataModel.AbstractPrimitiveLineCableModels.DataModel.AbstractShapeLineCableModels.DataModel.AnnularSectorLineCableModels.DataModel.AnnularSectorLineCableModels.DataModel.AnnulusLineCableModels.DataModel.AnnulusLineCableModels.DataModel.AnnulusLineCableModels.DataModel.BlueprintConductorLineCableModels.DataModel.BlueprintDielectricLineCableModels.DataModel.CableBlueprintLineCableModels.DataModel.CableDesignLineCableModels.DataModel.CableSystemLineCableModels.DataModel.CircleLineCableModels.DataModel.CircleLineCableModels.DataModel.CircleLineCableModels.DataModel.CircularPatternLineCableModels.DataModel.CircularPatternLineCableModels.DataModel.DifferenceShapeLineCableModels.DataModel.EnclosureLineCableModels.DataModel.HelixLineCableModels.DataModel.HelixLineCableModels.DataModel.LayLineCableModels.DataModel.LayRatioLineCableModels.DataModel.LayRatioLineCableModels.DataModel.OffsetLineCableModels.DataModel.OffsetLineCableModels.DataModel.PlacedRegionLineCableModels.DataModel.PlacementLineCableModels.DataModel.PlacementLineCableModels.DataModel.PlacementLineCableModels.DataModel.RectangleLineCableModels.DataModel.RectangleLineCableModels.DataModel.RegionLineCableModels.DataModel.RepeatLineCableModels.DataModel.StackLineCableModels.DataModel.StackLineCableModels.DataModel.TerminalLineCableModels.Earth.EarthLayerLineCableModels.Earth.EarthLayerLineCableModels.Earth.EarthLayerLineCableModels.Earth.EarthModelLineCableModels.Earth.EarthModelLineCableModels.Engine.AbstractEarthPropertiesLineCableModels.Engine.AbstractEarthReturnLineCableModels.Engine.AbstractInsulationAdmittanceLineCableModels.Engine.AbstractInsulationImpedanceLineCableModels.Engine.AbstractInternalImpedanceLineCableModels.Engine.AbstractResistivityLineCableModels.Engine.AbstractSemiconAdmittanceLineCableModels.Engine.AbstractShuntLineCableModels.Engine.CoaxialFormulationLineCableModels.Engine.CoaxialFormulationLineCableModels.Engine.CoaxialInputLineCableModels.Engine.EarthProperties.FormulaLineCableModels.Engine.EarthProperties.FormulaLineCableModels.Engine.EarthReturn.FormulaLineCableModels.Engine.EarthReturn.FormulaLineCableModels.Engine.FEMLineCableModels.Engine.FEMLineCableModels.Engine.GmshBackendLineCableModels.Engine.InsulationAdmittance.FormulaLineCableModels.Engine.InsulationAdmittance.FormulaLineCableModels.Engine.InsulationImpedance.FormulaLineCableModels.Engine.InsulationImpedance.FormulaLineCableModels.Engine.InternalImpedance.FormulaLineCableModels.Engine.InternalImpedance.FormulaLineCableModels.Engine.LCMBackendLineCableModels.Engine.LineParametersLineCableModels.Engine.LineParametersProblemLineCableModels.Engine.LineParametersProblemLineCableModels.Engine.Resistivity.FormulaLineCableModels.Engine.Resistivity.FormulaLineCableModels.Engine.SemiconAdmittance.FormulaLineCableModels.Engine.SemiconAdmittance.FormulaLineCableModels.Engine.Shunt.FormulaLineCableModels.Engine.Shunt.FormulaLineCableModels.Engine.SpectralIntegralLineCableModels.Materials.MaterialLineCableModels.Materials.MaterialLineCableModels.Materials.MaterialBase.:*LineCableModels.CAD.drawLineCableModels.Commons.buildLineCableModels.Commons.buildLineCableModels.Commons.buildLineCableModels.Commons.computeLineCableModels.Commons.computeLineCableModels.Commons.computeLineCableModels.Commons.computeLineCableModels.Commons.computeLineCableModels.Commons.computeLineCableModels.Commons.defaultsLineCableModels.Commons.defaultsLineCableModels.Commons.defaultsLineCableModels.Commons.defaultsLineCableModels.Commons.resolveLineCableModels.Commons.selectLineCableModels.Commons.selectLineCableModels.Commons.selectLineCableModels.Commons.validateLineCableModels.Commons.validateLineCableModels.Commons.validateLineCableModels.Commons.validateLineCableModels.Commons.validateLineCableModels.Commons.validateLineCableModels.Commons.validateLineCableModels.Commons.validateLineCableModels.Commons.validateLineCableModels.Commons.validateLineCableModels.Commons.validateLineCableModels.Commons.validateLineCableModels.Commons.validateLineCableModels.Commons.validateLineCableModels.Commons.validateLineCableModels.Commons.validateLineCableModels.Commons.validateLineCableModels.Commons.validateLineCableModels.Commons.validateLineCableModels.DataModel.areaLineCableModels.DataModel.armorLineCableModels.DataModel.beddingLineCableModels.DataModel.boundaryLineCableModels.DataModel.centroidLineCableModels.DataModel.coreLineCableModels.DataModel.distanceLineCableModels.DataModel.flattenLineCableModels.DataModel.insulationLineCableModels.DataModel.jacketLineCableModels.DataModel.overlengthLineCableModels.DataModel.pitchLineCableModels.DataModel.placementsLineCableModels.DataModel.r_exLineCableModels.DataModel.r_inLineCableModels.DataModel.screenLineCableModels.DataModel.sheathLineCableModels.DataModel.strandedLineCableModels.DataModel.supportLineCableModels.Earth.homogeneousLineCableModels.Engine.admittivityLineCableModels.Engine.admittivityLineCableModels.Engine.backendLineCableModels.Engine.bundle!LineCableModels.Engine.eliminate!LineCableModels.Engine.from_bufferLineCableModels.Engine.impedance!LineCableModels.Engine.impedance!LineCableModels.Engine.impedance!LineCableModels.Engine.initialize_buffersLineCableModels.Engine.initialize_buffersLineCableModels.Engine.initialize_buffersLineCableModels.Engine.initialize_buffersLineCableModels.Engine.integrateLineCableModels.Engine.nominalLineCableModels.Engine.potential!LineCableModels.Engine.potential!LineCableModels.Engine.potential!LineCableModels.Engine.reductionsLineCableModels.Engine.solve!LineCableModels.Engine.to_buffer!LineCableModels.Engine.to_buffer!LineCableModels.Engine.to_buffer!LineCableModels.Engine.transposition!LineCableModels.Engine.ΛLineCableModels.Materials.materialLineCableModels.DataModel.@cableLineCableModels.DataModel.@terminalLineCableModels.Engine.@airLineCableModels.Engine.@earthLineCableModels.Engine.@formulationLineCableModels.Engine.@mixed