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

JDK1.0.2 simulations (1996-2001) => Electromagnetics => Topic started by: Fu-Kwun Hwang on January 29, 2004, 09:39:30 pm



Title: Cyclotron
Post by: Fu-Kwun Hwang on January 29, 2004, 09:39:30 pm
The magnetic force for charge particle (with charge q) moving with velocity
    in a magnetic field is

The magnetic force is perpendicular to both the velocity and magnetic field ,



The power done by the magnetic force
So the magnetic force will not change the kinetic energy of the charge particle,

It only change the direction of the velocity for the charge particle.

If the velocity is in the same direction of the magnetic field,
then there is no magnetic force acting on the charge particle.

For charge particle moving in a uniform magnetic field ,
The velocity can be represented as ,
is a component of velocity
along B, which will not change.

The particle advances along while it moves in a circle in the plane formed by and.

The resulting trajectory forms a spiral with its axis along .
    , where R is the radius.

So we have momentum
And the angular velocity of the circular motion
Which is independent of the velocity of the charge particle!( is the cyclotron frequency)

The constancy of the cyclotron frequency led to a device called cyclotron.
This java applet let you play with cyclotron.





This is a top view of the region of a cyclotron in which the particle circulate.

is a picture of a real cyclotron.

The two hollow D-shaped objects (open on their straight edges) are made of copper sheet.
These dees, as they are called, form part of an electrical oscillator, which establishes an alternating potential difference across the gap between them.

The dees are immersed in a magnetic field whose direction is into the plane of the screen,

Suppose that a proton, starts from the blue dot near the center of the cyclotron, initially moves toward a negatively dee.
It will accelerate toward this dee and will enter it.

Once inside, it is "screened" from electric fields by the copper walls of the dee.
The magnetic field is not screen by the (nonmagnetic) copper dee, so the proton moves in the circle path.

Assume that at the instant the proton emerges into the center gap (again) from first dee,
The accelerating potential difference has changed sign.
Thus the proton again faces a negatively charged dee and is again accelerated.

This process continues, the circulating proton always being in step with the oscillations of the dee potential, until the proton spiral out of the edge of the dee system.
The frequency of the electric oscillator must match the cyclotron frequency.

If the gap between the dees is very small , the two frequency is the same.
What if the gap is not small? You will need to adjust the frequency of the electric oscillator.

Enter the value of the frequency ratio (oscillator frequency/cyclotron frequency) into the textfield.
    ( Do not forget to hit RETURN button after you change the frequency ratio)


Click the red dot near the electric oscillator and drag it up/down to change the voltage of the oscillator.
Click Start to start the animation,
Click right mouse button to pause, click right mouse button again to resume.

The velocity of the charge particle is represented by yellow line.
The force acting on the particle is represented by red line.
Vy-Vx (velocity) of the charge particle is also shown to the right.
Click Clear to erase the trace of the trajectory.
Click Reset for default values.

For an electron : the charge , mass ,
If the energy of the electron is 1eV (accelerated under 1V biased voltage) and the magnetic field is 1T(Tesla),
The cyclotron frequency (It is so big!)

The velocity of the electron (it is moving so fast!)

If the velocity is perpendicular the magnetic field, the radius of the circular motion
( it is so small!)
If the velocity has a small component along the magnetic (say 1%),
The electron will move along the magnetic field line with velocity
Image how the electron moves under the above conditions!


Title: topic33
Post by: on January 30, 2004, 11:00:21 am
Subject: problems with cyclotron java applet
Date: Thu, 4 Jun 1998 19:37:38 +0200
From: "Pietro Diviacco" <diviacco@unige.it>
To: <hwang@phy03.phy.ntnu.edu.tw>
My name is Pietro Diviacco. I am an Italian surgeon and live and work in Genova, Italy.
I tried to play Your applet "Cyclotron" but there was some problems.
Some of the images (*.gif 7 and 14) were not available and the applet was not working.
In any case Your applets are very good and interesting (the working ones, of course).
Thank You in advance for fixing the problems.
E-mail address: diviacco@unige.it


Title: topic33
Post by: on January 30, 2004, 11:25:54 am
Subject: Re: Regarding your Cyclotron Applet.
Date:    Wed, 6 Jan 1999 14:32:25 +0000 (WET)
From:    Joao Manuel Henriques <jmh@camoes.rnl.ist.utl.pt>
To:      Fu-Kwun Hwang <hwang@phy03.phy.ntnu.edu.tw>
Hi Again.
 First let me apologise for not responding sooner, but I was on vacation.
 Second, I would like to thank you for having sent the Source Code, it
