What ns3-thz-ntn does
thz-ntn is an ns-3 module for sub-terahertz and terahertz non-terrestrial links from 100 GHz to 1 THz, with atmospheric loss built from ITU-R P.676-13 Annex 1 line-by-line absorption over P.835-6 reference atmospheres plus P.838-3 rain, P.840 cloud and fog, and P.618-13 scintillation. It adds ultra-massive MIMO arrays with beam squint, reconfigurable intelligent surfaces, EKF beam tracking, ISAC and inter-satellite links, and exposes the losses as ns-3 PropagationLossModels that attenuate real packets.
Accompanying studyDeviation of Simplified Gaseous Absorption Models From Recommendation P.676-13 on Low-Earth-Orbit Slant Paths From 340 to 850 GHz. Code and data are in this repository.
What it models
The absorption engine, ThzNtnMolecularAbsorption, implements ITU-R P.676-13 Annex 1 with 44 oxygen and 35 water-vapor lines, integrated along a straight ray over the six P.835-6 reference atmospheres; a WaterVapourScale attribute scales the humidity profile for column sweeps. Weather terms follow P.838-3 for rain, P.840 for cloud and fog, and P.618-13 for amplitude and phase scintillation, with P.681-11 land mobile satellite and other per-recommendation reference classes unit-tested against ITU-R values. Free-space loss, pointing error and a composite cascade (ThzNtnChannelModel) complete the analytic channel.
Above the channel, the module provides UPA, UCA and Cassegrain arrays with a DFT codebook and wideband beam-squint loss, a RIS with 20 log10(N) gain under perfect CSI and phase-quantization loss, EKF or ephemeris-based beam tracking with vibration, refraction and latency pointing terms, ISAC debris ranging, inter-satellite link budgets, and alpha-mu fading. ThzNtnPropagationLossModel carries the atmospheric excess loss onto the mmwave NR spectrum channel, where the 3GPP model caps the carrier at 100 GHz; above that, ThzNtnLinkErrorModel decodes IP packets at 300 GHz on a point-to-point link without NR PHY, MAC or HARQ. A RIS can be switched by an xApp through oran-ntn. Geometry comes from SGP4 orbits in ntn-constellation, with 3GPP TR 38.811 and TR 38.821 cited for NTN geometry and TR 38.901 for the terrestrial baseline. The hardware-impairment stage is registered but not yet applied in the cascade.
Measured numbers
Largest deviation of the shipped straight-ray quadrature from a refracted-ray P.676-13 Annex 1 reference
All five window centers (341.5, 409.0, 464.0, 668.5, 849.5 GHz) over the operable domain of 26 realizable P.835-6 atmospheres (PWV 0.5 to 50 mm) and seven elevations from 10 to 90 degrees; deterministic evaluation, no seedsLargest deviation of the flat-Earth cosecant law from the reference
Same window centers and operable domainLargest deviation of the engine from ITU-Rpy
The five window centers at 10, 30 and 90 degrees elevationSlant gaseous loss at the 341.5 GHz and 849.5 GHz window centers
30 degrees elevation, P.835-6 Section 1.1 atmosphere scaled to 10 mm PWVSlant gaseous loss at the 341.5 GHz and 849.5 GHz window centers
30 degrees elevation, high-latitude winter atmosphere at 2 mm PWVC++ sweep points reproduced by a Python transcription of the engine to a relative difference below 1e-7
thz-ntn-absorption-sweep sweeps over the study gridEach number states the run it comes from; the README of the module lists the command that reproduces it.
Standards it follows
| ITU-R P.676-13 | Annex 1 line-by-line gaseous absorption (44 O2 and 35 H2O lines); Annex 2 and P.676-12 used as comparison forms |
| ITU-R P.835-6 | Reference atmospheres for the slant-path integration |
| ITU-R P.838-3 | Rain specific attenuation coefficients |
| ITU-R P.840 | Cloud and fog attenuation |
| ITU-R P.618-13 | Earth-space propagation and amplitude and phase scintillation |
| ITU-R P.681-11 | Land mobile satellite reference model |
| 3GPP TR 38.811 | NTN geometry |
| 3GPP TR 38.821 | NTN geometry |
| 3GPP TR 38.901 | Terrestrial baseline |
New on 6g-ntn.live
The toolkit now runs in the browser at 6g-ntn.live: pick an example of ns3-thz-ntn or any other module, change its parameters, and the real ns-3 binary runs on the server.
Type ./ns3 run with your own arguments; the real binary runs on the server and streams its output.
Open →115 runnable examplesEvery example of the 14 modules, each with a typed parameter form and its measured KPIs.
Open →Live 3D globeReal constellations from CelesTrak elements, propagated with SGP4, with their service and feeder links.
Open →Open datasetsEvery finished run becomes a dataset under CC BY 4.0, with its provenance and configuration.
Open →Validation690 test cases in 41 toolkit suites, and a health check on every example.
Open →Shared scenariosResearchers post a configuration with its parameters and results; anyone can rerun it.
Open →Watch
Watch on YouTube: the NTN Control Center running and visualizing the toolkit examples, in five minutes.
Install
Every module ships in the ready-built container image of the toolkit (version 3.0.1):
docker pull uzairdocker69/ns3-ntn-toolkit:latest
docker run --rm -it uzairdocker69/ns3-ntn-toolkit:latest bash
To build from source, clone ns3-ntn-toolkit, which vendors this module under contrib/, or follow the README of this repository (branch thz-ntn-v4).
Cite
If you use ns3-thz-ntn, please cite the toolkit article (doi:10.1109/OJCOMS.2026.3745010):
@article{uzair2026ns3ntntoolkit,
author = {Uzair, Muhammad and Aldahlan, Bassma G. and Albar, Ali A. and
Althumali, Huda and Alghammas, Adnan},
title = {ns3-ntn-toolkit: An Integrated ns-3 Platform for 6G
Non-Terrestrial Networks},
journal = {IEEE Open Journal of the Communications Society},
volume = {7},
pages = {13440--13467},
year = {2026},
doi = {10.1109/OJCOMS.2026.3745010}
}