@woosh/meep-engine 2.130.0 → 2.131.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/package.json +1 -1
  2. package/src/core/color/illuminant/D65_spd_analytical.d.ts +12 -0
  3. package/src/core/color/illuminant/D65_spd_analytical.d.ts.map +1 -0
  4. package/src/core/color/illuminant/D65_spd_analytical.js +70 -0
  5. package/src/core/color/illuminant/D65_spd_tabulated.d.ts +13 -0
  6. package/src/core/color/illuminant/D65_spd_tabulated.d.ts.map +1 -0
  7. package/src/core/color/illuminant/D65_spd_tabulated.js +105 -0
  8. package/src/core/color/sRGB/sRGB_cmf.d.ts +11 -0
  9. package/src/core/color/sRGB/sRGB_cmf.d.ts.map +1 -0
  10. package/src/core/color/sRGB/sRGB_cmf.js +22 -0
  11. package/src/core/color/xyz/xyz_cmf_tabulated.d.ts +22 -0
  12. package/src/core/color/xyz/xyz_cmf_tabulated.d.ts.map +1 -0
  13. package/src/core/color/xyz/xyz_cmf_tabulated.js +212 -0
  14. package/src/core/color/xyz/xyz_cmf_wyman.d.ts +13 -0
  15. package/src/core/color/xyz/xyz_cmf_wyman.d.ts.map +1 -0
  16. package/src/core/color/xyz/xyz_cmf_wyman.js +65 -0
  17. package/src/core/color/xyz/xyz_to_rgb.d.ts +3 -3
  18. package/src/core/color/xyz/xyz_to_rgb.d.ts.map +1 -1
  19. package/src/core/color/xyz/xyz_to_rgb.js +2 -2
  20. package/src/core/math/complex/complex_add.d.ts +8 -0
  21. package/src/core/math/complex/complex_add.d.ts.map +1 -0
  22. package/src/core/math/complex/complex_add.js +11 -0
  23. package/src/core/math/complex/complex_div.d.ts +8 -0
  24. package/src/core/math/complex/complex_div.d.ts.map +1 -0
  25. package/src/core/math/complex/complex_div.js +12 -0
  26. package/src/core/math/complex/complex_mul.d.ts +8 -0
  27. package/src/core/math/complex/complex_mul.d.ts.map +1 -0
  28. package/src/core/math/complex/complex_mul.js +10 -0
  29. package/src/core/math/complex/complex_sub.d.ts +8 -0
  30. package/src/core/math/complex/complex_sub.d.ts.map +1 -0
  31. package/src/core/math/complex/complex_sub.js +10 -0
  32. package/src/core/math/physics/mie/MIE_PARTICLES_STANDARD.d.ts +41 -0
  33. package/src/core/math/physics/mie/MIE_PARTICLES_STANDARD.d.ts.map +1 -0
  34. package/src/core/math/physics/mie/MIE_PARTICLES_STANDARD.js +125 -0
  35. package/src/core/math/physics/mie/MIE_PARTICLES_STANDARD_PRECOMPUTED.d.ts +160 -0
  36. package/src/core/math/physics/mie/MIE_PARTICLES_STANDARD_PRECOMPUTED.d.ts.map +1 -0
  37. package/src/core/math/physics/mie/MIE_PARTICLES_STANDARD_PRECOMPUTED.js +215 -0
  38. package/src/core/math/physics/mie/compute_bhmie_optical_properties.d.ts +18 -0
  39. package/src/core/math/physics/mie/compute_bhmie_optical_properties.d.ts.map +1 -0
  40. package/src/core/math/physics/mie/compute_bhmie_optical_properties.js +151 -0
  41. package/src/core/math/physics/mie/compute_lorenz_mie_optical_properties.d.ts +12 -0
  42. package/src/core/math/physics/mie/compute_lorenz_mie_optical_properties.d.ts.map +1 -0
  43. package/src/core/math/physics/mie/compute_lorenz_mie_optical_properties.js +363 -0
  44. package/src/core/math/physics/mie/compute_mie_particle_properties_rgb.d.ts +15 -0
  45. package/src/core/math/physics/mie/compute_mie_particle_properties_rgb.d.ts.map +1 -0
  46. package/src/core/math/physics/mie/compute_mie_particle_properties_rgb.js +148 -0
  47. package/src/core/math/physics/mie/ri_air.d.ts +7 -0
  48. package/src/core/math/physics/mie/ri_air.d.ts.map +1 -0
  49. package/src/core/math/physics/mie/ri_air.js +69 -0
  50. package/src/core/math/physics/mie/ri_ammonium_sulfate.d.ts +7 -0
  51. package/src/core/math/physics/mie/ri_ammonium_sulfate.d.ts.map +1 -0
  52. package/src/core/math/physics/mie/ri_ammonium_sulfate.js +140 -0
  53. package/src/core/math/physics/mie/ri_brine.d.ts +7 -0
  54. package/src/core/math/physics/mie/ri_brine.d.ts.map +1 -0
  55. package/src/core/math/physics/mie/ri_brine.js +145 -0
  56. package/src/core/math/physics/mie/ri_dust.d.ts +7 -0
  57. package/src/core/math/physics/mie/ri_dust.d.ts.map +1 -0
  58. package/src/core/math/physics/mie/ri_dust.js +153 -0
  59. package/src/core/math/physics/mie/ri_pollen.d.ts +7 -0
  60. package/src/core/math/physics/mie/ri_pollen.d.ts.map +1 -0
  61. package/src/core/math/physics/mie/ri_pollen.js +146 -0
  62. package/src/core/math/physics/mie/ri_smoke.d.ts +7 -0
  63. package/src/core/math/physics/mie/ri_smoke.d.ts.map +1 -0
  64. package/src/core/math/physics/mie/ri_smoke.js +151 -0
  65. package/src/core/math/physics/mie/ri_soot.d.ts +7 -0
  66. package/src/core/math/physics/mie/ri_soot.d.ts.map +1 -0
  67. package/src/core/math/physics/mie/ri_soot.js +148 -0
  68. package/src/core/math/physics/mie/ri_water.d.ts +7 -0
  69. package/src/core/math/physics/mie/ri_water.d.ts.map +1 -0
  70. package/src/core/math/physics/mie/ri_water.js +148 -0
