kicad2ems.pcbqs.thermal.grid¶
The board's temperature on a regular grid (finite volumes): square cells of
`pitch` mm over the outline's bounding box, one unknown per cell on the board
per copper layer.
The copper of each layer is drawn onto a raster finer than the cells (1/16 mm
unless asked otherwise). The conductance between two neighbouring cells comes
from that raster: between their centres, each fine row is a chain in series, the
rows in parallel. A slot narrower than a cell still blocks, a trace narrower
than a cell still carries, and nothing has to follow the outline of the copper,
so the cost does not depend on how intricate the copper is.
r = solve(problem, pitch=0.5) # problem.Result: r.T (layers, ny, nx) C,
# r.parts, r.hottest
- class kicad2ems.pcbqs.thermal.grid.Grid[source]¶
A problem's system on the grid, built once (build): its steady temperature for any heats on one factorisation (steady), and its transient (transient). x, the rise over the ambient: the board's L x ny x nx cells on the board (n of them, each layer's in turn) and then the parts' own nodes (Problem.extend).
- heat(levels=None)[source]¶
The heat into each unknown (W): each part's loss and each spot set's times its level ({name: share}; 1 when not given), and the held footprints' ties.
- parts_at(x, levels=None)[source]¶
part_temperatures' dict for the rise x, each part's drop through its theta at its level ({name: share}).
- place(spots)[source]¶
The spots' heat ([problem.Spot]) put into the cell each point lies in (the nearest on the board, for one off it), in place of any before (electrothermal.py: each pass's copper loss, on the one factorisation).
- steady(levels=None)[source]¶
x for the heats at their levels (and their self-heating); ValueError where the self-heating outruns the films (thermal runaway: no steady temperature).
- transient(seconds, profiles=None, start='cold', log=<built-in function print>, steady=None, currents=(), method='auto')[source]¶
The temperature over `seconds` (transient.run), each heat by its profile ({name: Profile}: a part's, a spot set's, or 'all': every part with none of its own), from the ambient (start 'cold') or from the steady temperature of the profiles' values before t = 0 ('steady'). Returns dict(times_s, parts={part: [C]}, hottest_C, to_63_s (the heating from cold of constant heats: when each part is 63 % of the way to its steady temperature), peak={part: dict(C, at_s, final_C)}, tau_s (the board's longest time constants), steps, factors, seconds, start, profiles, copper_W (the spots' heat with their self-heating, when there are spots)). currents: the parts whose profile is a current's (their loss by its square: a series resistor's), as a spot set's is. method: 'direct' (the grid itself, a factor per step length), 'reduced' (transient.reduce's model of it, two more factors), or 'auto': reduced above transient.DIRECT_MAX unknowns.
- kicad2ems.pcbqs.thermal.grid.build(problem, pitch=0.5, sub=None, detail=0.0625)[source]¶
The problem's Grid (pitch: the cells, mm; sub: fine raster cells across one, default enough for `detail` mm, the narrowest gap or trace the conductances still see; fewer on a board too large for that).
- kicad2ems.pcbqs.thermal.grid.cover(geom, x0, y0, pitch, sub, nx, ny)[source]¶
(rows, columns, fractions of geom's area) of the cells geom lies on.
- kicad2ems.pcbqs.thermal.grid.edge_lengths(problem, x0, y0, pitch, live, piece)[source]¶
m of the board's edges in each cell (ny, nx): the outline cut into pieces of at most `piece` mm, each given to the cell its middle is in (moved a hair into the board, so a piece on a cell's side goes to the cell of the board), or, if that cell has no board, to the nearest one that does.
- kicad2ems.pcbqs.thermal.grid.raster(geom, x0, y0, h, nx, ny)[source]¶
The fraction of each h x h cell (ny, nx) from (x0, y0) covered by geom (shapely, mm), by signed areas: each cell is cut into OVER bands, and each part of an outline within a band adds the area to its right (the cell it crosses gets the part of its width beyond the crossing). The total is the geometry's area exactly, so thin traces and narrow gaps keep their widths wherever they fall on the raster.
- kicad2ems.pcbqs.thermal.grid.solve(problem, pitch=0.5, sub=None, detail=0.0625, log=<built-in function print>, transient=None, profiles=None, start='cold')[source]¶
pitch: the cells, mm. sub: fine raster cells across one cell (default: enough for `detail` mm, the narrowest gap or trace the conductances still see; fewer on a board too large for that). transient: seconds, also the temperature over that long (Grid.transient: from cold, or with start='steady' from the steady temperature before t = 0; each heat by its profile, {name: transient.Profile}; the board's own heat capacity, the parts' bodies' left out).