NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
November 24, 2017, 02:22:08 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Give me a standpoint and I will move the earth. ...Archimedes (287-212BC)
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

Pages: [1]   Go Down
  Print  
Author Topic: Ejs Open Source 2 Charge Model with Field Vector, Field Lines, Potential Visual  (Read 14803 times)
0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
on: September 30, 2010, 10:22:58 pm »

Ejs Open Source 2 Charge Model with Field Vector, Field Lines, Potential Visualization Representation Java Applet by Hwang Fu-Kwun. I did not make this, i only slightly edited it.


reference:
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=539.new#new

You can drag either charge and find out the new electric Field Vector, Field Lines, Potential distribution, need to release the charge for simulation to recalculate.


The field line are calculated in real time. However, please remember field line is not the same as trajectory for a test charge move in the same field.
You can add test charge if the check box were checked and watch the trajectory of test charge.

It is easy to draw those vectors which represent electric field at different positions.
Because we can calculate the electric field with \vec{E}=\frac{kq_1}{r_1^2}\hat{r_1}+ \frac{kq_2}{r_2^2}\hat{r_2}.
However, do you know how those field lines were calculated?

Hint: The tangential components of electric field line is the same as the direction of electric field at the same point.
Answer is
Biot–Savart law ! http://en.wikipedia.org/wiki/Biot%E2%80%93Savart_law

Embed a running copy of this simulation

Embed a running copy link(show simulation in a popuped window)
Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
  • Please feel free to post your ideas about how to use the simulation for better teaching and learning.
  • Post questions to be asked to help students to think, to explore.
  • Upload worksheets as attached files to share with more users.
Let's work together. We can help more users understand physics conceptually and enjoy the fun of learning physics!


« Last Edit: February 20, 2013, 01:04:34 pm by lookang » Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #1 on: September 30, 2010, 10:27:08 pm »

changes

1 color scheme
2 reposition Q1 and Q2 to correspond to the same side of the slider with color scheme, follow the physlet color scheme
3 Potential = Contour, rename
4 text Q1 and Q2
05 august
added the field lines arrow heads from http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=539.new#new
add more functions in terms of the slider options



*** There are 4 more attached files. You need to login to acces it!
« Last Edit: August 05, 2011, 03:49:04 pm by lookang » Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #2 on: August 05, 2011, 03:49:42 pm » posted from:SINGAPORE,SINGAPORE,SINGAPORE

05 august
added the field lines arrow heads from http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=539.new#new
add more functions in terms of the slider options

finished remixing!
enjoy


reference:
Dhasthagheer Akbhar
I need example EJS simulation which used "Model methods to control EJS applets using Java Script" . If I look the code, it will help me lot. I am developing physics simulation for 6 th std students to learn physics interactively. Thanks in advance......

please download the attachment called ejs_group.zip
which has a html file on the simulation inside the folder
it has the java script generated from Ejs that controls the simulation


*** There are 1 more attached files. You need to login to acces it!
« Last Edit: August 05, 2011, 05:10:01 pm by lookang » Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #3 on: September 07, 2011, 03:16:31 am » posted from:SINGAPORE,SINGAPORE,SINGAPORE

additional changes, added on 07 September 2011

added value of potential to be shown adapted codes from http://www.compadre.org/OSP/items/detail.cfm?ID=11443 Point Charge Electric Potential Model written by Wolfgang Christian
// adapted from http://www.compadre.org/OSP/items/detail.cfm?ID=11443
// adapted from http://www.compadre.org/OSP/items/detail.cfm?ID=11443
public void potentialMessage () {
  double xm=_view.DrawingPanel.getMouseX(); // mouse x-location
  double ym=_view.DrawingPanel.getMouseY(); // mouse y-location
  double v=0;
// for(int p=0; p   double dx=xm-x1; // for first charge // x-separation from grid point
   double dy=ym-y1; // y-separation from grid point
   double r2=dx*dx+dy*dy; // charge to grid point distance squared
   double dx2=xm-x2; // for second charge // x-separation from grid point
   double dy2=ym-y2; // y-separation from grid point
   double r22=dx2*dx2+dy2*dy2; // charge to grid point distance squared
  
   if(r2==0||r22==0){ // check for singularity
   v=Double.NaN; // field is not defined at singularity
// break; // break from loop
   }else{
   v = k*q1/Math.sqrt(r2)+k*q2/Math.sqrt(r22); // add scalar potential
// Evalue = G*q1/r2+G*q2/r2;
   } // end of if statement
// } // end of charge loop
  dragMsg="V = "+_view.format(v,"0.0E0")+ " J/C";
// dragMsgE="g = "+_view.format(Evalue,"0.0E0")+ " N/kg";
  
}


added value of field strength to be shown redesigned by myself with reference and using http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=539.0
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1968.0 by Fu-Kwun Hwang.

