Help us shape the future of Go! Take the 2026 Go Developer Survey

ganthermal

package module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2026 License: MIT Imports: 1 Imported by: 0

README

ganthermal

Model why gallium nitride chargers are smaller than the silicon bricks they replaced — and where the shrinking actually stops.

Install

go get github.com/taysirco/ganthermal

Usage

import "github.com/taysirco/ganthermal"

ganthermal.WasteHeatWatts(65, ganthermal.Silicon)   // ~9.7W dumped as heat
ganthermal.WasteHeatWatts(65, ganthermal.GaN)       // ~4.1W

ganthermal.RelativeVolume(65, ganthermal.GaN)       // ~0.28 of a silicon design

// The real ceiling: can the case actually shed the heat?
ganthermal.ThermalHeadroomOK(100, 20,  ganthermal.GaN)  // false — too small
ganthermal.ThermalHeadroomOK(65,  120, ganthermal.GaN)  // true

It is frequency, not just efficiency

The common explanation is that GaN is more efficient. That is true but secondary. The dominant effect is switching frequency: GaN transistors switch around 500 kHz against roughly 65 kHz for silicon. Energy stored per switching cycle falls with frequency, so the transformer and inductors shrink roughly in proportion.

Efficiency then compounds it. A 65 W silicon design dumps close to 10 W as heat; GaN dumps about 4 W. Less heat means a smaller heatsink and thinner case walls.

Where miniaturisation stops

Past a point the case simply cannot shed the heat. Still-air convection carries roughly 0.05 W per square centimetre, so a charger's surface area sets a hard thermal ceiling regardless of how good the semiconductor is. This is why 100 W units are not 20 W-sized, and why very compact high-wattage chargers throttle under sustained load.

License

MIT

Documentation

Overview

Package ganthermal models why gallium-nitride chargers are smaller than the silicon bricks they replaced, and where the size limit actually sits.

The popular explanation — "GaN is more efficient" — is only half the story. The real mechanism is switching frequency: GaN transistors switch far faster than silicon, which shrinks the magnetics, and they waste less energy as heat, which shrinks the heatsink. Both effects compound.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RelativeVolume

func RelativeVolume(outputWatts float64, s Semiconductor) float64

RelativeVolume estimates overall charger volume relative to a silicon design of the same wattage, combining smaller magnetics and a smaller heatsink.

Heatsink area scales with waste heat, magnetics with 1/frequency; the result is why a 65W GaN unit fits the shell of an old 20W silicon brick.

func ThermalHeadroomOK

func ThermalHeadroomOK(outputWatts, surfaceAreaCm2 float64, s Semiconductor) bool

ThermalHeadroomOK reports whether a charger of the given output can shed its waste heat through the given surface area, using a conservative convective limit of 0.05 W per square centimetre in still air.

This is the real ceiling on miniaturisation: past a point the case simply cannot dump the heat, no matter how efficient the silicon.

func TransformerVolumeIndex

func TransformerVolumeIndex(outputWatts float64, s Semiconductor) float64

TransformerVolumeIndex is a relative measure of magnetics size. Energy stored per switching cycle falls with frequency, so the transformer shrinks roughly in proportion to 1/frequency.

func WasteHeatWatts

func WasteHeatWatts(outputWatts float64, s Semiconductor) float64

WasteHeatWatts is the power dissipated as heat at a given output.

Types

type Semiconductor

type Semiconductor int

Semiconductor is the switching technology used in a charger's converter.

const (
	// Silicon is the legacy MOSFET technology.
	Silicon Semiconductor = iota
	// GaN is gallium nitride.
	GaN
)

func (Semiconductor) Efficiency

func (s Semiconductor) Efficiency() float64

Efficiency is a representative conversion efficiency at rated load.

func (Semiconductor) String

func (s Semiconductor) String() string

func (Semiconductor) SwitchingKHz

func (s Semiconductor) SwitchingKHz() float64

SwitchingKHz is a representative switching frequency for the technology. Higher frequency means less energy stored per cycle, so smaller magnetics.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL