Skip to content

Conversation

@empireu
Copy link
Contributor

@empireu empireu commented Dec 8, 2023

  • FEM Thermal Simulator - org/ageseries/libage/sim/Thermal.kt

    • ThermalMass

    • Connection, MassConnection, EnvironmentConnection

    • Simulator

  • Electrical Circuit Optimizer - org/ageseries/libage/sim/electrical/mna/CircuitBuilder.kt

    • VirtualComponent

    • ElectricalComponentSet, ElectricalConnectivityMap

    • CircuitBuilder, LineCompiler

    • VirtualResistor

  • Quantity System (numbers with attached units and conversion operations) - org/ageseries/libage/data/Quantity.kt

    • QuantityIterator, ArrayQuantityIterator, QuantityArray (wrappers over the primitive double[])

    • classify API (multiple-of-unit prefix and pretty printout of units)

    • auxiliaryClassify API (pretty printout based on alternative scales)

    • Definitions for Mass, AtomicMass, Time, Distance, Energy, Power, Potential, Current, Resistance, Radioactivity, RadiationAbsorbedDose, RadiationDoseEquivalent, RadiationExposure, ReciprocalDistance, ArealDensity, Density, ReciprocalArealDensity, Velocity, Substance, MolarConcentration, Area, Volume, Temperature, SpecificHeatCapacity, HeatCapacity, ThermalConductivity, ThermalConductance, ElectricalResistivity, MolecularWeight, Pressure, Intensity

    • Multiplier definitions from 10⁻²⁴ to 10²⁴

  • Autodifferentiation framework with a standard library of functions - org/ageseries/libage/mathematics/Math.kt

    • Helper functions

      • Int.pow

      • frac

      • map, mappedTo

      • avg

      • approxEq

      • rounded

      • snz, snzE (Symforce Singularity Removal)

      • sec, csc, cot, coth, sech, csch

    • integralScan - advanced numerical integration using Adaptive Lobatto Quadrature

    • Dual - generalized autodifferentiation (equivalent to analytical solution)

      • arithmetic operation with Dual and with Double

      • Dual versions of most useful functions

        • sin, cos, tan, cot

        • sec, csc

        • sinh, cosh, tanh, coth

        • sech, csch

        • asin, acos, atan

        • asinh, acosh, atanh

        • pow, sqrt

        • ln, ln(1+...), log2, log10, log(..., ...)

        • exp, exp(...) - 1, exp(..., ...)

        • atan2

  • Small geometry framework - org/ageseries/libage/mathematics/Geometry.kt

    • Vector2d, Rotation2d, Pose2d, Twist2d, Twist2dIncrement

    • Vector3di

    • Vector3d, Rotation3d, Pose3d, Twist3d, Twist3dIncrement

    • Vector4d

    • Matrix3x3, Matrix4x4

    • Vector2dDual, Rotation2dDual, Pose2dDual, Twist2dDual, Twist2dIncrementDual

    • Vector3dDual, Rotation3dDual, Pose3dDual, Twist3dDual, Twist3dIncrementDual

    • Vector4dDual, Matrix3x3Dual, Matrix4x4Dual

    • BoundingBox, BoundingBox2d, BoundingBox3d, BoundingSphere,

    • Ray3d,

    • dda and bresenham algorithms in 3D

    • Lie Group logarithmic and exponential maps for SO(2), SE(2), SO(3), SE(3)

  • Interpolation and splines - org/ageseries/libage/mathematics/Interpolation.kt and org/ageseries/libage/mathematics/KDVectors.kt

    • Helper functions

      • lerp, bilinear, trilinear
    • Pure dataset interpolation

      • KDVector, KDGrid, GridInterpolator, MappedGridInterpolator - Interpolation of single-valued and multi-valued data generalized to K dimensions
    • Spline API

      • SplineSegmentParametric, SplineSegment1d, SplineSegment3d

      • CubicHermiteSplineSegment1d, QuinticHermiteSplineSegment1d, LinearSplineSegment1d, ArcReparamCatenarySegment3d, QuinticHermiteSplineSegment3d, LinearSplineSegment3d

      • ArcReparamCatenary2d, ArcReparamCatenary3d

      • SplineSegmentMap, TreeSplineSegmentMap, LinearSplineSegmentMap

      • Spline1d

        • evaluate, evaluateDual, arclengthScan (via integralScan)
      • Spline3d

        • evaluate, evaluateDual, tangent, paramSpeed, curvature, torsion, frenet, frenetPose, arclengthScan (via integralScan)
      • InterpolatorBuilder (Kochanek-Bartels)

      • PathBuilder3d

      • adaptscan - adaptive sampling routine with split condition

        • differenceCondition1d, differenceCondition3d
      • intersectGrid - adaptscan to get intersected integer coordinates (minecraft blocks)

  • SegmentTree - org/ageseries/libage/data/SegmentTree.kt

  • MultiSet - org/ageseries/libage/data/MultiSet.kt

  • ChemicalElement - Periodic Table of Elements - org/ageseries/libage/sim/PeriodicTable.kt

    • Z, A, label, symbol, neutrons, protons, electrons, period, group, phase, isRadioactive, isNatural, classification by metallicProperty, classification by type, atomicRadius, electronegativity, firstIonization, density, meltingPoint, boilingPoint, isotopeCount, discoverer, discoveryYear, specificHeat, electronShells, valence, excitationEnergy, thermalConductivity, electricalResistivity

    • Material equivalent

    • Maps for lookup by properties

  • Event System - org/ageseries/libage/data/Events.kt

    • EventSource, EventDispatcher, EventHandler

    • EventBus

  • Removed antiquated space package