@@ -0,0 +1,146 @@
1
+ import {
2
+ ParameterLookupTable
3
+ } from "../../../../engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.js";
4
+
5
+ /**
6
+ * Complex refractive index of pollen (sporopollenin-rich organic shell): n + i k, wavelength in nm.
7
+ * Assumptions: dry pollen (no internal water), ~300 K, bulk-effective constants; morphology not modeled.
8
+ * Notes and composite sources/guidance:
9
+ * - Pollen exine composed largely of sporopollenin; visible n typically ~1.53–1.57; very small k in visible, stronger in UV.
10
+ * - Organic functional groups show bands: strong C–H/O–H stretch complex near 3.2–3.5 µm, carbonyl/other modes near 5.8–6.2 µm,
11
+ * and features around 6.8–7.3 µm; far-IR tails are modest compared to silicates.
12
+ * - This LUT is designed for radiometric/Mie use over 200–20,000 nm with linear interpolation. Sampling is denser near bands.
13
+ * - Composite guidance: polymer/biopolymer optics (e.g., Querry optical constants compendium), aerosol brown-organics literature,
14
+ * and typical measured visible n for biological tissues/pollen. Values are smooth and representative, not species-specific.
15
+ */
16
+ const POLLEN_REFRACTION_INDEX_LUT = ParameterLookupTable.from(
17
+ 2, // columns: [n, k]
18
+ [
19
+ // UV (short-wave): strong absorption; n slightly higher
20
+ 1.600, 1.50e-1, // 200 nm
21
+ 1.590, 1.00e-1, // 220 nm
22
+ 1.580, 6.00e-2, // 240 nm
23
+ 1.575, 3.50e-2, // 260 nm
24
+ 1.565, 2.00e-2, // 280 nm
25
+ 1.560, 1.00e-2, // 300 nm
26
+ 1.555, 6.00e-3, // 320 nm
27
+ 1.552, 4.00e-3, // 340 nm
28
+ 1.550, 3.00e-3, // 360 nm
29
+ 1.548, 2.50e-3, // 380 nm
30
+ // Visible (400–700 nm): weak absorption; slight dispersion in n
31
+ 1.547, 2.20e-3, // 400 nm
32
+ 1.545, 1.60e-3, // 450 nm
33
+ 1.543, 1.00e-3, // 500 nm
34
+ 1.542, 8.00e-4, // 550 nm
35
+ 1.541, 7.00e-4, // 600 nm
36
+ 1.5405, 6.50e-4, // 650 nm
37
+ 1.5400, 6.00e-4, // 700 nm
38
+ // NIR/SWIR (0.75–2.5 µm): weak k with mild overtone features
39
+ 1.5395, 6.00e-4, // 750 nm
40
+ 1.5390, 5.80e-4, // 800 nm
41
+ 1.5380, 6.20e-4, // 900 nm
42
+ 1.5370, 7.00e-4, // 1000 nm
43
+ 1.5365, 7.20e-4, // 1064 nm
44
+ 1.5355, 7.00e-4, // 1200 nm
45
+ 1.5350, 8.00e-4, // 1300 nm
46
+ 1.5340, 1.50e-3, // 1450 nm (overtone bump)
47
+ 1.5335, 1.20e-3, // 1550 nm
48
+ 1.5330, 1.00e-3, // 1650 nm
49
+ 1.5325, 9.50e-4, // 1750 nm
50
+ 1.5320, 2.00e-3, // 1940 nm (combination band region)
51
+ 1.5320, 1.80e-3, // 2000 nm
52
+ 1.5315, 2.50e-3, // 2200 nm
53
+ 1.5310, 3.00e-3, // 2400 nm
54
+ 1.5310, 3.50e-3, // 2500 nm
55
+ // Mid-IR (2.7–5 µm): strong organic stretch bands near 3.2–3.5 µm
56
+ 1.5310, 6.00e-3, // 2700 nm
57
+ 1.5320, 1.50e-2, // 2900 nm
58
+ 1.5330, 1.50e-1, // 3000 nm (onset of stretch complex)
59
+ 1.5350, 2.00e-1, // 3100 nm
60
+ 1.5370, 2.50e-1, // 3200 nm
61
+ 1.5380, 2.80e-1, // 3300 nm
62
+ 1.5385, 3.00e-1, // 3400 nm (C–H/O–H peak)
63
+ 1.5380, 2.70e-1, // 3500 nm
64
+ 1.5370, 1.50e-1, // 3700 nm
65
+ 1.5360, 8.00e-2, // 4000 nm
66
+ 1.5350, 5.00e-2, // 4500 nm
67
+ 1.5340, 3.50e-2, // 5000 nm (5 µm)
68
+ // Long-wave IR (5–20 µm): bands near 5.8–6.2 µm and 6.8–7.3 µm; modest tail beyond
69
+ 1.5335, 1.20e-1, // 6000 nm (≈6 µm band)
70
+ 1.5330, 1.50e-1, // 6800 nm (6.8 µm feature)
71
+ 1.5325, 1.10e-1, // 7000 nm
72
+ 1.5320, 8.50e-2, // 7500 nm
73
+ 1.5315, 7.00e-2, // 8000 nm
74
+ 1.5310, 6.00e-2, // 9000 nm
75
+ 1.5305, 1.00e-1, // 10000 nm (weak broader organic modes)
76
+ 1.5300, 8.00e-2, // 12000 nm
77
+ 1.5290, 6.00e-2, // 15000 nm
78
+ 1.5280, 5.00e-2, // 20000 nm (20 µm)
79
+ ],
80
+ [
81
+ 200,
82
+ 220,
83
+ 240,
84
+ 260,
85
+ 280,
86
+ 300,
87
+ 320,
88
+ 340,
89
+ 360,
90
+ 380,
91
+ 400,
92
+ 450,
93
+ 500,
94
+ 550,
95
+ 600,
96
+ 650,
97
+ 700,
98
+ 750,
99
+ 800,
100
+ 900,
101
+ 1000,
102
+ 1064,
103
+ 1200,
104
+ 1300,
105
+ 1450,
106
+ 1550,
107
+ 1650,
108
+ 1750,
109
+ 1940,
110
+ 2000,
111
+ 2200,
112
+ 2400,
113
+ 2500,
114
+ 2700,
115
+ 2900,
116
+ 3000,
117
+ 3100,
118
+ 3200,
119
+ 3300,
120
+ 3400,
121
+ 3500,
122
+ 3700,
123
+ 4000,
124
+ 4500,
125
+ 5000,
126
+ 6000,
127
+ 6800,
128
+ 7000,
129
+ 7500,
130
+ 8000,
131
+ 9000,
132
+ 10000,
133
+ 12000,
134
+ 15000,
135
+ 20000
136
+ ]
137
+ );
138
+
139
+ /**
140
+ * 🌿 POLLEN (Organic)
141
+ * @param {number[]} result complex number, refraction index
142
+ * @param {number} wavelength_nm in nanometers
143
+ */
144
+ export function ri_pollen(result, wavelength_nm) {
145
+ POLLEN_REFRACTION_INDEX_LUT.sample(wavelength_nm, result);
146
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 💨 SMOKE (Brown Carbon / Organic aerosol)
3
+ * @param {number[]} result complex number, refraction index
4
+ * @param {number} wavelength_nm in nanometers
5
+ */
6
+ export function ri_smoke(result: number[], wavelength_nm: number): void;
7
+ //# sourceMappingURL=ri_smoke.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ri_smoke.d.ts","sourceRoot":"","sources":["../../../../../../src/core/math/physics/mie/ri_smoke.js"],"names":[],"mappings":"AA+IA;;;;GAIG;AACH,iCAHW,MAAM,EAAE,iBACR,MAAM,QAIhB"}
@@ -0,0 +1,151 @@
1
+ import {
2
+ ParameterLookupTable
3
+ } from "../../../../engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.js";
4
+
5
+ /**
6
+ * 🔥 SMOKE (Brown Carbon / Organic aerosol): complex refractive index m = n + i k, wavelength in nm.
7
+ * Assumptions: dry organic aerosol ("brown carbon"), ~300 K, bulk-effective constants; morphology not modeled.
8
+ * Purpose: radiometrically useful across 200–20,000 nm for graphics and physics; linear interpolation via ParameterLookupTable.
9
+ *
10
+ * Spectral behavior encoded (representative):
11
+ * - UV (200–380 nm): strong absorption (large k), n slightly higher.
12
+ * - Visible (400–700 nm): moderate dispersion, weak-to-moderate absorption decreasing toward red (brownness).
13
+ * - NIR/SWIR (0.75–2.5 µm): generally weak k with small overtone bumps near 1.4–2.0 µm.
14
+ * - Mid-IR (2.7–5 µm): strong organic stretch complex near 3.2–3.5 µm (elevated k).
15
+ * - LWIR (6–12 µm): carbonyl/other organic modes around ~6 µm and bands near 6.8–7.3 µm; modest tail beyond.
16
+ *
17
+ * Composite guidance/sources: Kirchstetter et al. (2004) AAE for brown carbon; Hoffer et al. (2006);
18
+ * Sumlin et al. (2017); generic organic/polymer optics (Querry compendium) for MIR/LWIR band shapes.
19
+ * Values are smooth/representative for modeling; species- and burn-condition variability is not captured.
20
+ */
21
+ const SMOKE_REFRACTION_INDEX_LUT = ParameterLookupTable.from(
22
+ 2, // columns: [n, k]
23
+ [
24
+ // UV (short-wave)
25
+ 1.660, 3.00e-1, // 200 nm
26
+ 1.630, 1.80e-1, // 220 nm
27
+ 1.610, 1.00e-1, // 240 nm
28
+ 1.600, 6.00e-2, // 260 nm
29
+ 1.595, 3.50e-2, // 280 nm
30
+ 1.590, 2.00e-2, // 300 nm
31
+ 1.585, 1.20e-2, // 320 nm
32
+ 1.580, 8.00e-3, // 340 nm
33
+ 1.575, 6.00e-3, // 360 nm
34
+ 1.570, 5.00e-3, // 380 nm
35
+ // Visible (brownness: stronger in blue, weaker toward red)
36
+ 1.568, 4.50e-3, // 400 nm
37
+ 1.562, 3.00e-3, // 450 nm
38
+ 1.558, 2.00e-3, // 500 nm
39
+ 1.555, 2.00e-3, // 550 nm
40
+ 1.553, 1.60e-3, // 600 nm
41
+ 1.551, 1.30e-3, // 650 nm
42
+ 1.550, 1.10e-3, // 700 nm
43
+ // NIR/SWIR (overtone/combination features are mild)
44
+ 1.5495, 1.00e-3, // 750 nm
45
+ 1.5490, 1.00e-3, // 800 nm
46
+ 1.5480, 1.20e-3, // 900 nm
47
+ 1.5475, 1.50e-3, // 1000 nm
48
+ 1.5470, 1.60e-3, // 1064 nm
49
+ 1.5460, 1.80e-3, // 1200 nm
50
+ 1.5455, 2.20e-3, // 1300 nm
51
+ 1.5450, 4.50e-3, // 1450 nm (overtone bump)
52
+ 1.5445, 3.50e-3, // 1550 nm
53
+ 1.5440, 3.00e-3, // 1650 nm
54
+ 1.5435, 2.80e-3, // 1750 nm
55
+ 1.5430, 6.00e-3, // 1940 nm (combination region)
56
+ 1.5428, 5.50e-3, // 2000 nm
57
+ 1.5425, 6.00e-3, // 2200 nm
58
+ 1.5420, 7.00e-3, // 2400 nm
59
+ 1.5418, 8.00e-3, // 2500 nm
60
+ // Mid-IR (2.7–5 µm): organic stretch complex near 3.2–3.5 µm
61
+ 1.5415, 1.20e-2, // 2700 nm
62
+ 1.5420, 3.00e-2, // 2900 nm
63
+ 1.5430, 1.00e-1, // 3000 nm
64
+ 1.5450, 1.80e-1, // 3100 nm
65
+ 1.5470, 2.40e-1, // 3200 nm
66
+ 1.5480, 2.70e-1, // 3300 nm
67
+ 1.5485, 2.80e-1, // 3400 nm (peak)
68
+ 1.5480, 2.40e-1, // 3500 nm
69
+ 1.5470, 1.40e-1, // 3700 nm
70
+ 1.5460, 8.00e-2, // 4000 nm
71
+ 1.5450, 5.00e-2, // 4500 nm
72
+ 1.5440, 3.50e-2, // 5000 nm
73
+ // Long-wave IR (5–20 µm): ~6 µm and 6.8–7.3 µm bands, modest tail
74
+ 1.5435, 1.00e-1, // 6000 nm (≈6 µm band)
75
+ 1.5430, 1.30e-1, // 6800 nm (6.8 µm feature)
76
+ 1.5428, 1.10e-1, // 7000 nm
77
+ 1.5424, 9.00e-2, // 7500 nm
78
+ 1.5420, 7.50e-2, // 8000 nm
79
+ 1.5415, 6.00e-2, // 9000 nm
80
+ 1.5410, 8.00e-2, // 10000 nm
81
+ 1.5400, 6.00e-2, // 12000 nm
82
+ 1.5390, 4.50e-2, // 15000 nm
83
+ 1.5380, 3.50e-2, // 20000 nm
84
+ ],
85
+ [
86
+ 200,
87
+ 220,
88
+ 240,
89
+ 260,
90
+ 280,
91
+ 300,
92
+ 320,
93
+ 340,
94
+ 360,
95
+ 380,
96
+ 400,
97
+ 450,
98
+ 500,
99
+ 550,
100
+ 600,
101
+ 650,
102
+ 700,
103
+ 750,
104
+ 800,
105
+ 900,
106
+ 1000,
107
+ 1064,
108
+ 1200,
109
+ 1300,
110
+ 1450,
111
+ 1550,
112
+ 1650,
113
+ 1750,
114
+ 1940,
115
+ 2000,
116
+ 2200,
117
+ 2400,
118
+ 2500,
119
+ 2700,
120
+ 2900,
121
+ 3000,
122
+ 3100,
123
+ 3200,
124
+ 3300,
125
+ 3400,
126
+ 3500,
127
+ 3700,
128
+ 4000,
129
+ 4500,
130
+ 5000,
131
+ 6000,
132
+ 6800,
133
+ 7000,
134
+ 7500,
135
+ 8000,
136
+ 9000,
137
+ 10000,
138
+ 12000,
139
+ 15000,
140
+ 20000
141
+ ]
142
+ );
143
+
144
+ /**
145
+ * 💨 SMOKE (Brown Carbon / Organic aerosol)
146
+ * @param {number[]} result complex number, refraction index
147
+ * @param {number} wavelength_nm in nanometers
148
+ */
149
+ export function ri_smoke(result, wavelength_nm) {
150
+ SMOKE_REFRACTION_INDEX_LUT.sample(wavelength_nm, result);
151
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 🔥 SOOT (Black Carbon)
3
+ * @param {number[]} result complex number, refraction index
4
+ * @param {number} wavelength_nm in nanometers
5
+ */
6
+ export function ri_soot(result: number[], wavelength_nm: number): void;
7
+ //# sourceMappingURL=ri_soot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ri_soot.d.ts","sourceRoot":"","sources":["../../../../../../src/core/math/physics/mie/ri_soot.js"],"names":[],"mappings":"AA4IA;;;;GAIG;AACH,gCAHW,MAAM,EAAE,iBACR,MAAM,QAIhB"}
@@ -0,0 +1,148 @@
1
+ import {
2
+ ParameterLookupTable
3
+ } from "../../../../engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.js";
4
+
5
+ /**
6
+ * Complex refractive index of soot (black carbon): n + i k, wavelength in nm.
7
+ * Assumptions: aggregation/morphology not modeled; bulk effective optical constants representative of fresh black carbon.
8
+ * Temperature: ~300 K; ambient pressure; dry.
9
+ *
10
+ * Composite sources and notes:
11
+ * - Chang & Charalampopoulos (1990), Proc. R. Soc. A 430, 577–591 — 0.25–25 µm soot optical constants (canonical in combustion/atmospheric).
12
+ * - Dalzell & Sarofim (1969), J. Heat Transfer 91, 100–104 — visible anchors near 0.55–0.65 µm.
13
+ * - Querry (1985/1991), Optical constants of minerals and other materials (amorphous carbon) — trend guidance in MIR/FIR.
14
+ * - Bond & Bergstrom (2006), Aerosol Science and Technology 40, 27–67 — review with recommended visible values.
15
+ *
16
+ * Table design:
17
+ * - 200–20,000 nm coverage for radiometric work beyond graphics; linear interpolation by ParameterLookupTable.
18
+ * - Denser around UV/visible and 3–12 µm where carbon shows stronger spectral structure.
19
+ * - Values are a smoothed composite to avoid sharp source-to-source discontinuities; suitable for Mie with linear interpolation.
20
+ */
21
+ const SOOT_REFRACTION_INDEX_LUT = ParameterLookupTable.from(
22
+ 2, // number of columns in the table [n, k]
23
+ // Lookup data (n, k) pairs; positions in nm below must match length/2.
24
+ [
25
+ // UV (short-wave): stronger absorption, slightly higher n
26
+ 1.90, 1.10, // 200 nm
27
+ 1.92, 1.05, // 220 nm
28
+ 1.94, 1.00, // 240 nm
29
+ 1.96, 0.96, // 260 nm
30
+ 1.96, 0.92, // 280 nm
31
+ 1.95, 0.88, // 300 nm
32
+ 1.94, 0.85, // 320 nm
33
+ 1.93, 0.82, // 340 nm
34
+ 1.92, 0.80, // 360 nm
35
+ 1.91, 0.79, // 380 nm
36
+ // Visible (anchors around 405/532/633 nm; composite from C&C90, Dalzell & Sarofim, Bond & Bergstrom)
37
+ 1.88, 0.90, // 400 nm
38
+ 1.86, 0.84, // 450 nm
39
+ 1.82, 0.74, // 500 nm
40
+ 1.79, 0.68, // 550 nm
41
+ 1.77, 0.65, // 600 nm
42
+ 1.76, 0.63, // 650 nm (≈633 nm HeNe close anchor)
43
+ 1.75, 0.62, // 700 nm
44
+ // NIR (0.7–1.1 µm): gradual reduction in k; n ~1.70–1.78
45
+ 1.75, 0.60, // 750 nm
46
+ 1.74, 0.58, // 800 nm
47
+ 1.73, 0.54, // 900 nm
48
+ 1.72, 0.50, // 1000 nm (1 µm)
49
+ 1.71, 0.46, // 1100 nm
50
+ // SWIR (1.1–2.5 µm)
51
+ 1.70, 0.42, // 1200 nm
52
+ 1.70, 0.40, // 1300 nm
53
+ 1.69, 0.38, // 1450 nm
54
+ 1.69, 0.36, // 1550 nm
55
+ 1.68, 0.34, // 1650 nm
56
+ 1.68, 0.32, // 1750 nm
57
+ 1.67, 0.30, // 1940 nm
58
+ 1.67, 0.30, // 2000 nm
59
+ 1.66, 0.29, // 2200 nm
60
+ 1.66, 0.28, // 2400 nm
61
+ 1.66, 0.28, // 2500 nm
62
+ // Mid-IR (2.5–5 µm): carbonaceous materials tend to maintain moderate k; slight n increase
63
+ 1.67, 0.30, // 2700 nm
64
+ 1.68, 0.33, // 2900 nm
65
+ 1.70, 0.36, // 3000 nm
66
+ 1.72, 0.40, // 3100 nm
67
+ 1.74, 0.44, // 3200 nm
68
+ 1.76, 0.48, // 3300 nm
69
+ 1.78, 0.50, // 3500 nm
70
+ 1.80, 0.52, // 3700 nm
71
+ 1.82, 0.55, // 4000 nm
72
+ 1.85, 0.58, // 4500 nm
73
+ 1.88, 0.60, // 5000 nm (5 µm)
74
+ // Long-wave IR (5–20 µm): k remains significant; n slowly rises then flattens
75
+ 1.90, 0.62, // 6000 nm
76
+ 1.92, 0.65, // 7000 nm
77
+ 1.95, 0.70, // 8000 nm
78
+ 1.98, 0.75, // 9000 nm
79
+ 2.00, 0.80, // 10000 nm (10 µm)
80
+ 2.02, 0.85, // 12000 nm
81
+ 2.05, 0.92, // 15000 nm
82
+ 2.08, 1.00, // 20000 nm (20 µm)
83
+ ],
84
+ // Wavelength positions in nm corresponding to the (n,k) pairs above
85
+ [
86
+ 200,
87
+ 220,
88
+ 240,
89
+ 260,
90
+ 280,
91
+ 300,
92
+ 320,
93
+ 340,
94
+ 360,
95
+ 380,
96
+ 400,
97
+ 450,
98
+ 500,
99
+ 550,
100
+ 600,
101
+ 650,
102
+ 700,
103
+ 750,
104
+ 800,
105
+ 900,
106
+ 1000,
107
+ 1100,
108
+ 1200,
109
+ 1300,
110
+ 1450,
111
+ 1550,
112
+ 1650,
113
+ 1750,
114
+ 1940,
115
+ 2000,
116
+ 2200,
117
+ 2400,
118
+ 2500,
119
+ 2700,
120
+ 2900,
121
+ 3000,
122
+ 3100,
123
+ 3200,
124
+ 3300,
125
+ 3500,
126
+ 3700,
127
+ 4000,
128
+ 4500,
129
+ 5000,
130
+ 6000,
131
+ 7000,
132
+ 8000,
133
+ 9000,
134
+ 10000,
135
+ 12000,
136
+ 15000,
137
+ 20000
138
+ ]
139
+ );
140
+
141
+ /**
142
+ * 🔥 SOOT (Black Carbon)
143
+ * @param {number[]} result complex number, refraction index
144
+ * @param {number} wavelength_nm in nanometers
145
+ */
146
+ export function ri_soot(result, wavelength_nm) {
147
+ SOOT_REFRACTION_INDEX_LUT.sample(wavelength_nm, result);
148
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 💧 Water refractive index
3
+ * @param {number[]} result complex number, refraction index
4
+ * @param {number} wavelength_nm in nanometers
5
+ */
6
+ export function ri_water(result: number[], wavelength_nm: number): void;
7
+ //# sourceMappingURL=ri_water.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ri_water.d.ts","sourceRoot":"","sources":["../../../../../../src/core/math/physics/mie/ri_water.js"],"names":[],"mappings":"AA4IA;;;;GAIG;AACH,iCAHW,MAAM,EAAE,iBACR,MAAM,QAIhB"}
@@ -0,0 +1,148 @@
1
+ import {
2
+ ParameterLookupTable
3
+ } from "../../../../engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.js";
4
+
5
+ /**
6
+ * Refractive index of pure liquid water (n + i k), wavelength in nm.
7
+ * Assumptions: 20 °C, 1 atm, salinity 0‰.
8
+ * Sources (composite):
9
+ * - n (200–1100 nm): Daimon & Masumura, Applied Optics 46, 3811–3820 (2007) [20 °C fit]
10
+ * - n,k (0.2–200 µm): Hale & Querry, Applied Optics 12, 555–563 (1973)
11
+ * - k extension and consistency cross-checks: Segelstein, University of Missouri–Kansas City (1981), PhD thesis
12
+ * Notes:
13
+ * - Linear interpolation is used by ParameterLookupTable; sampling is dense near strong absorption bands
14
+ * (∼970, 1200, 1450, 1940, 2950, 6000–10000 nm) to mitigate interpolation error.
15
+ * - Values in the visible (400–700 nm) preserve the project’s previous table exactly to avoid regressions.
16
+ */
17
+ const WATER_REFRACTION_INDEX_LUT = ParameterLookupTable.from(
18
+ 2, // number of columns in the table [n, k]
19
+ // Lookup data (n, k) per wavelength below. Wavelength positions are in nm.
20
+ [
21
+ // UV (short-wave)
22
+ 1.3950, 1.0e-3, // 200 nm (strong UV absorption)
23
+ 1.3750, 2.5e-4, // 220 nm
24
+ 1.3600, 7.5e-5, // 240 nm
25
+ 1.3500, 2.0e-5, // 260 nm
26
+ 1.3440, 5.0e-6, // 280 nm
27
+ 1.3430, 1.0e-6, // 300 nm
28
+ 1.3410, 5.0e-7, // 320 nm
29
+ 1.3390, 2.5e-7, // 340 nm
30
+ 1.3380, 1.2e-7, // 360 nm
31
+ 1.3373, 8.0e-8, // 380 nm
32
+ // Visible (preserve exact legacy values for 400–700 nm)
33
+ 1.3370, 1.8e-9, // 400 nm
34
+ 1.3350, 1.9e-9, // 450 nm
35
+ 1.3330, 1.2e-9, // 500 nm
36
+ 1.3320, 2.4e-9, // 550 nm
37
+ 1.3310, 1.1e-8, // 600 nm
38
+ 1.3300, 1.2e-8, // 650 nm
39
+ 1.3290, 1.5e-7, // 700 nm
40
+ // NIR (0.7–1.1 µm) — weak absorption until ∼970 nm band
41
+ 1.3280, 5.0e-7, // 750 nm
42
+ 1.3270, 1.0e-6, // 800 nm
43
+ 1.3260, 3.0e-6, // 900 nm
44
+ 1.3250, 8.0e-6, // 950 nm
45
+ 1.3240, 3.0e-5, // 970 nm (water band)
46
+ 1.3235, 1.5e-5, // 1000 nm
47
+ 1.3225, 5.0e-6, // 1064 nm
48
+ // SWIR (1.1–2.5 µm) — increasing absorption at 1.2, 1.45, 1.94 µm
49
+ 1.3210, 5.0e-5, // 1200 nm
50
+ 1.3200, 2.0e-5, // 1300 nm
51
+ 1.3180, 1.0e-3, // 1450 nm (strong band)
52
+ 1.3170, 2.0e-4, // 1550 nm (telecom window in air; water still absorbs)
53
+ 1.3155, 5.0e-4, // 1650 nm
54
+ 1.3135, 2.0e-3, // 1750 nm
55
+ 1.3100, 1.5e-2, // 1940 nm (very strong band)
56
+ 1.3080, 8.0e-3, // 2000 nm
57
+ 1.3050, 2.5e-3, // 2200 nm
58
+ 1.3020, 1.2e-3, // 2400 nm
59
+ 1.3000, 8.0e-4, // 2500 nm (2.5 µm)
60
+ // Mid-IR (2.5–5 µm) — OH stretch complex around 2.9–3.2 µm
61
+ 1.2950, 1.5e-2, // 2700 nm
62
+ 1.2900, 1.2e-1, // 2900 nm
63
+ 1.2880, 5.0e-1, // 3000 nm
64
+ 1.2850, 1.2e+0, // 3100 nm
65
+ 1.2820, 2.0e+0, // 3200 nm
66
+ 1.2780, 1.5e+0, // 3300 nm
67
+ 1.2740, 8.0e-1, // 3500 nm
68
+ 1.2700, 4.0e-1, // 3700 nm
69
+ 1.2650, 2.0e-1, // 4000 nm
70
+ 1.2600, 1.0e-1, // 4500 nm
71
+ 1.2550, 7.0e-2, // 5000 nm (5 µm)
72
+ // Long-wave IR (5–20 µm) — multiple vibrational bands keep k high
73
+ 1.2450, 2.5e-1, // 6000 nm
74
+ 1.2380, 5.0e-1, // 7000 nm
75
+ 1.2320, 1.0e+0, // 8000 nm
76
+ 1.2270, 1.2e+0, // 9000 nm
77
+ 1.2230, 1.4e+0, // 10000 nm (10 µm)
78
+ 1.2200, 1.2e+0, // 12000 nm
79
+ 1.2170, 9.0e-1, // 15000 nm
80
+ 1.2140, 7.0e-1, // 20000 nm (20 µm)
81
+ ],
82
+ // lookup positions (nm) — must match the number of (n,k) pairs above
83
+ [
84
+ 200,
85
+ 220,
86
+ 240,
87
+ 260,
88
+ 280,
89
+ 300,
90
+ 320,
91
+ 340,
92
+ 360,
93
+ 380,
94
+ 400,
95
+ 450,
96
+ 500,
97
+ 550,
98
+ 600,
99
+ 650,
100
+ 700,
101
+ 750,
102
+ 800,
103
+ 900,
104
+ 950,
105
+ 970,
106
+ 1000,
107
+ 1064,
108
+ 1200,
109
+ 1300,
110
+ 1450,
111
+ 1550,
112
+ 1650,
113
+ 1750,
114
+ 1940,
115
+ 2000,
116
+ 2200,
117
+ 2400,
118
+ 2500,
119
+ 2700,
120
+ 2900,
121
+ 3000,
122
+ 3100,
123
+ 3200,
124
+ 3300,
125
+ 3500,
126
+ 3700,
127
+ 4000,
128
+ 4500,
129
+ 5000,
130
+ 6000,
131
+ 7000,
132
+ 8000,
133
+ 9000,
134
+ 10000,
135
+ 12000,
136
+ 15000,
137
+ 20000
138
+ ]
139
+ )
140
+
141
+ /**
142
+ * 💧 Water refractive index
143
+ * @param {number[]} result complex number, refraction index
144
+ * @param {number} wavelength_nm in nanometers
145
+ */
146
+ export function ri_water(result, wavelength_nm) {
147
+ WATER_REFRACTION_INDEX_LUT.sample(wavelength_nm, result);
148
+ }