kicad2ems.core.join¶
One band from two solvers: a quasi-static solver below the frequency it says it
is valid to, a full-wave one above.
pcbqs solves the copper's currents and charge without radiation: right from DC,
where a full-wave solver's equations lose the inductive part to rounding, and
good to about the frequency where the ports' copper is a tenth of a wavelength
long (its `valid_to_Hz`). mom25d (or another full-wave solver) is right from
there up. When a run has both, `join` makes one answer: the quasi-static
solver's S below the crossover, the full-wave one's above, and across a short
band around the crossover (a fifth of a decade each side by default) a
raised-cosine blend in log f, so the joined curve has no step. How far the two
disagree in that band is said with it: where they agree the join is seamless;
where they do not, one of them is wrong there, and the report says by how much.
S, info = join(freq, S_low, S_high, crossover)
pick(results, solvers) # (low, high, crossover) of a run's results, or None
best_crossover(freq, S_low, S_high, crossover)
# (where they agree best at or below it, the mismatch there)
- kicad2ems.core.join.best_crossover(freq, S_low, S_high, upper, decades=0.2, lowest=None)[source]¶
(crossover, its mismatch): the frequency at or below `upper` (the quasi-static solver's own estimate of where it stops holding) whose blend band the two answers differ least in, by the largest |S_low - S_high| over that band. The estimate is a rule of thumb (a tenth of a wavelength of the ports' copper) and the full-wave solver has a low end of its own, so the best place to hand over is where they agree, not where one of them says. Tried: the band's frequencies from `lowest` (default: the first whose blend band is inside the band) up to `upper`; a later one must be better by a tenth to be taken over the estimate's, so that `upper` stands where they agree as well everywhere. (upper, None) where no frequency's blend band holds a point.
- kicad2ems.core.join.join(freq, S_low, S_high, crossover, decades=0.2)[source]¶
(S, info): the two answers joined at the crossover (Hz). info: crossover_Hz, blend_Hz (the band where both count), low_points and high_points (frequencies from each alone), mismatch (the largest |S_low - S_high| over the blend band, or at the frequency nearest the crossover when no frequency is in it; None when the band is entirely one side).