using Printf
const k_B = 1.380649e-23
const h = 6.62607015e-34
println("=== QUANTUM AND NANOSCALE THERMODYNAMICS ===")
function landauer_energy(T)
return k_B * T * log(2)
end
function thermal_de_broglie(T, mass)
return h / sqrt(2π * mass * k_B * T)
end
function diffusion_coefficient(T, radius, viscosity)
return k_B * T / (6π * viscosity * radius)
end
println("=== INFORMATION THERMODYNAMICS ===")
println("Landauer's Principle: Energy Cost of Information Processing")
println()
temperatures = [4, 77, 300, 373]
temp_names = ["Liquid He", "Liquid N₂", "Room temp", "Boiling H₂O"]
println("Minimum Energy to Erase One Bit (Landauer Limit):")
println(repeat("-", 60))
@printf "%-15s %8s %15s %15s\n" "Temperature" "T (K)" "Energy (J)" "Energy (eV)"
println(repeat("-", 60))
for (i, T) in enumerate(temperatures)
E_landauer = landauer_energy(T)
E_eV = E_landauer / 1.602176634e-19
@printf "%-15s %8.0f %15.2e %15.2e\n" temp_names[i] T E_landauer E_eV
end
println()
println("Information Processing Insights:")
println("• Colder computers are more energy-efficient")
println("• Quantum computers cooled to millikelvin temperatures")
println("• Modern processors dissipate ~10⁶ times Landauer limit")
println("• Room for dramatic improvement in reversible computing")
println()
println("=== QUANTUM VS CLASSICAL REGIMES ===")
println("Thermal de Broglie Wavelength")
println()
particles = [
("Electron", 9.109e-31),
("Proton", 1.673e-27),
("H₂ molecule", 3.3e-27),
("Virus (100 nm)", 1e-15),
("Dust (1 μm)", 1e-12)
]
T_room = 300
println("Thermal de Broglie wavelengths at T = $T_room K:")
println(repeat("-", 70))
@printf "%-15s %12s %15s %15s\n" "Particle" "Mass (kg)" "λ_thermal (m)" "Quantum?"
println(repeat("-", 70))
for (particle, mass) in particles
λ_th = thermal_de_broglie(T_room, mass)
quantum_regime = λ_th > 1e-10 ? "Yes" : "No"
@printf "%-15s %12.2e %15.2e %15s\n" particle mass λ_th quantum_regime
end
println()
println("Quantum Regime Criteria:")
println("• Thermal wavelength comparable to system size")
println("• Light particles more likely to show quantum effects")
println("• Lower temperatures enhance quantum behavior")
println("• Macroscopic objects are classical")
println()
println("=== NANOSCALE BROWNIAN MOTION ===")
η_water = 1e-3
T_body = 310
nano_objects = [
("Small molecule", 1e-9),
("Protein", 5e-9),
("Virus", 50e-9),
("Bacterium", 1e-6),
("Cell", 10e-6)
]
println("Diffusion in Water at Body Temperature:")
println(repeat("-", 70))
@printf "%-15s %12s %15s %15s\n" "Object" "Radius (m)" "D (m²/s)" "Distance/s (μm)"
println(repeat("-", 70))
for (object, radius) in nano_objects
D = diffusion_coefficient(T_body, radius, η_water)
distance_per_sec = sqrt(2 * D * 1) * 1e6
@printf "%-15s %12.2e %15.2e %15.1f\n" object radius D distance_per_sec
end
println()
println("Nanoscale Transport Insights:")
println("• Smaller objects diffuse faster")
println("• Thermal motion dominates at nanoscale")
println("• Molecular motors work against Brownian motion")
println("• Diffusion-limited reaction rates")
println("• No Reynolds number effects (Stokes flow)")
println()