Skip to content

Commit d6f8fe5

Browse files
chore(src): add consts definitions
1 parent d69bbfb commit d6f8fe5

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

src/consts.jl

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Export public API
2+
export FormulationSet, DataFrame, add!, load!, save, preview
3+
export f₀, μ₀, ε₀, ρ₀, T₀, TOL, ΔTmax
4+
export setup_logging!
5+
export BASE_FLOAT, REALSCALAR, COMPLEXSCALAR
6+
7+
# General constants
8+
"Base power system frequency, f₀ = 50.0 [Hz]."
9+
const f₀ = 50.0
10+
"Magnetic constant (vacuum permeability), μ₀ = 4π * 1e-7 [H/m]."
11+
const μ₀ = 4π * 1e-7
12+
"Electric constant (vacuum permittivity), ε₀ = 8.8541878128e-12 [F/m]."
13+
const ε₀ = 8.8541878128e-12
14+
"Annealed copper reference resistivity, ρ₀ = 1.724e-08 [Ω·m]."
15+
const ρ₀ = 1.724e-08
16+
"Base temperature for conductor properties, T₀ = 20.0 [°C]."
17+
const T₀ = 20.0
18+
"Maximum tolerance for temperature variations, ΔTmax = 150 [°C]."
19+
const ΔTmax = 150.0
20+
"Default tolerance for floating-point comparisons, TOL = 1e-6."
21+
const TOL = 1e-6
22+
23+
using Reexport, ForceImport
24+
25+
# Define aliases for the type constraints
26+
using Measurements: Measurement
27+
const BASE_FLOAT = Float64
28+
const REALSCALAR = Union{BASE_FLOAT,Measurement{BASE_FLOAT}}
29+
const COMPLEXSCALAR = Union{Complex{BASE_FLOAT},Complex{Measurement{BASE_FLOAT}}}
30+
31+
"""
32+
FormulationSet(...)
33+
34+
Constructs a specific formulation object based on the provided keyword arguments.
35+
The system will infer the correct formulation type.
36+
"""
37+
FormulationSet(engine::Symbol; kwargs...) = FormulationSet(Val(engine); kwargs...)
38+
39+
function get_description end
40+
41+
function add! end
42+
43+
function load! end
44+
45+
function save end
46+
47+
function preview end
48+

0 commit comments

Comments
 (0)