really helped alot...
 Now it is my turn to help you out (if U want to), I made another program
that simulated: ' Attwood's Machine', since you dont have it on the list I
could send you a copy of it ..(it is in C though...)
 Let my know if you want it or not...BTW it also uses RK4, but it looks
diferent from your routine....

 Anyway thank you very much.
 
 

On Fri, 18 Dec 1998, Fu-Kwun Hwang wrote:

>
>
> Joao Manuel Henriques wrote:
>
> > Hi.
> >  I am a student of the University of Lisbon and I was a assigned a task to
> > simulate the cyclotron.
> >  It has been really hard to make something that actually resembled a
> > cyclotron, but i still cant make the electron spin according to the
> > frequency of the Voltage.
> >  Can you please help me out?
> >
> >  Here is what I need to know:
> >  -I calculated a formula that calculates Theta, but the center of the
> > circular movement is constant. In other words the Ray of the circunference
> > increases, but the center doesnt change like it should.
> >  Can you tell me the formula to theta?
> >
>
> This is not the way I did it. There is a better way to do it:
> If you know the velocity V and force (F=qVXB) at time t,
> you will be able to calculate velocity at t+dt;
> If you know the position and velocity of a particle at time t,
> you will be able to calculate next position at time t+dt.
> Repeat the above loop, you will know the next position and velocity at next
> moment t+dt;
>
>
> >
> > There is something else I want to ask.
> > Is there a possibility of you sending me the source code?
> >  I know this is an unusual request, but it would really make me understand
> > how the program really works. My source code is so complex that not even I
> > can understand it, and above all it doesnt simulate the cyclotron right.
> >  I would be very gratefull if you could send it. I promise I wouldn't
> > change the code and say that the program is mine. All I need to know is
> > how you did it.
> >
> >  Well, please e-mail me back with a response, preferably one with the
> > reply i want to get.
> >
> >  Thank you for your attention.
> >
> >
> >                      Joao Henriques
> >             http://camoes.rnl.ist.utl.pt/~jmh
>
> The source code is attached with this e-mail. But you will need to know about
> the
> Runge-Kutta method to understand the rk4 class.
>


Title: cyclotron equation
Post by: arika8178 on January 28, 2005, 03:34:40 pm
I'm so interested with your achievement in physics especially in cyclotron. I'm confuse with cyclotron mathematicals equation. How to used in Runga-Kutta Method? Anybody can help me?


Title: topic33
Post by: Fu-Kwun Hwang on February 12, 2005, 02:04:22 pm
This is a two dimension simulation, so there are components for the force.
Runga-Kutta Method solve first order differential equation.
So force equation (second order ) need to be break into two first order equation.
Change  $\frac{d^2 \vec{V}}{dt^2}=q \vec{V}\times\vec{B}$
into
$\frac{d\vec{x}}{dt}= V$ and $\frac{d\vec{V}}{dt}=q \vec{V}\times\vec{B}$
For the above two equations, each one have two components.
So you will have 4 equations for  Runga-Kutta Method solver. :-)


Title: source code
Post by: arika8178 on May 13, 2005, 09:05:40 am
Hi!
I had receive cyclotron java applet from your webside. I find all what i want except the source code. Actually, i would like to learn your complete cyclotron java applet programming. I really want to know how you derive all cyclotron variables and display the cyclotron simulation. Until now, i can't do it!

I really need your help. I would like to request your source code. I know it's ridiculous but I promise I could't change the code and say that the program is mine. All I need to know is how you do it.

Thanks!


Title: topic33
Post by: Fu-Kwun Hwang on May 13, 2005, 09:20:47 am
Please post your email address and I wil send you the source code.
However, it was written many years ago with JDK 1.0.2
If you want to program similar java applet. I would suggest you try to learn EJS (Easy Java Simulation) tool. It will generate the java aource code for you, but you need to provide the physics model.


Title: long of particl track
Post by: mma943 on December 18, 2006, 10:53:52 pm

Thank u for evrey things

-Can I knew a long of particl"s track  insid Dees?



Title: Re: Cyclotron
Post by: minhtue on October 15, 2007, 11:26:15 am
Hi,
I'm Vo Thanh Minh Tue, Nus High School, Singapore. The Java Applet for the cyclotron is very interesting. I note that there are different meanings of the term "cyclotron frequency" in physics text. In some American textbooks (such as Serway's Physics for Scientist and Engineering and Hyper Physics Forum), cyclotron frequency refers to the angular frequency of the square wave of electric field applied between the dees. Hence, the angular frequency of the electric field matches the angular velocity of the particle: w=qB/m.
Thank you very much,
Vo Thanh Minh Tue.


