Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds thermal simulation, electrical circuit optimizer, mathematics and some more data structures #23

Open
wants to merge 96 commits into
base: main
Choose a base branch
from

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.
@empireu empireu changed the title Adds thermal simulation, mathematics and some more data structures Adds thermal simulation, electrical circuit optimizer, mathematics and some more data structures Dec 14, 2023
@empireu empireu marked this pull request as ready for review December 14, 2023 21:45
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.

2 participants