Vector
Main

Blackbody problem

""

Contents

Code

set term svg
set termoption enhanced
set encoding utf8
set output 'Black_body.svg'
unset key
set tics nomirror out
set border 3
set xrange [0:6]
set yrange [0:15]

set ylabel "Spectral radiance (kW • sr⁻¹ • m⁻² • nm⁻¹)"
set xlabel "Wavelength (μm)"
set label "5000 K" at 0.45,13.1
set label "4000 K" at 0.6,4.55
set label "3000 K" at 0.8,1.4
set label "Classical theory (5000 K)" at 1.55,11
set grid lc rgb "light-blue"

# length unit is micrometre
c=3e14 # speed of light
h=6.626e-22 # Planck constant
k=1.38e-11 # Boltzmann constant

# Planck curves
p1(x)=1e-6*2*h*c**2/(x**5*(exp(h*c/(x*k*3000))-1))
p2(x)=1e-6*2*h*c**2/(x**5*(exp(h*c/(x*k*4000))-1))
p3(x)=1e-6*2*h*c**2/(x**5*(exp(h*c/(x*k*5000))-1))
p4(x)=1e-6*2*h*c**2/(x**5*(exp(h*c/(x*k*6000))-1))

# Rayleigh-Jeans curve
rj(x)=1e-6*2*c*k*5000/(x**4) 

plot p1(x) lw 2, p2(x) lw 2, p3(x) lw 2, p4(x) lw 2
plot rj(x) lw 2 lc rgb "black"


<< Gnuplot Recipe Trail | Gnuplot Recipe Trail | 3D vector problem >>

Sources:

Darth Kule. Produced by GNUPLOT 4.4 patchlevel 0, background spectrum based on http://commons.wikimedia.org/wiki/File:Linear_visible_spectrum.svg Dedicated to the public domain by the author.
gnuplot 4.2 Copyright (C) 1986 - 1993, 1998, 2004, 2007 Thomas Williams, Colin Kelley
Permission to use, copy, and distribute this software and its documentation for any purpose with or without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation.

Recommended:

Categories: Gunplot Recipes

Tags:


edit

This is a student's notebook. I am not responsible if you copy it for homework, and it turns out to be wrong.

Backlinks

This page is GnuplotRecipe1