4ac48bd3f1
Minor cleanup to Render size
2020-10-03 22:13:59 -07:00
0642f52172
Fix some issues related to the Courant number
...
step_h was using the wrong timestep; fixing it caused update issues
based on the Courant number being 1.0, i.e. too large. Reducing it to
\sqrt{3}/3 fixes stability issues. Unfortunately, a non-Unity Courant
value prevents me from using the ideal Absorbing Boundary Condition I
had just implemented, so that's been disabled.
2020-10-03 19:44:30 -07:00
c33317c805
Factor out a Neighbors
to package up all 6 neighbors when updating cells
...
This will allow more flexibility in boundary conditions.
It seems to have similar perf as passing only the 3 cells within about 2%.
2020-10-03 15:26:36 -07:00
5c8c2f6c76
Fix division by zero in UPML boundary
2020-10-03 13:58:44 -07:00
b84b8f6757
Finish the basic Stimulus implementation
2020-09-26 17:12:31 -07:00
55d6171325
Add units to the different Vec3 "types" (Meters and Index, so far)
2020-09-26 17:05:15 -07:00
00f22c95d0
WIP Stimulus system
2020-09-26 15:50:34 -07:00
9a0f778db5
UPML boundary now applies to z dimension
2020-09-26 15:13:30 -07:00
d39db969b5
Consolidate Vec/Coord into the geom submodule
...
Also add the missing coord.rs to version control...
It should have been checked in earlier
2020-09-26 14:09:41 -07:00
452141dd0d
Change meas.rs to use meter coordinates instead of pixel coordinates
2020-09-26 14:01:10 -07:00
729f9f77a6
Make the Region
trait 3d-ready
2020-09-26 13:39:34 -07:00
1d7c5cc7b9
Rename Line -> Line2d, Polygon -> Polygon2d
...
They required clarification now that the sim is 3d
2020-09-26 13:30:15 -07:00
bef423ce38
Rename Point -> Vec2 to distinguish it clearly from any 3d object
2020-09-26 13:25:49 -07:00
fccdbc802b
Move Point from geom.rs -> vec.rs in preparation for renaming it to Vec2
2020-09-26 13:22:37 -07:00
caa276295d
Move vec3.rs -> vec.rs in preparation for adding a 2d vec
2020-09-26 13:19:25 -07:00
8d074d390d
Simulation is full-3d
2020-09-26 11:03:56 -07:00
fa0e30a2a6
Make Coord
3d
2020-09-25 21:04:16 -07:00
9f105e5558
Re-enable previously-broken measurements
2020-09-25 20:32:22 -07:00
2627852a39
Eradicate SimSnapshot
...
We do everything it achieved via the GenericSim trait, now.
2020-09-25 20:18:43 -07:00
cae84222c0
Rendering now mostly uses the GenericSim
2020-09-25 20:15:39 -07:00
a931252e9c
Convert render system to sample the simulation at a fixed resolution; no more decimation
2020-09-25 19:40:49 -07:00
341acf367d
Explain how the cell is generalized to 3d
2020-09-25 19:29:10 -07:00
3d9a78efab
Change from Array2 to Array3 with depth = 1
2020-09-22 12:03:59 -07:00
6d77c85179
Abstract coordinates behind a Coord
type
...
This will allow adding another dimension to the coordinate, more easily.
2020-09-22 11:23:58 -07:00
b96f9c5dcc
step_e now makes the boundary condition explicit as well
...
This paves the way for implementing a single 2d plane within a 3d
simulation.
Unfortunately it increases the reflections, however this could be made
to accept explicit BoundaryCondition parameters to explicitly nullify
reflections instead.
2020-09-22 10:13:45 -07:00
2549ac9940
step_h uses optional left/down nodes.
...
This will be handy for implementing 3d, because the world with depth=1
(i.e. no neighboring xy planes) will behave the same as a 2d simulation.
2020-09-22 08:56:41 -07:00
f21c43d655
Misc measurement improvements
2020-09-20 21:56:30 -07:00
253ffe585f
Fix current measurement
2020-09-20 11:53:05 -07:00
d713c79bbd
Improve the UPML parameters by properly summing the axis conductivities in the corners
2020-09-19 20:10:10 -07:00
f6e4ed8cb9
Add a UPML boundary condition (needs improving in the corners, though)
2020-09-19 20:02:11 -07:00
ae93101676
Allow conductivity to be specified as a vector
...
This is necessary to implement UPML boundary conditions
2020-09-19 19:33:11 -07:00
a7899d9be1
Add a toroid example where the B field is actually directed circularly inside the toroid
...
This is a more accurate simulation of a core memory.
Presently, trying to characterize the device: understand how the drive
current, and sizing, affects switching time.
2020-09-18 22:23:37 -07:00
1d303df409
Fix rendering to render (Bx,By,Ez). Also fix an infinite loop due to rounding errors in MHCurve
2020-09-18 22:22:54 -07:00
8a70276c78
Make measurements also be 3d
2020-09-18 17:11:05 -07:00
7029c8bcfa
SimState *should* be capable of simulating either ex/ey/bz or bx/by/ez type planes
...
Have not actually tested it with a bx/by/ez plane yet.
2020-09-17 23:02:28 -07:00
a1f5b96ae1
Model the H/B field in 3d, mostly
2020-09-17 22:53:12 -07:00
54b23a0494
step_h is 2.5d; need to update material trait
2020-09-17 21:09:37 -07:00
144c7a85d4
CellState now holds the full e
field as a 3-vector (was a 2-vector)
2020-09-17 20:58:25 -07:00
d65dab763f
Rewrite the step_e
function to handle up to 3 dimensions
...
I'll be expanding the simulation to remain as 2d, but allow
configuration of either (Ex, Ey, Hz) (as today) or (Hx, Hy, Ez).
2020-09-17 20:48:05 -07:00
c0174b6483
Rename flt::Priv/Pub to Real and Flt
...
It's a little more readable
2020-09-13 22:45:02 -07:00
3e12f5384d
Update benchmarks after switch from f64 -> f32 as default
2020-09-13 22:38:42 -07:00
f50dbf7d4e
Make the float depth compile-time configurable
2020-09-13 22:38:00 -07:00
d4334565a7
Add an example where the ferromagnet is a ring around the conductor
2020-09-13 18:33:31 -07:00
75008a6bd5
Consolidate duplicate 3r1 material definitions into mat::db
module
2020-09-13 18:32:43 -07:00
0581820388
Update benchmarks
2020-09-13 18:25:28 -07:00
6664fea7c2
Use unchecked floats for release builds
2020-09-13 18:22:58 -07:00
53da11c874
Assorted minor aesthetic touchups
2020-09-13 17:19:44 -07:00
003dde12a0
Record perf as it changes
2020-09-13 17:08:52 -07:00
cb9f413710
Add energy measurement
2020-09-13 17:08:33 -07:00
3f7ab1a39a
Simplify the SimState decimation logic.
2020-09-13 16:29:18 -07:00