Title: Re: Cyclotron
Post by: Fu-Kwun Hwang on October 15, 2007, 10:10:03 pm
If the device was built to accelerate the electron in the cyclotron, the frequency has to be matched with the frequency for the electron to move around in the device. It is the frequency of the power supply should match the cyclotron frequency if the magnetic field is fixed (and normally this is the case). So I would define "cyclotron frequency" as qB/(2*pi*m) which is a property for the device, instead of the frequency for the electric field applied between the dees, which could be changed from the power generator.


Title: Re: Cyclotron
Post by: minhtue on October 16, 2007, 06:03:41 pm
Thank you very much.


Title: Re: Cyclotron
Post by: crownabhisek on February 17, 2009, 02:15:26 am
Read the first few lines, it says, the magnetic field "charges" the direction. It should be "changes"


Title: Re: Cyclotron
Post by: lookang on February 17, 2009, 08:11:35 am
It will be easier for Fu-Kwun Hwang to see what you mean by using the "quote" and edit out the rest away

So the magnetic force will not change the kinetic energy of the charge particle,

It only charge the direction of the velocity for the charge particle.

If the velocity is in the same direction of the magnetic field,
then there is no magnetic force acting on the charge particle.

Yes, crownabhisek  is right, there appears to be a spelling error :) Thanks! crownabhisek


Title: Re: Cyclotron
Post by: Fu-Kwun Hwang on February 17, 2009, 03:09:25 pm
Quote
the magnetic field "charges" the direction. It should be "changes"
It is fixed now. Thank you!


Title: Re: Cyclotron
Post by: dannydesiliva on September 22, 2009, 01:19:59 pm
I'm trying to build a small cyclotron and am thus searching for a magnet. I've been looking for a neodythium disc magnet that I could have cut in half to act as the two 'D' magnets in the cyclotron. The size of the magnet needs be somewhere around 12" in diameter but I can't seem to find anyplace that sells them around this size. If anyone knows where I could find some magnets or is willing to sell some of their own that would be great.


Title: Re: Cyclotron
Post by: Zahraa on October 21, 2010, 08:52:37 pm
hello...

I would like to thank you for this nice cyclotron :)

I am a Syrian student in Damascus university and I have to do simulation for the cyclotron
I am facing a problem with physical study , I don't know how to study the motion of the charged particle in the gap between the tow dee , I wonder how the motion will be in the gap circular? or right straight ? and why ?

I hope I get help from you  because i don't have so much time for this study ... 


Title: Re: Cyclotron
Post by: Fu-Kwun Hwang on October 21, 2010, 09:10:11 pm
There is an potential different between the gap which will form electric field $\vec{E}$
You can calculate acceleration $\vec{a}=\frac{\vec{F}}{m}=\frac{q\vec{E}}{m}$
And you can calculate how the charge will move (velocity,displacement)from acceleration.


Title: Re: Cyclotron
Post by: Zahraa on October 22, 2010, 01:13:18 am
There is an potential different between the gap which will form electric field $\vec{E}$
You can calculate acceleration $\vec{a}=\frac{\vec{F}}{m}=\frac{q\vec{E}}{m}$
And you can calculate how the charge will move (velocity,displacement)from acceleration.

thx , but how can I study the effect of magnetic  field in the  gap ??
and how the charge particle  will move in the gap ?? circular motion or straight one ?
does it effect with the magnetic field ??
 
 


Title: Re: source code
Post by: Zahraa on October 22, 2010, 01:28:24 am

I really need your help. I would like to request your source code. I know it's ridiculous but I promise I could't change the code and say that the program is mine. All I need to know is how you do it.

Thanks!


Title: Re: Cyclotron
Post by: Fu-Kwun Hwang on October 22, 2010, 08:55:45 am
The above simulation was created under the following assumption:

 Only electric field exists between gap, there is no magnetic field between the gap.
 And there is only uniform magnetic field in the two semicircular region.
The effect of the electric field between gap is to increase the energy of the charged particle (without changing direction).
And the effect of the magnetic field is to change direction of charged particle (without changing magnitude).

If you want to simulate magnetic field between the gap, you have to decide what kind of magnetic field in there.