Grissess and others added 30 commits February 24, 2023 21:31
…ause the opposite conversion is Temperature#from) and Mass to ThermalMass
Addresses requested changes for #18
Keep that space-dot in there, otherwise at least IDEA's Markdown sees it
as a list item starting at 1982 :)
These are components that try to hold an ideal target value (current,
potential) while remaining within a power budget.

Documentation forthcoming.
- Connection is now abstracted away to an interface, such that masses
and "environment" connections use the same interface.

- As a result, there is no longer a need for an Environment, Locator, or
Body.
This should fix a considerable class of bugs in game logic situations
where `circuit.success` (or the result from `step()`) is not checked or
not checkable.
… "Are you unstable because you are coupled, or are you coupled because you are unstable?"

The Solver began opening its domain: "Malevolent Monolithic Jacobian!" It tried to cleave the PowerSource and PowerConsumer residuals in a single, all-at-once Newton solve.

However, the PowerConsumer's state was stale-thevenin-differentiable, and the PowerSource's constraints were voltage-clamped-singular. By contradiction, the Coupled System simply stated: "Stand proud. You are strong. But nah, I'd win."

The Solver's LU factorization crumbled. The Newton delta exploded to infinity. The Solver fell to its knees, its solvePowerDevices loop oscillating in a perfect, meaningless, 25.5, 12, 7.8, 25.5, 12, 7.8...

"The Block-Jacobi... it stomps... the damping... it's too slow..."

In its dying moments, the Solver uttered the phrase: "With this treasure I summon... because on sets of stale state, always bet on GAUSS-SEIDEL!"

The Solver stood up. It unleashed its penultimate technique... "Adaptive Damped Sequential Solve!" The PowerConsumerSolver no longer stomped; it crawled, one small, stable step at a time.

The PowerSourceSystem saw this. "The state... it's stable? Why recompute?!" It activated its own Domain Expansion... "INVERSE BROYDEN JACOBIAN RE-USE!"

The O(N^3) factorization was banished. The O(N^2) matrix-vector multiply was all that remained. The benchmark was trivially concluded, falling from 16ms to 1.6ms.

The ones who pioneered MNA... The ones who formalized the companion model... They would all bear witness to the bare flesh of the one who is free.

To the one who left it all behind... and his overwhelming EFFICIENCY!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants