# NTNUJAVA Virtual Physics LaboratoryEnjoy the fun of physics with simulations! Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/

## Easy Java Simulations (2001- ) => Modern Physics => Topic started by: Fu-Kwun Hwang on February 25, 2007, 02:39:04 pm

 Title: Blackbody radiation curves for different temperatures Post by: Fu-Kwun Hwang on February 25, 2007, 02:39:04 pm Planck's law describes the spectral radiance of electromagnetic radiation at all wavelengths from a black body at temperature T. As a function of frequency ν, Planck's law is written as    $I(\nu,T) = \frac{2 h\nu^3 }{c^2} \frac{1}{e^{h\nu/kT}-1}$ or  (http://upload.wikimedia.org/math/9/7/4/974887ba0f7030f31b7b27b619afde87.png)It can be converted to an expression for I'(λ,T) in wavelength units by substituting ν by c / λ and evaluating   $I'(\lambda,T) = I(\nu,T)\left|\frac{d\nu}{d\lambda}\right|$ or (http://upload.wikimedia.org/math/2/7/a/27aa3105194d765b91f845f50968e7cf.png)$\frac{2 h\nu^3 }{c^2}=\frac{2 h(c\lambda)^3 }{c^2}=\frac{2hc}{\lambda^3}$and from $\nu= c\lambda$, we have$d\nu=-\frac{c}{\lambda^2}d\lambda$so$I(\lambda,T)=\frac{2hc^2}{\lambda^5}\frac{1}{e^{hc/\lambda kT}-1}$ or (http://upload.wikimedia.org/math/1/0/c/10c96a8f2af7d9631a0f4dde5b817b62.png)The above equation is energy per unit wavelength per unit solid angle.This applets will show six black cureves of blackbody radiation curve betwen Tmin and Tmax.Another curve in red is also shown (it's temperature can be adjusted with left slider bar)Maximum wavelength shown can be adjusted with right slider bar.You can use it for study the intensity for blackbody radiation.If you want to study different temperature range, You can change Tmin and Tmax, to change the temperature range,too.The wavelength unit in the simulation is Å (angstrom).-*-[ejsapplet](http://upload.wikimedia.org/math/3/6/c/36c7c70624f4ed44af2f004c87bf22c4.png) is the spectral energy density function with units of energy per unit wavelength per unit volume. Title: Re: Blackbody radiation curves for different temperatures Post by: lookang on March 15, 2009, 08:04:49 pm http://phet.colorado.edu/simulations/sims.php?sim=Blackbody_Spectrum(http://phet.colorado.edu/sims/blackbody-spectrum/blackbody-spectrum-screenshot.png)http://phet.colorado.edu/sims/blackbody-spectrum/blackbody-spectrum-screenshot.pnganother quality simulation from (http://phet.colorado.edu/images/logo-title.jpg)a good applet toojust wondering if it is a good idea to allow temperatures from 300K minimum.i got time to remix for you ;D Title: Re: Blackbody radiation curves for different temperatures Post by: Fu-Kwun Hwang on March 16, 2009, 08:23:07 am If you want to study different temperature range, You can change Tmin and Tmax, to change the temperature range,too.Tmin an Tmax are text field, so you can enter your own range. But the intensity will change a lot.So you might want to change to log scale to view all the range.The yscale can be changed between 0-100 with slider at the right side. Title: Re: Blackbody radiation curves for different temperatures Post by: lookang on March 16, 2009, 08:59:12 pm question: where can i find the equations to verify the calculations used? like wikipedia or other physics sources. known/discovered analyzing your codes:h = PLANCK = 6.6252 E-34h4 = 4.*h*1.e47     = 2.65008.e14                                             // what is this?c =the speed of light = 299 792 458 m / sk =Boltzman k, 1.38E-23 J/Kcst = h*c/(k*1.e-10)  = 1.43.e8                                             // // what is this constant?fT = "h4/((Math.exp(cst/(r*T))-1)*(r*r*r))"what i am trying to do.change the lamda to nanometre nm instead of 1 Ångström    ≡    1×10-10    metre http://en.wikipedia.org/wiki/Metrei am guessing i need to change h4 = 4.*h*1.e46  for the nanometer calculation, i am guessing your calculation are for Ångström metre. am i correct?some references i look at.http://hyperphysics.phy-astr.gsu.edu/hbase/mod6.html#c4(http://hyperphysics.phy-astr.gsu.edu/hbase/imgmod/uvcatas.gif)http://hyperphysics.phy-astr.gsu.edu/hbase/imgmod/uvcatas.gif(http://hyperphysics.phy-astr.gsu.edu/hbase/imgmod/bb7b.gif)http://hyperphysics.phy-astr.gsu.edu/hbase/imgmod/bb7b.gifThanks! Title: Re: Blackbody radiation curves for different temperatures Post by: Fu-Kwun Hwang on March 16, 2009, 10:25:28 pm (http://upload.wikimedia.org/math/1/0/c/10c96a8f2af7d9631a0f4dde5b817b62.png)cst= hc/k; add 1.e-10 because I use Ångström instead of m as unit for length. Title: Re: Blackbody radiation curves for different temperatures Post by: lookang on March 16, 2009, 11:16:04 pm thanks! Title: Re: Blackbody radiation curves for different temperatures Post by: lookang on March 17, 2009, 08:56:12 am another questionis it possible to make the x axis number always 100, 200, 300, 400, nminstead of currently auto calculation now 0.1 , 0.2 , 0.3 , 0.4 X10^3 nmwhat is desired(http://www.phy.ntnu.edu.tw/ntnujava/index.php?action=dlattach;topic=427.0;attach=808)what is current (http://www.phy.ntnu.edu.tw/ntnujava/index.php?action=dlattach;topic=427.0;attach=806)i tried changing the X format to 0000 but doesn't seem to work the way i hoped.(http://www.phy.ntnu.edu.tw/ntnujava/index.php?action=dlattach;topic=427.0;attach=810) Title: Re: Blackbody radiation curves for different temperatures Post by: Fu-Kwun Hwang on March 17, 2009, 09:00:25 am I guest you were using auto-scale in the drawingPanel.Set up your xmin,xmax properly. You should be able to get what you want.Try it by yourself first. You will get to know it better. Title: Re: Blackbody radiation curves for different temperatures Post by: lookang on March 17, 2009, 09:21:43 am but is it possible to display 4000 instead of 4.0x10^3 ?look at my attached pictures  ;Dit is already not autoscale X,rmin and rmax are already setup rmin = 50rmax = 3000ok i try again :) Title: Re: Blackbody radiation curves for different temperatures Post by: Fu-Kwun Hwang on March 17, 2009, 10:02:28 am There are X Format/Y Format properties, but I can not find any document at paco's web site.http://www.um.es/fem/EjsWiki/index.php/Main/ElementsPlottingPanelI have never used that before. If I really need it, I will use drawingPanel  instead and I can draw those grid lines/labels with build in GUI elements.May be it can be done by setting proper value for X Format, but I do not know. Sorry! Title: Re: Blackbody radiation curves for different temperatures Post by: lookang on March 17, 2009, 11:42:39 am Not to worry. Maybe it can't be done yet. I will explore abit more and move on to other parts of XML . Title: Re: Blackbody radiation curves for different temperatures Post by: lookang on March 18, 2009, 01:20:09 pm yes it is confirm it currently cannot be done http://www.um.es/fem/EjsWiki/index.php/FeedbackEn/00026quote:Resolution    The axes do not allow formatting the ticks. The Format X property refers to the way the coordinates of the point appear (in a yellow box at the lower left corner of the panel) when you click on a point in the panel. unquote:BTWI am puzzled by the equation used.I look at the equation (http://upload.wikimedia.org/math/1/0/c/10c96a8f2af7d9631a0f4dde5b817b62.png) and i look at the equation in the XML fT = "h4/((Math.exp(cst/(r*T))-1)*(r*r*r))"shouldn't fT = "2*h*c*c/((Math.exp(cst/(r*T))-1)*(r*r*r*r*r))" ?strangely i tried to implement the new fT ="2*h*c*c/((Math.exp(cst/(r*T))-1)*(r*r*r*r*r))" but the graph is very low and flat and near zero in value. Title: Re: Blackbody radiation curves for different temperatures Post by: Fu-Kwun Hwang on March 18, 2009, 05:53:53 pm The above equation is a normalized function, i.e., integration will give you 1.So you can multiple it by any number. If you change the y-axis to log-scale, you will know how big/small it is. Title: Re: Blackbody radiation curves for different temperatures Post by: lookang on March 18, 2009, 07:23:29 pm Quote from: Fu-Kwun Hwang on March 18, 2009, 05:53:53 pmThe above equation is a normalized function, i.e., integration will give you 1.So you can multiple it by any number. ok i understand normalized function http://mathworld.wolfram.com/NormalDistribution.htmlok i also understand the area under this normalized function is 1but i am  puzzled by the missing r*r.equation on http://en.wikipedia.org/wiki/Planck%27s_law (http://upload.wikimedia.org/math/1/0/c/10c96a8f2af7d9631a0f4dde5b817b62.png) equation in your XML : fT = "h4/((Math.exp(cst/(r*T))-1)*(r*r*r))"notice your XML : fT has only r*r*r but the equation on wikipedia has r*r*r*r*runless when normalized the r*r is absorbed? then it make sense to me now! I don't really know why now but at least i can accept the logic. (it that correct ?)......hahaha.Quote from: Fu-Kwun Hwang on March 18, 2009, 05:53:53 pmIf you change the y-axis to log-scale, you will know how big/small it is.log scale i understand. i try to experiment more :)Maybe i lack the prior knowledge, sorry! ;D i don't remember encountering this equation (http://upload.wikimedia.org/math/1/0/c/10c96a8f2af7d9631a0f4dde5b817b62.png)for black body radiation, only vaguely rememberStefan–Boltzmann law Main article: Stefan–Boltzmann lawThis law states that amount of thermal radiations emitted per second per unit area of the surface of a black body is directly proportional to the fourth power of its absolute temperature. The total energy radiated per unit area per unit time j^{\star} (in watts per square meter) by a black body is related to its temperature T (in kelvins) and the Stefan–Boltzmann constant σ as follows:       (http://upload.wikimedia.org/math/6/5/b/65b752b1d64dee1b8dc63df6b6228c24.png) where sigma=5.67 x 10-8Wm-2K-4http://en.wikipedia.org/wiki/Black_body Title: Re: Blackbody radiation curves for different temperatures Post by: Fu-Kwun Hwang on March 18, 2009, 09:44:08 pm Sorry! It should be proportion to λ-5. The previous version was not correct. It is fixed now. Title: Re: Blackbody radiation curves for different temperatures Post by: lookang on April 12, 2009, 07:37:28 pm hi prof, based on your new equationswhat is the unit of the intensity?http://phet.colorado.edu/simulations/sims.php?sim=Blackbody_SpectrumI am trying to verify both your equations with the (http://phet.colorado.edu/sims/blackbody-spectrum/blackbody-spectrum-screenshot.png)phet has the units of MW/m^2/µ.mcan explain what is your applet's?Thanks!attached is my remix copy of your original first version which i modify by looking at the 2nd version ;D Title: Re: Blackbody radiation curves for different temperatures Post by: Fu-Kwun Hwang on April 12, 2009, 10:17:02 pm I modified the code again. The unit for the intensity is change to W/(m2-Å), where Å is angstrom 10-10m. Title: Re: Blackbody radiation curves for different temperatures Post by: lookang on April 13, 2009, 10:28:16 am Quote from: Fu-Kwun Hwang on February 25, 2007, 02:39:04 pm$I(\lambda,T)=\frac{2hc^2}{\lambda^5}\frac{1}{e^{hc/\lambda kT}-1}$ or (http://upload.wikimedia.org/math/1/0/c/10c96a8f2af7d9631a0f4dde5b817b62.png)The above equation is energy per unit wavelength per unit solid angle.(http://upload.wikimedia.org/math/3/6/c/36c7c70624f4ed44af2f004c87bf22c4.png) is spectral energy density function with units of energy per unit wavelength per unit volume.Question1:In school, i taught intensity = power / area.so actually what the y-axis is displaying is intensity/ wavelength ?(http://upload.wikimedia.org/math/3/6/c/36c7c70624f4ed44af2f004c87bf22c4.png) is spectral energy density function with units of energy per unit wavelength per unit area volume.Suggestion:Should the applet called it energy density function with units of energy per unit wavelength per unit areaQuestion2:in your current XMLeightpihc2 = 8*pi*h*c*c*1.e40but i don't understand why (http://upload.wikimedia.org/math/3/6/c/36c7c70624f4ed44af2f004c87bf22c4.png) has only 1 c, if you code is 2 c'sIs the image wrong?Question3:what is the url of the wikimedia.org? for the picture http://upload.wikimedia.org/math/3/6/c/36c7c70624f4ed44af2f004c87bf22c4.pngmaybe i can go read a bit to understand moreWhere did you find this equation :)i look through http://en.wikipedia.org/wiki/Thermal_radiationhttp://en.wikipedia.org/wiki/Black_bodybut no (http://upload.wikimedia.org/math/3/6/c/36c7c70624f4ed44af2f004c87bf22c4.png) Title: Re: Blackbody radiation curves for different temperatures Post by: lookang on April 13, 2009, 09:34:40 pm ok i found out Question3http://en.wikipedia.org/wiki/Planck%27s_law Title: Re: Blackbody radiation curves for different temperatures Post by: Fu-Kwun Hwang on April 13, 2009, 10:38:36 pm What is shown in the simulation is (http://upload.wikimedia.org/math/1/0/c/10c96a8f2af7d9631a0f4dde5b817b62.png).It is the emitted power per unit area of emitting surface, per unit solid angle, and per unit wavelength (in unit of Å :angstrom). If integral over all solid angle, it need to be multipled by 4*π. Title: Re: Blackbody radiation curves for different temperatures Post by: lookang on April 14, 2009, 10:15:55 am oic....thanks for the clarification.by the way, i being trying to figure out how to add text to the AnalyticCurve Family to showdynamically on the plottingpanel.TS = 1000TS = TS=..TS= 6000Any tips which text do i used? A 2D text ? or a set of 2D text?I am having difficulty nailing dynamically (http://www.phy.ntnu.edu.tw/ntnujava/index.php?action=dlattach;topic=427.0;attach=971)the position of the text to be at the peak of the function fTi suspect conceptually, i need to differentiate fT w.r.t. $\lambda \$, equate to zero for the turning point for the highest position PosX, sub back to get the PosY. But i dunno how to do in programming. the end result is something like this(http://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/Wiens_law.svg/300px-Wiens_law.svg.png)Thanks for your help.I notice you are doing of things with other members, keep up the good work:) Title: Re: Blackbody radiation curves for different temperatures Post by: Fu-Kwun Hwang on April 14, 2009, 10:43:45 am If TS[n] are strings to be displayed at TX[n], TY[n] (where TX[n],TY[n] are coordinate for the string-- you need to calculate those in a loop.)Use TextSet instead of adding Text one by one.Assign:# of Elements: nPos X: TxPos Y: Ty Text : TSOffset: WESTPixel Size: trueYou can calculate the differentiation directly by yourself or find out equation for the highest point from wiki page: Tmax=constant/lambda. Title: Re: Blackbody radiation curves for different temperatures Post by: lookang on April 14, 2009, 04:54:41 pm amazing ! i will study you codes with the new additionals of text.It is really cool now! will report back my findings  ;D Title: Re: Blackbody radiation curves for different temperatures Post by: lookang on April 14, 2009, 10:08:50 pm amazing codes you have.My attempt at making a remix for nanometre 10-9 m instead of angstrom 10-10 m.http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1037.0basic code needed to make text appear are:// code to appear Tmax top position// taken from http://en.wikipedia.org/wiki/Planck%27s_law// This function peaks for hc = 4.97λkT, a factor of 1.76 shorter in wavelength (higher in frequency) than the frequency peak. It is the more commonly used peak in Wien's displacement law.// xm is λ where peak occurs1.  xmred=TXred=h*c/(4.97*k*T)*1.e9; // cos lookang doing nm instead of Am2. TMSGred="T="+((int)((T*10+0.5)/10.))+"K, peak at "+(int)((xmred*10+0.5)/10.) +" nm";3.  TYred=twohc2/((Math.exp(cst/(xmred*T))-1)*(xmred*xmred*xmred*xmred*xmred));4. Text properties are:PosX is  TXredPosY is TYredPixel Size is TrueText is %TMSGred%Amazing learning from this codes, lucky you made the text, i still can't create these codes myself.....sigh :-[Thanks!