You need to define your model before you can create an simulation.
The source code is available as attached file under the first message: cyclotron.java

Please download it by yourself. However, it was written many years ago with JDK1.0.2.   


Title: Re: Cyclotron
Post by: Zahraa on October 22, 2010, 11:57:17 am
thank you again ...

but all the articles I have read about the cyclotron say : that the charged particles is effected with tow filed in the gap
magnetic and electric one ..

how ever, is there a cyclotron in the world with the  assumption  you said above  ??
if there is , where can I get pictures for it ??





Title: Re: Cyclotron
Post by: ahmedelshfie on October 22, 2010, 04:17:38 pm
Hi Zahraa i want say that prof Hwang make all source code for all applets that he design free to all users,
By the way is see you from Syria im from Egypt. ;D
You can download by your self as attachment.


Title: Re: Cyclotron
Post by: Fu-Kwun Hwang on October 22, 2010, 04:47:01 pm
thank you again ...

but all the articles I have read about the cyclotron say : that the charged particles is effected with tow filed in the gap
magnetic and electric one ..


Can you provide reference to the articles you read? Or copy the full text in detail?


Title: Re: Cyclotron
Post by: Zahraa on October 22, 2010, 05:31:18 pm
thank you again ...

but all the articles I have read about the cyclotron say : that the charged particles is effected with tow filed in the gap
magnetic and electric one ..


Can you provide reference to the articles you read? Or copy the full text in detail?

see these pictures and notice that  the magnetic filed cross the gap.


Title: Re: Cyclotron
Post by: Fu-Kwun Hwang on October 22, 2010, 09:30:39 pm
Normally the gap is very small so that the effect due to the magnetic field betwen the gap can be ignored.

For a cyclotron device, we usually only interested in the final beam came out at particular radius (with particular energy/momentum).
$p=mv=qBr$
 The device was developed to accelerate charge particle (due to electric field between the gap) to high energy.
The detail of the trajectory usually is not so important.

If you are really interested in it, you can assume there are the same uniform magnetic field between the gap,
 and find out is it going to produce similar result.


Title: Re: Cyclotron
Post by: Zahraa on November 18, 2010, 12:00:18 am
Hello again   :)

I have started my simulation  of the cyclotron in Java  but Am facing a problem:
we know that the magnetics filed doesn't affect the magnitude of the velocity vector in the dees , but how can I simulate that in my  program if the accelerator vector != zero vector , I mean that how can I applied this role mathematically to prove that when we move from point to another one in the dee that the  magnitude of velocity vector is still constant, but the direction and the axis  of it is changed ??


Title: Re: Cyclotron
Post by: Fu-Kwun Hwang on November 18, 2010, 12:03:15 pm
Just apply the Lorentz's force $\vec{F}=q\vec{v}\times\vec{B}$ to your simulation.
For B field in z direction, velocity in x-y plane.
$F_x=q*v_y*B_z$
$F_y=-q*v_x*B_z$
or the differential equations are
$\frac{d^2v_x}{dt}=\frac{q}{m}v_y*Bz$
$\frac{d^2v_y}{dt}=-\frac{q}{m}v_x*Bz$

And you can check out whether $v=\sqrt{v_x*v_x+v_y*v_y}$ is a constant or not.


Title: Re: Cyclotron
Post by: Zahraa on November 18, 2010, 06:08:24 pm
Just apply the Lorentz's force $\vec{F}=q\vec{v}\times\vec{B}$ to your simulation.
For B field in z direction, velocity in x-y plane.
$F_x=q*v_y*B_z$
$F_y=-q*v_x*B_z$
or the differential equations are
$\frac{d^2v_x}{dt}=\frac{q}{m}v_y*Bz$
$\frac{d^2v_y}{dt}=-\frac{q}{m}v_x*Bz$

And you can check out whether $v=\sqrt{v_x*v_x+v_y*v_y}$ is a constant or not.

thx a lot..
but  actually I  don't understand so much , you write (Fx with Vy) and (Fy with Vx) I don't know why??

I see that you have studied the physics by dropping the vectors in the axises but I studied it by vectors
i.e :
in the gap vectors will be like this in first picture , then I conclude the next velocity vector V2 ( I mean velocity vector in the next moment , I have divided the time into amounts and study the motion of the charged particle in every moment ) by adding the tow V1 and acc ,according to the equation of the direct motion ,since if we study the motion in a very little  moment the motion will be straight , then the new velocity vector will increase and this is really because we know that velocity is increase in the gap ...

