NTNUJAVA Virtual Physics Laboratory
Enjoy 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 27, 2006, 10:25:57 am

Title: Photoelectric effect
Post by: Fu-Kwun Hwang on February 27, 2006, 10:25:57 am

You can perform a simulated photoelectric effect experiment with this java applet.
You can adjust 1. photon energy 2. light intensity 3. work function of the metal and 4. the voltage of the circuit (can be positive or negative).
The I-V current will be shown. The default mode is auto (The voltage of the circuit will start from cutoff voltage  and increase with 0.3V every 10 seconds.) .
The simulation will be paused when it is more than 2.5 V.
You can adjust one of the parameters and press the play button again.

You can turn off "auto" mode and try the experiment by yourself,too.

Title: topic342
Post by: adlcalistes on February 28, 2006, 12:10:58 am
Dear sir
Its marvelous, and knew that you would be able to do this. This simulation will help many teachers to explain the photoelectric effect. Thank you so much for your kind coorporation and devotion towards the education.
Thank you sir.

Title: topic342
Post by: mustafadmrc on June 01, 2006, 04:42:44 am
That's very very good. Thank you so much for this applet. Everyone can easily understand  this with this application. Thank you mr Hwang...

Title: topic342
Post by: kusman on October 01, 2006, 02:30:17 pm


first of all, the simulation is super! There is only a problem:  When I choose "load ejs as signet applet", almost all the elements are not active in the ejs window. Additionaly, when I try to run the simulation (in order to generate a new one), the following message appears:


Äçìéïõñãßá áñ÷åßï?ðñïóïìïßùóçò C:Documents and SettingsuserEjs.tmpSimulationsphotoelectriceffect.appphotoelectriceffect.java ...
C:Documents and SettingsuserEjs.tmpSimulationsphotoelectriceffect.appphotoelectriceffect.java:450: illegal escape character
? l_workfunction="¥¨ç¼?0.0 eV";?// > ÐñïóáñìïãÞ.chinese:11
?????????? ^
1 error
ÐáñïõóéÜóôçê?ëÜèï?êáôÜ ôç ìåôáãëþôôéóç!

"Äçìéïõñãßá áñ÷åßï?ðñïóïìïßùóçò" means: Generation of new simulation

"ÐáñïõóéÜóôçê?ëÜèï?êáôÜ ôç ìåôáãëþôôéóç!" means: Error during translation.

I need your help because I intend to translate the simulation in greek (I have already done the translation of the fiber optics simulation). ?/p>

Thank you in advance.

Manolis Kousloglou

electronic physicist


Title: Re: Photoelectric effect
Post by: Fu-Kwun Hwang on March 19, 2007, 02:56:37 pm
The problem is from function zh_tw(), this is a function I used to create translation of Strings used in the program into Chinese characters.

Because some Chinese word use escape characters. It work fine with my computer because I have a Chinese operating system.

What you can do is change those special characters into your local language version if you want to make translation for local language version.
(You can also modified the name of the function, e.g. function void greece() )
It should work fine when you disable the page which cause error or translate those into you local language formate. If you want to know the meaning of those string, check out the Variables pages (under tab: language)
Add <param name=init value='greece()'> before the end of applet tag i.e. </applet>
This will tell EJS to execute function greece when it is loaded.

Title: Re: Photoelectric effect
Post by: Fu-Kwun Hwang on March 19, 2007, 03:23:35 pm
This is a message I have received today.
> Many thanks, Mr Hwang, for this excellent simulation.  I have used a couple
previously, but this surpassed them in complexity, e.g. the velocity arrows on
the electrons - brilliant!  However, I have one query:  when changing the
photon energy (and therefore the light frequency etc.) but maintaining the
intensity, the maximum current (i.e. for positive voltages) is the same in
your simulation, but surely the same intensity means the same energy arriving
per second and if that energy is coming in larger quanta, that means there are
fewer photons;  fewer photons means fewer photoelectrons which means lower current.

Bob Haythorne

In the current verison:
The slider for "Light Intersity" does not really mean "light intensity", but for "# of emitted photons per second".
So that it is a variable independent of "photon energy".
That was what I had in mind when I designed it.

