flutter3d_matter 1.0.0-rc.1
flutter3d_matter: ^1.0.0-rc.1 copied to clipboard
What a flutter3d world is made of: its gravity, air and wind, the catalogue of physical materials, and the constants of nature. Plain Dart, with nothing that moves a body.
1.0.0-rc.1 #
-
A state that saves is one that loads.
MatterState.withQuantityandMatterState.at(also:)refuse an id that is not<namespace>.<name>with theMaterialFormatExceptionfromJsongives it, so a body's state can no longer be saved with a quantity it then fails to read back. -
MaterialStateisMatterState. Flutter's material library still exports aMaterialState, so a widget beside a body's state read an ambiguous name. Same fields and methods. -
lorenzNumber, the Wiedemann–Franz law's constant. 2.44 × 10⁻⁸ W·Ω/K², the Sommerfeld value: a metal whose heat its electrons carry conducts k = L·T/ρ, which the native core reads for a material that gives a resistivity and no conductivity. -
A world says what its numbers promise and where it is.
WorldProperties.profile(aSimulationProfile, deterministic by default) andWorldProperties.geoOrigin, both incopyWith, the JSON andWorldPropertiesPatch, and written only when set, so the standard world reads and digests as before.GeoOriginis a latitude and a longitude (radians here, degrees in a document) and an altitude, the world's axes laid east, up and south on the WGS 84 ellipsoid, withgeodeticOfandpositionOfon the portable maths. -
Three fire values get names of their own instead of overriding the measured ones.
ThermalProperties.glowTemperatureis the coolest a surface that burns without a flame glows on at by itself: charcoal keeps its measured 610 K ignition and gains 860.8 K, derived and marked an estimate, with its derivation as its source.ThermalProperties.effectiveHeatOfCombustionis what a fire test measures a kilogram gives: rubber keeps the gross 37.9 MJ/kg of a bomb calorimeter and gains 27 MJ/kg from SP's tyre pile fires.f3d.paperis a sheet (0.18 W/(m·K));f3d.paperStack, new, is a stack with air between its sheets (0.05, an estimate within the 0.039 to 0.093 that loose milled paper and pressed copy-paper stacks are measured at). A base entry of the data may give a value its own source and spread (sourceOf,intervalOf), andPhysicalMaterial.problemsrefuses an effective heat above the gross one. -
Every value that was recalled or carried over is checked against a source that was read (
tool/data/sources/verification.json): 274 confirmed keep their number and name the page that confirms it; 21 corrected take the source's (steel's modulus 200→211.9 GPa, glass's conductivity 1.4→0.937 W/(m·K), wood's heat of combustion 15→11.12 MJ/kg, oak's density 545→706 kg/m³ and Poisson's ratio 0.29→0.35, pine's 0.29→0.328, rubber's ignition 623.15→673.15 K, polyethylene's Poisson's ratio 0.42→0.45, chromium's resistivity 1.25→1.34e-7 Ω·m, molybdenum's Poisson's ratio 0.31→0.293, polypropylene's strength 36.2→34 MPa, PVC's yield and strength 42.75 and 46.2→55 MPa, polystyrene's strength 43.8→52 MPa and its and expanded polystyrene's heat of combustion 39.8→41.96 MJ/kg, nylon 66's yield 63.8→82 MPa, PEEK's modulus 3.6→4 GPa and yield 91→98 MPa; rubber on asphalt sliding 0.65→0.75, PTFE on steel 0.125→0.065); 53 whose name covers grades take the grade the research proposed, with the spread across grades as their interval and the grade named in the description; 17 stay estimates, saying what was searched. A wood's modulus is the one along the grain (oak 12.5, pine 12.3, Douglas-fir 13.4 GPa), a composite's that of a quasi-isotropic laminate. Water's bulk modulus is the adiabatic 2.1934 GPa and ethanol's specific heat its 20 °C 2393 J/(kg·K). Molten basalt's viscosity is the measured crystal-free 37 Pa·s, a constant, as the melt model's law is too far from it to anchor. -
Measured coefficients of restitution are pair data: 34 pairs from
restitution.json, each the record's value or, where it gives a curve, its value at 1 m/s; the three on concrete, which the research trusts little, are estimates. A coefficient is held at that one speed: a law in impact speed would need a law input that is a contact's rather than a body's state, whichLawInputreads fromMaterialState, so the e(v) points stay in the data for a later minor. -
Every property of a material is a law. The fields of
MechanicalProperties,FluidProperties,ThermalProperties,AcousticProperties,OpticalPropertiesandElectricalPropertiesarePropertyLaw?where they weredouble?:valueis the number at the material's reference state, as before, andat(MaterialState)the number for a body in another state. A law is aConstantLaw, aTableLaw(one interpolation formula, written down) or aFormulaLawof the expression language, whose unit is checked as it is read;FormulaLaw.andrade,.arrheniusand.polynomialwrite the handbook forms. Code that read a number reads.value; a constructor that took a number takesConstantLaw(number).PhysicalMaterial.densitystays a number, the reference state's. The laws are read in Dart; the native core does not evaluate them yet and takes every property's value at the reference state, whatever a body's temperature. -
MaterialState: what one body of a material is like now, an open map of namespaced quantity ids (f3d.temperature,f3d.pressure,f3d.wetness, a plugin's own) toQuantity, and a phase. Unknown quantities survive its document, so a component can persist a plugin's. -
Confidence(measured,handbook,estimate, open for more) on every value, on a material as a whole and on aMaterialPair, and an optionalPropertyIntervalfor the spread a source gives. -
externalIdsandMaterialCatalog.byExternal(space, id): the ids other systems know a material by, in the spacesExternalIdSpacenames (CAS, IFC, MaterialX, UNS, ISO 1043, EN). -
InelasticProperties: a loss factor andConstitutiveModels of large strains (Ogden), relaxation (Prony) and plastic flow (Johnson and Cook), each with its source. -
OpticalProperties.dielectricF0, andf0from the refractive index where it is not given. -
The catalogue is generated from verified data: 238 entries, every value with its source and confidence, about 550 of them with a law in temperature; the 33 entries it had keep their numbers, and their data says each value's confidence rather than leaving it to be read out of the source's wording. Every solid has a coefficient of friction, an estimate marked as one where no source measured it: the median of its family's measured ones, never of other estimates, or the engine's default where its family has none. A law scaled onto the value quoted at the reference state says by how much in its source; molten basalt has a thermal group. A coverage table on this README says which values change with temperature. Reference values for simulation, not for design or safety calculations.
-
MaterialCatalog.contactsays how its friction was come by.ContactPropertiesis a class rather than a record, and carries aconfidenceand asourcebeside the three coefficients: the measured pair's, or the less trusted of the two materials' own with how they were combined, so a friction made of an estimate does not read as a measurement. -
The defaults a material that says none takes are on
MaterialCatalog, each with its source:defaultEmissivity,defaultConductivity,defaultYoungsModulus,defaultPoissonRatioanddefaultSpecificHeat, besidedefaultFriction. The native core's presets start from them. -
checkMaterialCatalogholds a catalogue to its shape: each law at its reference state gives its value exactly, a formula measures its property's unit (propertyUnits), every value says its confidence. -
The material document is version 2: a property may be a law, and
inelastic,externalIdsandconfidenceare new keys; a version 1 document reads as it did. A surface tension down to 1e-5 N/m and an expansion up to 0.1 1/K are plausible, for the cryogenic liquids. -
WorldPropertiesPatchnames the fields of a world something sets and nothing it does not: a level'sworld, laid over the game's own world withover. Its document is the world's JSON with keys left out, kept as written, unknown keys included; a value a world would refuse is aWorldPropertiesFormatExceptionnaming the key. -
WorldProperties.gravityMagnituderecognizes standard gravity. It compared the float32yof the gravity vector with the double -9.81, which never matched, and answered 9.8100004…; standard gravity now givesstandardGravityexactly. -
physicalMaterialsSectionandmaterialPairsSectionread a data plugin's substances, registered in the engine'sDataSectionRegistry, and install them into theMaterialCatalog; a document that has them requiresphysicalMaterialsRequirement, as before. The plugin runtime no longer depends on the physics to read them. -
The first release: what a world is made of, in a package of its own.
WorldProperties,WorldPropertiesFormatException,PhysicalMaterialand its property groups,MaterialPhase,MaterialPair,MaterialCatalog,Materials,UnknownMaterialException,MaterialFormatException, the standard world (standardGravity,standardAtmosphere,airDensityAt,speedOfSoundAtand the rest) and the constants of nature came fromflutter3d_physics, which does not re-export them: a file that names them imports this package. The audio, the particles and the native core's header generator read them and step no body, so they depend on this instead of the physics. -
WorldPropertieshas no step rate.stepRate,stepSecondsand thestepRateparameters are gone: nothing read them, and how often a world is stepped is the loop's (WorldTiming,EngineLoop.stepSecondsinflutter3d_sim).standardStepRatemoved toflutter3d_simwith it. A document that still carries astepRatekey reads, the key passed over.