but in the dee velocity must be constant as we know , but please look at the second picture ,where I conclude V2 by adding  V1 and acc vectors
it will not be constant never but we know that in the dee velocity vector is constant  ..this is my problem   :(

I hope you understand me  :-[
   


Title: Re: Cyclotron
Post by: Fu-Kwun Hwang on November 18, 2010, 08:45:55 pm
You are thinking about a constant acceleration acc acting for a finite time.
However, the acceleration is always perpendicular to the velocity vector.

The magnitude of the velocity will change if the acceleration is in the direction of the velocity.
Because the acceleration is always pendicular to the velocity so it only change the direction of the velocity.


Title: Re: Cyclotron
Post by: Zahraa on November 19, 2010, 01:17:30 am
You are thinking about a constant acceleration acc acting for a finite time.
However, the acceleration is always perpendicular to the velocity vector.

The magnitude of the velocity will change if the acceleration is in the direction of the velocity.
Because the acceleration is always pendicular to the velocity so it only change the direction of the velocity.

thank you again ..
but is this a general physics rule ??
 that
"the acceleration is always pendicular to the velocity so it only change the direction of the velocity"


Title: Re: Cyclotron
Post by: Fu-Kwun Hwang on November 19, 2010, 11:37:23 am
The acceleration is determined by force $\vec{a}=\frac{\vec{F}}{m}$.

The acceleration is in general not necerssary pendicular to the velocity.
The Lorentz's force is $\vec{F_b}=q\vec{v}\times\vec{B}$
For charged particle in uniform magnetic field.
The force $\vec{F_B}$ is always pendicular to both velocity $vec{v}$ and magnetic field $\vec{B}$.
So the uniform magnetic will only change direction of charged particle (it will not change the speed of charged particle).



Title: Re: Cyclotron
Post by: Zahraa on December 06, 2010, 12:08:07 pm
Hello

Am still facing some problems with my simulation for cyclotron ... I have drown 2D module in Open_GL with Java to draw the particle And see its motion  in the Dee and the gap ..

 my new problem is with the values of vectors B E ( magnetic  and electric fields  ) ...how can I get A real values for
them to get real simulation and real representation to the cyclotron ?? ...

also the values of mass and charge of the charged particle is so small that I couldn't  represent them in  my simulation ...


Title: Re: Cyclotron
Post by: Fu-Kwun Hwang on December 06, 2010, 04:51:14 pm
Let me know all the parameters you have set for your simulation.
I do not know how to help you if I do not have any information about the simulation from you!


Title: Re: Cyclotron
Post by: Zahraa on December 07, 2010, 08:22:35 am
Let me know all the parameters you have set for your simulation.
I do not know how to help you if I do not have any information about the simulation from you!

Am studying the motion in very small period of time and calculate the vector  of velocity and accelerate every moment
 then I can calculate the position  of the particle in this moment then I draw it ....

in the Gap I need to know the electric filed to calculate the accelerate   vector acc =  (q.E)/m
and I need the proton mass and  charge ( I know them but they are so small that I couldn't represent them ..

in the Dee I need to know the magnetic filed to calculate the accelerate   vector acc= (q.vB)/m ..


Title: Re: Cyclotron
Post by: Fu-Kwun Hwang on December 07, 2010, 11:11:56 am
Acceleration $a=\frac{qE}{m}$
for electron $q=1.6\times 10^{-19}$kg, $m=9.1\times 10^{-31}$
So you can calculate acceleration.
However, the time for the particle to accelerate is very small.
You can not do a real time simulation. However, you can change the time step to small enough number.
e.g. If the velocity is $v=10^{5}$m/s , and the gap is 2cm=$2\times 10^{-2}$m, then the time step should be much smaller than $\frac{2\times 10^{-2}}{10^5}=2\times 10^{-7}$s.  


$P=mv= qBr$, You can use this equation to determine the value of $B$.
You need to define what is the maximum energy the charge particle will gain in the cyclotron, which will determine the maximum velocity, and you should be able to find B.
The energy for electron should be much smaller than 511keV (or velocity much small than speed of light),
otherwise, you also need to consider correction due to special relativity effect.


Title: Re: Cyclotron
Post by: lookang on December 07, 2010, 11:52:13 pm
Hello

Am still facing some problems with my simulation for cyclotron ... I have drown 2D module in Open_GL with Java to draw the particle And see its motion  in the Dee and the gap ..

 my new problem is with the values of vectors B E ( magnetic  and electric fields  ) ...how can I get A real values for
them to get real simulation and real representation to the cyclotron ?? ...

also the values of mass and charge of the charged particle is so small that I couldn't  represent them in  my simulation ...
this is my attempt at the assignment given at http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1972.0 for the construction of Cyclotron
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=2021.0
Ejs Open Source Cyclotron Java Applet in 3D
Enjoy!


Title: Re: Cyclotron
Post by: lookang on December 08, 2010, 03:20:00 pm

The constancy of the cyclotron frequency led to a device called cyclotron.
This java applet let you play with cyclotron.
<center><applet code="cyclotron.class" width=500 height=340 codebase="/java/cyclotron/"><param name="Reset" value="Reset"><param name="Start" value="Start"><param name="Clear" value="Clear"><param name="ratio" value="Frequency ratio"></applet></center>

i need to understand why frequency ratio = 1
does not produce the cyclotron effect of shooting particles out of the 2 dees (magnetic field).?

i need to understand is my assumption correct that
frequency ratio = electric field frequency /  angular frequency of motion


Title: Re: Cyclotron
Post by: lookang on December 09, 2010, 07:16:18 pm
If the gap between the dees is very small , the two frequency is the same.
What if the gap is not small? You will need to adjust the frequency of the electric oscillator.
Enter the value of the frequency ratio (oscillator frequency/cyclotron frequency) into the textfield.
<ul>( Do not forget to hit RETURN button after you change the frequency ratio)</ul>
Click the red dot near the electric oscillator and drag it up/down to change the voltage of the oscillator.

oic.
i finally figure out this cyclotron.
the frequency ratio (oscillator frequency/cyclotron frequency)=1 initially for a few rounds

then the oscillator frequency > cyclotron frequency, i need to adjust it is 1.1?
but the sims did not take new values of frequency ratio, when i key in 1.1 at time >0, the sims reset.
is that correct design of this sim?


Title: Re: Cyclotron
Post by: Fu-Kwun Hwang on December 09, 2010, 09:08:12 pm
Most of the simulation ignore the time for electron to pass the D gap.
I add this time difference into the simulation to remind user for a real device it need some modification.

There are another issue, when there are more than one electron generate at different time.
How to control the device so that more electrons will be focusd?

Welcome to the real world of physics!  :D


Title: Re: Cyclotron
Post by: Zahraa on December 28, 2010, 02:26:06 am
hello again

I still facing problems in my simulation  >:( >:(

my problem is with the very small value of the mass and charge of the proton
charge= 1.602*1e-19
mass =1.673*1e-27

 that when I want to calculate the acceleration
acc =  (q.E)/m
I have a very very big number that my application didn't execute it ...
so is there any units that can I apply it in my simulation instead of kg for mass
and coulomb for charge ..
I mean I want to present the  mass and the charge in another units with a different  values ....values that I can apply it in my simulation
i.e : I found that  the mass of the proton is worth 938 Mev/c^2 !!
and this is  a very good number for my application ..
but sure if we want to have a real physics simulation we have to put a right proportion with all units ... 
I hope you understand my question ...if you don't tell me to explain more ...

and thank you again for caring about my question ... 


Title: Re: Cyclotron
Post by: Fu-Kwun Hwang on December 28, 2010, 08:33:15 am
1. The value range for "float" is 1038, for "double" is 10138 .

There is no problem if you define variable of type "doble" for your case.
You might run into trouble if you use "float" type only.

2.
charge= 1.602*1e-19
mass =1.673*1e-27

for acc=qE/m
I will define a new variable qoverm=1.602/1.673*1e8 without define q or m in the code



Title: Re: Cyclotron
Post by: lookang on December 28, 2010, 06:26:46 pm
I also encountered the same issue of very small numbers.
Indeed by using different constant value like what prod Hwang said works.
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1455.0
In this link, is an applet that has very small numbers like
Boltzmann constant and unified mass.
Check it out to see how it is done


Title: Re: Cyclotron
Post by: NagySandorIstvan on March 28, 2011, 01:45:26 pm
Hi,
I tried to translate the sim to Hungarian on March 27, 2011. I have downloaded the result but neither the Hungarian nor the English version works. Even the pictures of the formulas are missing from the html.
Best, Sandor


Title: Re: Cyclotron
Post by: Fu-Kwun Hwang on March 28, 2011, 05:44:00 pm
The attached image is what I saw with my browser of the Hungarian version.
The images and applet are working fine with my browser.
Did you select unicode (utf-8) code ?