73
Canonical Grid model
Physics starter - Radiation
Dimensionless Planck integral with explicit truncation control and the radiance-per-frequency peak.
- Scale
- Small
- Source
- physics-radiation.grid
- Length
- 44 lines
- Collection
- Advanced language
- Level
- Intermediate
- Runtime
- Portable
- Version
- 1.0.0
MODEL "Physics starter - Radiation"
DESCRIPTION "Dimensionless Planck integral with explicit truncation control and the radiance-per-frequency peak."
VERSION "1.0.0"
AUTHOR "Grid Team"
TAGS "physics", "starter", "radiation"
# Dimensionless Planck integral. Upper tail beyond x=40 is below 3e-13.
input UpperLimit = 40
VALIDATE BETWEEN 10 AND 40 MESSAGE "Use a cutoff from 10 to 40 and inspect the omitted-tail bound."
output PlanckIntegral = INTEGRATE((x) => x^3/(EXP(x)-1),0,UpperLimit,1e-11)
output ExactIntegral = PI()^4/15
output IntegralError = ABS(PlanckIntegral-ExactIntegral)
# Nonzero maximum of spectral radiance per unit frequency, not per wavelength.
output FrequencyPeak = ROOT((x) => 3*(1-EXP(-x))-x,1,4,1e-12,200)
output PeakResidual = 3*(1-EXP(-FrequencyPeak))-FrequencyPeak
# Scientific checks and interpretation
output TailBound = EXP(-UpperLimit) * (UpperLimit^3 + 3 * UpperLimit^2 + 6 * UpperLimit + 6) / (1 - EXP(-UpperLimit))
output Radiance = MAKEARRAY(101, 2, (row, col) => col = 1 THEN (row - 1) / 10
ELSE row = 1 THEN 0
ELSE ((row - 1) / 10)^3 / EXPM1((row - 1) / 10))
output Assumptions = "Dimensionless Planck integral with explicit truncation control and the radiance-per-frequency peak. Solver completion alone does not establish global accuracy or physical validity."
output ScenarioGuide = "Save a Baseline input scenario, change an admitted input, inspect numerical checks and the unsmoothed plot, then restore Baseline. Save and reopen a .gridoc archive. Plot selection also accepts the Radiance numeric array; choose its X and Y columns in the chart dialog."
Charts_1!type = "charts"
Charts_1!config = <toml>
version = 1
kind = "charts"
title = "Radiation"
[layout]
x_axis = "Dimensionless frequency"
y_axis = "Dimensionless radiance"
[[charts]]
type = "line"
smooth = false
bind = "Radiance"
x = "0"
y = "1"
label = "Planck integrand"
color = "#2563eb"
</toml>
END MODEL