-
Notifications
You must be signed in to change notification settings - Fork 1
Adds thermal simulation, electrical circuit optimizer, mathematics and some more data structures #23
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
Open
empireu
wants to merge
120
commits into
main
Choose a base branch
from
next
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…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.
…kinetic simulation (semi-tested)
…ontrols to PowerSource
… "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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
FEM Thermal Simulator -
org/ageseries/libage/sim/Thermal.ktThermalMassConnection,MassConnection,EnvironmentConnectionSimulatorElectrical Circuit Optimizer -
org/ageseries/libage/sim/electrical/mna/CircuitBuilder.ktVirtualComponentElectricalComponentSet,ElectricalConnectivityMapCircuitBuilder,LineCompilerVirtualResistorQuantity System (numbers with attached units and conversion operations) -
org/ageseries/libage/data/Quantity.ktQuantityIterator,ArrayQuantityIterator,QuantityArray(wrappers over the primitivedouble[])classifyAPI (multiple-of-unit prefix and pretty printout of units)auxiliaryClassifyAPI (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,IntensityMultiplier definitions from 10⁻²⁴ to 10²⁴
Autodifferentiation framework with a standard library of functions -
org/ageseries/libage/mathematics/Math.ktHelper functions
Int.powfracmap,mappedToavgapproxEqroundedsnz,snzE(Symforce Singularity Removal)sec,csc,cot,coth,sech,cschintegralScan- advanced numerical integration using Adaptive Lobatto QuadratureDual- generalized autodifferentiation (equivalent to analytical solution)arithmetic operation with
Dualand withDoubleDualversions of most useful functionssin,cos,tan,cotsec,cscsinh,cosh,tanh,cothsech,cschasin,acos,atanasinh,acosh,atanhpow,sqrtln,ln(1+...),log2,log10,log(..., ...)exp,exp(...) - 1,exp(..., ...)atan2Small geometry framework -
org/ageseries/libage/mathematics/Geometry.ktVector2d,Rotation2d,Pose2d,Twist2d,Twist2dIncrementVector3diVector3d,Rotation3d,Pose3d,Twist3d,Twist3dIncrementVector4dMatrix3x3,Matrix4x4Vector2dDual,Rotation2dDual,Pose2dDual,Twist2dDual,Twist2dIncrementDualVector3dDual,Rotation3dDual,Pose3dDual,Twist3dDual,Twist3dIncrementDualVector4dDual,Matrix3x3Dual,Matrix4x4DualBoundingBox,BoundingBox2d,BoundingBox3d,BoundingSphere,Ray3d,ddaandbresenhamalgorithms in 3DLie Group logarithmic and exponential maps for SO(2), SE(2), SO(3), SE(3)
Interpolation and splines -
org/ageseries/libage/mathematics/Interpolation.ktandorg/ageseries/libage/mathematics/KDVectors.ktHelper functions
lerp,bilinear,trilinearPure dataset interpolation
KDVector,KDGrid,GridInterpolator,MappedGridInterpolator- Interpolation of single-valued and multi-valued data generalized toKdimensionsSpline API
SplineSegmentParametric,SplineSegment1d,SplineSegment3dCubicHermiteSplineSegment1d,QuinticHermiteSplineSegment1d,LinearSplineSegment1d,ArcReparamCatenarySegment3d,QuinticHermiteSplineSegment3d,LinearSplineSegment3dArcReparamCatenary2d,ArcReparamCatenary3dSplineSegmentMap,TreeSplineSegmentMap,LinearSplineSegmentMapSpline1devaluate,evaluateDual,arclengthScan(viaintegralScan)Spline3devaluate,evaluateDual,tangent,paramSpeed,curvature,torsion,frenet,frenetPose,arclengthScan(viaintegralScan)InterpolatorBuilder(Kochanek-Bartels)PathBuilder3dadaptscan- adaptive sampling routine with split conditiondifferenceCondition1d,differenceCondition3dintersectGrid-adaptscanto get intersected integer coordinates (minecraft blocks)SegmentTree-org/ageseries/libage/data/SegmentTree.ktMultiSet-org/ageseries/libage/data/MultiSet.ktChemicalElement- Periodic Table of Elements -org/ageseries/libage/sim/PeriodicTable.ktZ,A,label,symbol,neutrons,protons,electrons,period,group,phase,isRadioactive,isNatural, classification bymetallicProperty, classification bytype,atomicRadius,electronegativity,firstIonization,density,meltingPoint,boilingPoint,isotopeCount,discoverer,discoveryYear,specificHeat,electronShells,valence,excitationEnergy,thermalConductivity,electricalResistivityMaterial equivalent
Maps for lookup by properties
Event System -
org/ageseries/libage/data/Events.ktEventSource,EventDispatcher,EventHandlerEventBusRemoved antiquated
spacepackage