code wiki / (root) / nx_vessel_geometry.nx

nx_vessel_geometry.nx

buildroot/runtime/nx_vessel_geometry.nx

3269 B73 linesdepth 3pulls 3 transitivereach 1 importersview sourcekind librarytopic vessel
docsdependenciesstructsconstsfunctions

about

nx_vessel_geometry.nx -- C0 of the VESSEL-DESIGN ladder: PARAMETRIC GEOMETRY that derives the thermal-twin parameters from the PHYSICAL shape and materials. Until now the twin's heat capacity and insulation conductance were hand-set; here they fall out of geometry + physics: contents heat capacity C = V * rho * c_p [J/K] insulation conductance U = k * A / d (Fourier) [W/K] So "a 4 L vessel with 5 mm of cork" becomes a fully-specified thermal twin you can certify (H3 / nx_vessel_twin) -- the geometry-to-thermal design loop, closed in software. Change the insulation thickness and re-certify; no prototype required. Cylinder, aspect set by a chosen radius: h = V / (pi r^2). Integer units: volume ml, lengths mm, area mm^2, k in milli-(W/m.K). genealogy_id: lumped_thermal_from_geometry + fourier_conduction_1822

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_vessel_thermal.nx nx_vessel_geometry.nx nx_vessel_geometry_test.nx

imports: nx_syscalls.nxnx_vessel_thermal.nx

imported by: nx_vessel_geometry_test.nx

structs

26struct NxVesselGeom

consts

21const NX_MAGIC_1000000: i64 = 1000000
23const NX_VG_PI_MILLI: i64 = 3142 // pi x1000
24const NX_VG_WATER_CP_X1K: i64 = 4186 // water specific heat x1000: 4.186 J/(g.K); rho=1 g/ml

functions

38func nx_vessel_geom_design(volume_ml: i64, radius_mm: i64, wall_thickness_mm: i64,
called by 1: main calls 1: sys_mmap
56func nx_vessel_geom_heat_capacity_jk(g: *NxVesselGeom) -> i64
63func nx_vessel_geom_insulation_mwk(g: *NxVesselGeom) -> i64
68func nx_vessel_geom_to_twin(g: *NxVesselGeom, heater_power_mw: i64,