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.

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 . However, do you know how those field lines were calculated?

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 »

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

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";

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

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.

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.

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!