Commit Graph

269 Commits

Author SHA1 Message Date
31fd83eb34 apps: multi_core_inverter: setup for 4ns clock phases
double what they were before. gives more time for things to settle.
2022-08-12 14:42:17 -07:00
658b8616d7 Torus: correct the cross_section_normal method -- again
i should add integration tests
2022-08-12 02:23:53 -07:00
084c5bc342 Region: remove Clone from the trait, and also parameterize everything
i didn't necessarily *want* to parameterize it all,
but it turned out to be easier to do that than to force all users to
workaround the lack of Clone.
2022-08-12 01:42:19 -07:00
d5fbb4e9b2 Region: remove the Serialization requirement 2022-08-12 00:57:01 -07:00
090b1ca09a BUGFIX: Torus: don't normalize the cross section normal
this would have led to incorrectly scaled current measurements
(but not incorrect current generation). we were likely severely
over-estimating the current.
2022-08-12 00:41:25 -07:00
ae1eb861be instrument the stimulus evaluation in our sim
... stimulus evaluation accounts for like 80% of the execution time 🤦
2022-08-11 22:57:43 -07:00
09bc7492ed expose diagnostics into the Sim, and capture stimuli evaluation
this isn't publicly exposed yet.
2022-08-11 22:43:07 -07:00
e7cc78a947 diagnostics: split into their own file 2022-08-11 22:31:05 -07:00
d379a7b0ee app: multi_core_inverter: try a related experiment where S0 is initialized to logic low 2022-08-11 22:24:19 -07:00
aa8f474f52 driver: Diagnostics: clean up the impl a bit 2022-08-11 19:04:12 -07:00
4a33912164 driver: abstract the render time measurements behind a Diagnostics api 2022-08-11 18:58:22 -07:00
f7b72a72be driver: abstract the step diagnostics measurements 2022-08-11 18:41:41 -07:00
a413a4d391 driver: move last_diag_time out of the Diagnostics object 2022-08-11 18:38:36 -07:00
0c9f04981a driver: relegate more diagnostics formatting to the Diagnostics impl 2022-08-11 18:36:35 -07:00
6f1e1557b3 driver: diagnostics: track the actual number of frames stepped
this allows fps-related diagnostics to be meaningful after
serialization / restarts.
2022-08-11 18:29:58 -07:00
e85d38d415 driver: split the Diagnostics out into their own object
more diagnostic refactoring to come
2022-08-11 18:27:30 -07:00
831cbfa76c app: multi_core_inverter: tune the state serializations
less frequent (for less disk space), and also save state
in a recoverable manner
2022-08-11 18:22:55 -07:00
1928ad71cd serializer renderer: gracefully handle the case where we run out of disk space
we might still run out of space when writing CSVs and other outputs...
but that's at least less likely,
as long as we serialize the rendering.
2022-08-11 18:21:46 -07:00
c83a44299f app: multi-core-inverter: fix S4 drive signal specification
there was a spuriuous high -> low transition
2022-08-11 15:24:26 -07:00
e23ab9efd7 app: multi_core_inverter: try a 5-stage inverter (each stage inverts)
we're diverging from the blog pretty far now.
but it turns out that, because of the inversion in Maxwell's
$\nabla x E = -dB/dT$ equation, the trivial wiring actually leads to
natural inverters.
2022-08-11 03:01:08 -07:00
652621e47a app: multi_core_inverter: more precise clock management
try to control the edges when the clock is release to prevent ringing.
2022-08-10 16:39:56 -07:00
59a4419130 app: multi_core_inverter: more detailed drive cycle 2022-08-10 15:47:28 -07:00
2f91418095 post: add doc-comments for these tools 2022-08-10 14:28:20 -07:00
46a53a4dde app: multi_core_inverter: fix up the drive sequence
see the code comment for explanation.
2022-08-10 01:43:36 -07:00
3998d72d02 app: multi_core_inverter: drive all four cores for four clock cycles 2022-08-10 01:35:42 -07:00
4fe8be8951 when writing Measurements to a CSV, format them in a machine-readable manner
i haven't tested the ones which contains commas -- hopefully the CSV
encoder deals with these :-)
2022-08-10 01:34:37 -07:00
8a3a64face meas: correctly render SI prefixes for negative numbers
the previous implementation treated negative numbers as effectively
having unknown magnitude, rendering them without any adjustment.
2022-08-10 01:17:49 -07:00
e08c6dbaa3 stim: backfill tests for CurlStimulus 2022-08-09 22:54:21 -07:00
520e9d9f68 CurlStimulus: re-use the HasCrossSection trait code
i believe this inverts the sign, but it also looks more correct this way
so i'm not immediately correcting that in this patch.
will backfill tests to verify.
2022-08-09 22:14:38 -07:00
1771973c6d CurlStimulus: take axis and center directly from the Region
by taking more from the region, we'll be able to reuse common code
and also make this more testable
2022-08-09 22:10:16 -07:00
7d1ee0ad50 meas: backfill tests for CurrentLoop 2022-08-05 17:35:55 -07:00
06379ffd30 CurrentLoop: use a better justified measurement algorithm
'course the best way to justify it is with tests: hopefully those will
come shortly.
2022-08-01 06:12:16 -07:00
527814e38a convert HasTangent -> HasCrossSection
i believe the current loop algorithm (which i'm just preserving here) is
actually not correct. i'll work through it more.
2022-08-01 05:17:35 -07:00
cc876d72d6 CurrentLoop: factor out the tangent calculation 2022-08-01 00:50:02 -07:00
723fed4786 rename meas::{eval_multiple_kv -> eval_multiple} 2022-07-31 23:27:37 -07:00
0e0945f744 measurement: remove the eval method 2022-07-31 23:26:53 -07:00
5362dacf3a Measurement: don't use SI prefix if there's no unit 2022-07-30 21:21:46 -07:00
b5c58c03ce meas: add a missing unit to the Energy measurement 2022-07-30 21:21:02 -07:00
530ab890e6 meas: render the SI prefix 2022-07-30 21:15:51 -07:00
542d700f69 meas: finish porting to a concrete type.
this will in future let me more easily test each individual measurement
type
2022-07-30 20:56:19 -07:00
60840aec36 WIP: make the measurement type concrete 2022-07-30 20:33:03 -07:00
4361167f99 stim: strongly-type the return type of AbstractSim::at with a Fields struct
this will help me not mix up the E and H fields.
2022-07-30 17:17:17 -07:00
6a511943f7 note a few suspect areas of code 2022-07-30 17:02:10 -07:00
a14625b493 meas: add SI units for some things
this is an uncommon code path, apparently: only visible when rendering
BEFORE serialization. may want to implement a richer meas format.
2022-07-29 23:54:02 -07:00
6f0e35ea35 multi_core_inverter: add some stimuli and measurements 2022-07-29 23:53:44 -07:00
7f3c2a9395 render: transform inaccurate float-based indexing into integer indexing 2022-07-29 21:53:49 -07:00
349e01ba16 fix Vec3::with_mag to return an Option
and thereby simplify it into just one method.
2022-07-29 21:45:25 -07:00
ba6ef3c5c2 viewer: add a render mode to display just the Material 2022-07-29 16:28:58 -07:00
c5e2713b51 remove unused enum_dispatch 2022-07-29 16:07:07 -07:00
9c1fc65068 convert AbstractSim::sample to include a reference to the material -- not just its conductivity 2022-07-29 16:02:16 -07:00