// adapted from http://www.compadre.org/OSP/items/detail.cfm?ID=11443
// adapted from http://www.compadre.org/OSP/items/detail.cfm?ID=11443
public void fieldMessage () {
  double xm=_view.DrawingPanel.getMouseX(); // mouse x-location
  double ym=_view.DrawingPanel.getMouseY(); // mouse y-location
  double Evalue=0;
// for(int p=0; p   double dx1=xm-x1; //first charge // x-separation from grid point
   double dy1=ym-y1; // y-separation from grid point
   double r12=dx1*dx1+dy1*dy1; // charge to grid point distance squared
   double dx2=xm-x2; //second charge // x-separation from grid point
   double dy2=ym-y2; // y-separation from grid point
   double r22=dx2*dx2+dy2*dy2; // charge to grid point distance squared
double dx=q1*dx1/(r12*Math.sqrt(r12))+q2*dx2/(r22*Math.sqrt(r22));
double dy=q1*dy1/(r12*Math.sqrt(r12))+q2*dy2/(r22*Math.sqrt(r22));
double d=Math.sqrt(dx*dx+dy*dy);
double Evaluex=dx;
double Evaluey=dy;
//double Evalue = Math.sqrt(Evaluex*Evaluex+Evaluex*Evaluex);
 if(r12==0||r22==0){ // check for singularity
   Evaluex=Double.NaN; // field is not defined at singularity
   Evaluey=Double.NaN;
// break; // break from loop
   }else{
   Evaluex=k*dx;
   Evaluey=k*dy;
Eangle = Math.atan2(Evaluey,Evaluex)*180/pi;
// v = G*q1/Math.sqrt(r2)+G*q2/Math.sqrt(r2); // add scalar potential
   Evalue = Math.sqrt(Evaluex*Evaluex+Evaluey*Evaluey);
   } // end of if statement
 // } // end of charge loop
// dragMsg="V = "+_view.format(v,"0.0E0")+ " V";
  dragMsgEx="Ex = "+_view.format(Evaluex,"0.0E0")+ " N/C";
   dragMsgEy="Ey = "+_view.format(Evaluey,"0.0E0")+ " N/C";
   dragMsgE="|E| = "+_view.format(Evalue,"0.0E0")+ " N/C at angle =" +_view.format(Eangle,"000") +" degree to +x-axis counterclockwise";
   }


Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #4 on: January 09, 2013, 10:58:06 am » posted from:SINGAPORE,SINGAPORE,SINGAPORE

got a request from teacher

We are doing a PLC project cum lesson study on E-field using Java simulation as one of the ICT tool, in 3-4 weeks time.

We would like to request for your help to make the following modifications to the EJS:

1. ability to enter values instead of sliding bars.
done

2. What is the purpose of value of m=2.0?
to experience inertia, F = m*a, so F constant, m double, a halved

3. ability to show at a point X, the E-field due to charge A, E-field due to charge B and thus the resultant field.
added E1 and E2 and E with selectable check-box to show, only when m is selected


4. if possible (will be most ideal), can show E-field lines due to 3 charges. It appears in 2008 specimen paper.
i cannot do this, maybe you can show another applet
http://www.compadre.org/osp/items/detail.cfm?ID=9412





I have attached the .jar file for your reference.

Thank you.


*** There are 2 more attached files. You need to login to acces it!
« Last Edit: January 11, 2013, 10:17:30 am by lookang » Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #5 on: January 28, 2013, 02:48:22 pm » posted from:SINGAPORE,SINGAPORE,SINGAPORE

more discussion with teacher


My team have tested the EJS when designing our worksheet.
 
We find the following issues with the EJS.......
Error in field lines (refer to attached image):
1. The field lines are not drawn correctly. Everytime I vary the number of field lines, a different error in the field lines will appear.
Also, chances of error is particularly high if i use the slider bar to change the number of field lines. Error will likely occur when the EJS recalculate the field lines.
we solved the issue by allowing the Q2 to draw the field lines at different starting positions


 
Aesthetic:
1. colour scheme: can we request for light background contrasted with dark arrows and field lines.

background is actual an equal potential scalar plot, the sim now remembers what the student select, u can also disable it for a white background.
field lines are now black and thick.


 

2. Hide options to change colour of arrows, field lines and background. We felt it is not necessary for students to be able to change colour of arrows, field lines and background.


 
Thank you.


* bug1.PNG (92.17 KB, 628x394 - viewed 394 times.)

* bug2.PNG (92.3 KB, 628x394 - viewed 425 times.)
« Last Edit: January 28, 2013, 03:17:37 pm by lookang » Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #6 on: January 30, 2013, 10:17:09 am » posted from:SINGAPORE,SINGAPORE,SINGAPORE

more discussion with teacher.

teacher disagree with the simulation as it shows field lines intersecting the null point in the center.
an example is this java applet from a website instead.
http://surendranath.tripod.com/Applets/Electricity/FieldLines/EFL.html

The imperfection is resolved. Enjoy
http://surendranath.tripod.com/Applets/Electricity/FieldLines/EFL.html is actually 2 fixed points with fixed lines, may not be so ‘inquiry enabled’.


i am not sure if this is correctly represented in http://surendranath.tripod.com/Applets/Electricity/FieldLines/EFL.html when
Q1 =1, Q2 = 5*Q1 for example.