Will it be more difficult for students if it really mean "light intensity"?
In this case: I will have to change the # of emitted photon when user change photon energy while keep light intensity the same.
Because light intensity is proportional to (# of photon)* (photon energy).

What is your suggestions:

Should I change the lable to "average # of photon per second" (photon current)?
Or should I keep the "light intensity", but I need to change the "# of emitted photon" when "photon energy" is modified (and light intensity is not changed)

Title: Re: Photoelectric effect
Post by: Fu-Kwun Hwang on March 19, 2007, 05:17:54 pm
Haythorne, Bob (WIM) Staff :
> > Thank you, Mr Hwang.  I think it is probably better (and easier for you,not
> > having to rewrite the actual calculation software) to relabel it "No. of
> > photons per second".  What we need to stress to students is the idea of it
> > being what I call a "one on one" interaction, which is much clearer if the
> > control simply adjusts the number of photons.  It would then be up to
> > teachers of bright students (I teach in a very selective school) to ask what
> > would happen if the true intensity remained constant whilst the photon
> > energy were changed as a way of extending them.  This is a much harder
> > point, after all.
> >
> > Many thanks for your discussion and, again, for your excellent software.
> >
> > Bob Haythorne

According to the above suggestion: Title for the slider bar has been modified.
From "Light Intensity=" to "No of photon per second=".
Thank you Bob!

Title: Re: Photoelectric effect
Post by: Fu-Kwun Hwang on August 02, 2007, 09:40:31 am
Some one sent me an email with the following questions:
Dear Sir
Thankyou for the excellent Photoelectric effect applet which has helped my students immensely.
I think ther may be a small bug or two:
(1) When I click play, the voltage jumps to the cut-off voltage (though it would be nice if it started at a pre set value of my choice), and shows zero current. Then the next voltage is shown (0.3 more than the cut-off voltage), but current is still zero. If the first voltage was the cut-off voltage*, the next voltage should produce a current greater than zero.
* I am assuming the first voltage is the cut-off voltage, as it equals the photon energy - work function (KEmax ejected electron = Vcut-off
(2) If a high photon energy is selected (e.g. 4 eV), the horizontal axis fails to show the cut-off voltage.

It is not the bug of the simulation. It is because I want to simulate the real experiment as much as possible.
So several parameters are generated with random number.
In real case, there might be more than 10^15 photo electrons. But I can only use hundreds of simulated electrons.
So I only calculated the current at the end of each turn. (The current was calculated with how many electron reach another side in a fixed period-10 seconds.)
That is why the current did not show up at the moment when the voltage change. It take time to get a better  average.
If I calculated it with shorter interval (1 second), you will find the value changing all the time. (Student might be more confused). I will leave this to the teacher to explain it. Or any one has a better suggestion?

Look at the simulation in another way: The time scale in the simulation is less than ns (correspond to 1s in real life, so wait for a few second to get the averaged current is required.).
I think we should teach our students that experiment measurement data are mostly average value within finite time(or space) interval(The interval could be very small, but it is not a mathematic point in the time/space scale)

If you un-check automatic check box. Then, it will do what you want.
When it was checked, it will try to do the whole experiment (select
appropriate voltage at different time) for you automatically.

Title: Re: Photoelectric effect
Post by: Karthik Reddy on January 24, 2008, 03:49:42 pm
I always had a doubt with respect to photoelectric effect. We assume that only one photon strikes an electron. Why can't there be a case where two or more photons strike an electron at the same time thus giving away all its energy to the electron. Now if the energy of a single photon isn't enough for the electron overcome the surface potential and if energy from 2 photons( on addition) is enough, then the electron should be liberated. I believe this should be possible if a very very high intensity light is used.

Also whats the time it takes for the energy transfer from photon and electron( there must a very small amount of time atleast)?

Waiting for your reply,

Title: Re: Photoelectric effect
Post by: Fu-Kwun Hwang on January 24, 2008, 10:05:25 pm
Yes. I think it is possible that two photons strike an electron at the same time. However, as you have pointed out the probability is much smaller compared to one photon strikes an electron.
Have you estimated the so called "very very high intensity"?  (I do not know how much intensity is needed in order to produce measurable effect!) Some model need to be created to estimate the required intensity.

Title: Re: Photoelectric effect
Post by: DR PRANAV BARDAPURKAR on January 29, 2009, 10:21:57 pm
Dear Sir,
I could download the file for offline use, but could not run it. I have WINRAR installed on my PC. It only "unzips" the file but HOW TO RUN???
I am just a Physics teacher, don't know much about programming
Pl Help

Dr Pranav Bardapurkar

Title: Re: Photoelectric effect
Post by: Fu-Kwun Hwang on January 29, 2009, 10:33:21 pm
Open the html file with your browser to view it.
Actually, I just updated all my EJS simulations to latest version.
You will find jar file if you download it again. You can double click the file to run it if you have JRE installed!

However, if you have WINZIP/WINRAR installed. It will change the default program to open the jar file from java program into WINRAR.

You can change the default program if you know how to change the default (in control panel).
The easiest way is to download and re-install Java Run time (http://www.java.com/en/download/manual.jsp) again.

Title: Re: Photoelectric effect
Post by: lookang on July 24, 2009, 04:09:14 pm
Hi Prof

what does this do?
public java.awt.Color setColor () {
 int r=0,g=0,b=0;
 r=(autocount %2)*240;
 g=(autocount/2 %2)*240;
 b=(autocount/4 %2)*240;
 return new java.awt.Color(r,g,b,160);

I dont see any color change when i explore the applet.

Title: Re: Photoelectric effect
Post by: Fu-Kwun Hwang on July 24, 2009, 05:38:34 pm
There is a button labeled as "changeColor".

Title: Re: Photoelectric effect
Post by: lookang on July 27, 2009, 02:39:07 pm

Title: Re: Photoelectric effect
Post by: ahmedelshfie on May 15, 2010, 12:28:28 am
Prof Hwang have a problem in jar file and XML file about Photoelectric effect
Is not work because i think Chinese code in simulation.. work with me after i delet Chinese code
I think have mix between Chinese code and ebglish code
May members download and cant join simulation  :-\

Title: Re: Photoelectric effect
Post by: Fu-Kwun Hwang on May 16, 2010, 11:07:20 am
This simulation was designed before EJS adding string translation function.
So I add my own code to help user translate string inside EJS.
Now, those strings can be modified/translated in downloaded jar file.
The source code has been modified and those strings related Chinese characters has been removed.
You can download latest version and try it again!

Title: Re: Photoelectric effect
Post by: ahmedelshfie on May 18, 2010, 01:18:26 am
when i delete Chinese code from last time is work very well
And no have any problem more
Thanks prof

Title: Photoelectric effect
Post by: Femida on April 10, 2015, 07:41:17 am
I have, but I want to know whether it is the lone opinion of these brothers, or if its really this groupie effect that Im beginning to suspect.

Thats whats prompted me to post - because of the discussions I have had with the good brothers.