Documentation
¶
Overview ¶
Package fuse models the fuse on each phase of a site's main supply as a thermal system: the current heats the fuse element (I², so export heats it as much as import), the heat flows through the fuse body and sand to the holder and the cabinet, and the element melts when it reaches its melting temperature. A fuse that has carried its rating for an hour is hot and blows at an overload sooner than a cold one; short overloads add up; a fuse cools along the sum of its bodies' exponentials.
Each phase has three thermal bodies in a ladder:
heat I² → element → fuse body and sand → holder and cabinet → ambient
In per-unit terms the heat into the element is u² (u = I/In) and the three thermal resistances add up to 1, so at a steady current the element sits u² above ambient. It melts at UMin², UMin being the steady current (as a multiple of In) that just melts it at the reference ambient.
The gG bands keep IEC 60269-1's conventional currents, gates and pre-arcing I²t window at 0.01 s, and within them follow a manufacturer's published curves (see gg). aM keeps its gates. The other profiles are gG with scaled times and are not calibrated. The model is a central estimate of one maker's fuse-links, not a worst case, and it is independent of any EMS's own fuse protection: it is the judge.
It has no dependencies, so an EMS's own fast simulation can import it.
Index ¶
- Constants
- func Ambient(c float64) *float64
- type Band
- type Gate
- type Phase
- type Point
- type Profile
- func (p Profile) Band(ratingA float64) (Band, bool)
- func (p Profile) MeltSeconds(multiple, ratingA, ambientC float64) float64
- func (p Profile) Preheat(ph *Phase, amps, ratingA float64) error
- func (p Profile) Ratings() []float64
- func (p Profile) Step(ph *Phase, amps, ratingA, dt float64) Status
- func (p Profile) Supports(ratingA float64) bool
- func (p Profile) TripSeconds(multiple float64) float64
- type Status
- type Thermal
Constants ¶
const ( Manual = "manual" // never blows by itself IecGg = "iec_gg" IecGm = "iec_gm" IecAm = "iec_am" IecGr = "iec_gr" IecGs = "iec_gs" )
Profile ids.
const ( // MeltC is the element's melting temperature: tin, 231.93 °C, the // solder spot (M-effect) at which a gG element melts under overload. MeltC = 232.0 // RefAmbientC is the ambient the calibration holds at: IEC 60269 gives // time-current characteristics at a reference ambient of 20 °C, // approximately valid at 30 °C (Enel GSCL004 rev. 0, 2016, §6.1). RefAmbientC = 20.0 // DefaultAmbientC is a meter cabinet's air when a phase gives none. DefaultAmbientC = 25.0 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Band ¶
type Band struct {
RatingA float64
Thermal Thermal
// Gates are the standard's bounds; I2tMin and I2tMax bound the
// pre-arcing I²t at 0.01 s (A²s). Reference is the manufacturer's curve
// the band is fitted to.
Gates []Gate
I2tMin, I2tMax float64
Reference []Point
// contains filtered or unexported fields
}
Band is a fuse type at one rating: its thermal bodies and the points it is checked against.
func (*Band) MeltSeconds ¶
MeltSeconds is the band's time to melt from cold.
type Gate ¶
Gate bounds the melting time from cold at a multiple of the rating: with Min the fuse must not melt sooner than Seconds, otherwise it must melt within Seconds.
type Phase ¶
type Phase struct {
// Theta is each body's rise over ambient, in per-unit (element, body,
// holder); zero is cold.
Theta [3]float64
// AmbientC is the cabinet's air; nil means DefaultAmbientC. 0 is 0 °C.
AmbientC *float64
// Damage is the element's way from ambient to melting, 0 to 1; Step
// sets it.
Damage float64
Blown bool
}
Phase is the state of one phase's fuse.
type Point ¶
Point is one point of a time-current curve from cold: at Multiple × the rating the fuse melts after Seconds.
type Profile ¶
type Profile struct {
ID string
Label string
Source string // where its numbers come from
Bands []Band
// Curve is the reference band's cold curve, sampled, for display.
Curve []Point
// RefRatingA is the band TripSeconds and Curve use.
RefRatingA float64
}
Profile is a fuse type over its rating bands.
func (Profile) Band ¶
Band returns the band a fuse rated ratingA uses, and false when the profile has none for it.
func (Profile) MeltSeconds ¶
MeltSeconds is the time to melt from cold at multiple × a rating of ratingA in ambientC; +Inf if it never melts or the rating has no band.
func (Profile) Preheat ¶
Preheat puts the phase in the steady state of a current held for ever in its ambient, as a fuse that has carried the evening's load: a scenario that starts mid-evening starts warm, not cold. It refuses a blown fuse (clear Blown and Theta to replace one), a current that would melt the fuse before reaching that state, and anything Step refuses, leaving the phase as it was.
func (Profile) Ratings ¶
Ratings are the ratings a gG-based profile is calibrated for; between them a rating takes the nearest band on log axes.
func (Profile) Step ¶
Step advances one phase by dt seconds at amps through a fuse rated ratingA. The sign of amps does not matter, and an infinite current blows the fuse at once. The step is exact for a current held over dt, so the result does not depend on the step size; dt = 0 changes nothing and asks how long the fuse has left at that current.
Step refuses, leaving the phase as it was and saying why in Status.Invalid: a NaN current, a negative, NaN or infinite dt, an ambient that is not finite or not below the melting point, and a rating the profile does not model (the profile without a model, manual, refuses nothing and never blows).
func (Profile) TripSeconds ¶
TripSeconds is the time to melt from cold at multiple × the rating, at the reference band and ambient; +Inf if it never melts there.
type Status ¶
type Status struct {
Ratio float64 `json:"ratio"` // current over the rating
TripSeconds float64 `json:"trip_s"` // time to melt at this ratio from cold; 0 if never
RemainingSeconds float64 `json:"remaining_s"` // time to melt at this ratio from now; 0 if never
Damage float64 `json:"damage"` // the element's way from ambient to melting
Active bool `json:"active"` // it will melt if the current stays
Invalid string `json:"invalid,omitempty"` // why the step was refused; the state is unchanged
}
Status describes a phase after a step.
type Thermal ¶
type Thermal struct {
UMin float64 // steady melting multiple at the reference ambient
Re, TauE float64 // element
Rb, TauB float64 // fuse body and sand
Rh, TauH float64 // holder and cabinet
TimeFactor float64 // scales every time constant; 0 or 1 as calibrated
}
Thermal is a band's three bodies. Re, Rb and Rh are the shares of the steady temperature rise across element-to-body, body-to-holder and holder-to-ambient (they add up to 1). Each Tau is that body's heat capacity times its own outgoing resistance; they are parameters, not the system's modes, which come out of the coupled ladder (at 25 A 0.12 s, 9.4 s and 1,308 s).