* bugcharge.PNG (81.63 KB, 628x394 - viewed 400 times.)

* solution.PNG (111.76 KB, 640x364 - viewed 422 times.)

* correct_question_mark_2013-01-30_1110.png (481.43 KB, 1278x833 - viewed 405 times.)
« Last Edit: January 30, 2013, 10:25:09 am by lookang » Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #7 on: January 30, 2013, 10:23:24 am » posted from:SINGAPORE,SINGAPORE,SINGAPORE

more discussion with teacher


Can we have a centre line joining the +ve and -ve charges?

done.
Centre field line is drawn for +- case but missing in ++ or – cases.
I don’t understand why 3 more lines (first picture), I only understand the centre line (2nd picture).
The current field lines are drawn starting at equal distance around the circumference of the charge (scientifically accurate), so to get more lines, select a higher number of lines to draw.



* request2013-01-30_1125.png (124.83 KB, 655x527 - viewed 444 times.)

* 2request_2013-01-30_1125.png (121.02 KB, 636x505 - viewed 427 times.)

* Ejs_Open_Source_2_Charge_Model_with_Field_Vector,_Field_Lines,_Potential_Visual_2013-01-30_1128.png (25.25 KB, 608x609 - viewed 415 times.)
Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #8 on: January 30, 2013, 11:05:24 am » posted from:SINGAPORE,SINGAPORE,SINGAPORE

tried to update the top post but cannot take the 12 version.

testing here Upload new EJS jar file.

ok it does not work now.
Hi prof Hwang, can check ?

i attached as attachment for your testing


*** There are 1 more attached files. You need to login to acces it!
« Last Edit: January 30, 2013, 11:07:24 am by lookang » Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #9 on: February 01, 2013, 12:58:19 pm » posted from:SINGAPORE,SINGAPORE,SINGAPORE

trying to add field lines as function of Q



*** There are 1 more attached files. You need to login to acces it!
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #10 on: February 07, 2013, 12:24:13 pm » posted from:,,Satellite Provider

Try to help you upload modified jar file.

Embed a running copy of this simulation

Embed a running copy link(show simulation in a popuped window)
Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
  • Please feel free to post your ideas about how to use the simulation for better teaching and learning.
  • Post questions to be asked to help students to think, to explore.
  • Upload worksheets as attached files to share with more users.
Let's work together. We can help more users understand physics conceptually and enjoy the fun of learning physics!
Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #11 on: February 20, 2013, 01:02:59 pm » posted from:SINGAPORE,SINGAPORE,SINGAPORE

made the enhancement here
http://weelookang.blogspot.sg/2013/01/ajc-lesson-with-2-charges-simulation.html
made the enhancement to the electric field lines as proportional to strength of Q2.
thanks to goh khoon song for the feedback and use in his lessons.
Q1 is limited to -1 or 1, hence-fore.

download: https://dl.dropbox.com/u/44365627/lookangEJSworkspace/export/ejs_twopointcharges18q2work.jar
original authors: Fu-Kwun Hwang and lookang and szeyee
enjoy!



* twochargesfieldlinesq1=1q2=-5.png (37.09 KB, 607x603 - viewed 401 times.)

* twochargesfieldlinesq1=1q2=5.png (37.67 KB, 605x603 - viewed 412 times.)
Logged
lookang
Moderator
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #12 on: August 15, 2013, 07:41:28 am » posted from:SINGAPORE,SINGAPORE,SINGAPORE

he simulation has added a new feature, test charge polarity to simulate -e

enjoy!


an electron test mass moving through the point of minimum potential between Q2 = +3C and Q1= +1C. the theoretical path is one that the test charge electron moves and oscillates in the curved path as shown. The slight loop shape in due to the unbalanced forces at a far distance that deviates the direction of the electron to go slightly towards to the Q1 in this case. 


solution to  2012 A level H2 P2 Q7d(ii) by jeffrey toh. and his team. thanks for sharing!

Logged
Pages: [1]   Go Up
  Print  
Give me a standpoint and I will move the earth. ...Archimedes (287-212BC)
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Ejs Open Source Magnetic Field Vector of 2 current carrying wires Model
Collaborative Community of EJS
lookang 2 10020 Last post August 20, 2010, 08:15:22 am
by lookang
Ejs Open Source Magnetic Field Vector of 2 current carrying wires
electromagnetism
ahmedelshfie 0 2811 Last post April 12, 2010, 08:59:56 pm
by ahmedelshfie
Ejs Open Source 2 Mass Model with Gravity Field Vector, Field Lines, Potential
Collaborative Community of EJS
lookang 1 6340 Last post September 06, 2011, 06:40:27 pm
by lookang
Ejs Open Source Bar Magnetic Field Lines Model Java Applet
Collaborative Community of EJS
lookang 7 8570 Last post December 20, 2012, 06:55:06 pm
by Fu-Kwun Hwang
Ejs Open Source Magnetic Dipole Field Vector & Field Lines 3D Model Java Applet
Collaborative Community of EJS
lookang 2 7344 Last post December 13, 2012, 10:03:40 am
by lookang
Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.169 seconds with 23 queries.since 2011/06/15