hello I would like to propose a simulation, which I need so much 2D in a magnetic field that increases with the x axis, then has a maximum, and then returns to zero value as a function gaussina. see photo. the particle part in any point of this plane and with the direction to be set. also the speed and mass are to be set and charge.

on the 2D plane in the point x, y have the cmapo varies with xe, remains constant along y. you can set a starting point as the point (xo, yo) where B (tesla) is almost zero and choose the direction of the particle.

You can do the following:1) Divide the plan, of length x and height y, in vertical strips of known width.2) manually assign a value of the magnetic field in each strip3)the field is constant in each vertical strip4) manually select a point in the plane5) manually choose a direction in the plane6) assign charge, mass, velocity, to the particle7) go the simulation!

then in fig1 explain what must do the program in steps. first step to divide the plane into strips of very great height and thickness of three or more mm and assign the field to each one. the field is constant in each strip but it is different from the strip and the strip. or it can be the same depending on the assignment. second step assign a point and a direction to the particle. third step, run the simulation.

in fig2 explain the graphical method for ottenre the result, in any direction goes away, the particle, the radius of curvature is always perpendicular to the direction of the particle. in the band starting the radius of curvature is constant. the particle is a portion of circumference. Now I draw the tangent line to the curve O | and the radius is perpendicalore to this line so the design and so on.

set the time in ns the lenght in mm velocity m/s field in tesla charge in coulomb mass in kg

the application is scientific to know if the particle at a given velocity and mass passes through the field or bounces back.

thanks so much!!! is a simulation of based, but it is what I wanted . Now can we please make additions to the program? thanks again for the simulation.

So here are the additions I'd like, please:the user must be able to set - Mass in kg (typically 5 * 10 ^-26Kg) - Set the charge of the particle (typically 1.6 * 10 ^ -19 C) - Set the type of charge of the particle + or -. - You must have a counter for the time in nanoseconds (ns) - change speed of simulation (example 1s=8ns or 1s= 20ns or etc...) - set Speed ​​in m / s (typically between 1'000 and 10'000 m / s) - Set the Gaussian function manually by entering the value of A and B, which is A = 2 * sigma ^ 2 - Enter the rulers on board page in mm - You can manually choose the size (x and y) of the working window in mm - The particle would bounce off the walls, up and down of the page, but go trought left end right. (as a particle in a tube infinite.)

- The mass is wrong,must be 10 ^-26Kg, and no, 10 ^ 26kg, must be a mass comparable to that of molecular oxygen, or molecular nitrogen.- The cursor volocità must reach 20 km / s, starting from zero, as it is now.- The particle bounces off walls, above and below, and it is ok, but returns in the video, if it comes out right and left, this effect is not good, please eliminate it, is not realistic.- Can You, please, put the default positively charged particle?

are better numerical values ​​of x and y, you can choose the work area as shown in figure I sent you. to remember is that the particle must bounce up and down and left and raises must go away from the work area and not return inside the area. as in figure.

can you, please, add the direction of B whit a tridimensional axis? thanks

however there is something wrong with simulation with these values. if r = mv / qB, setting values, sigma = 2.5, m = 10 ^ 26Kg, v = 0.20km / s, B = 5T, q =1.6*10^-19 and, by placing the particle in the middle of the screen, is obtained a radius of curvature of 2.5 * 10 ^ 46 m instead on the screen is seen that the radius of curvature is about 2 cm!

I'm a materials scientist and expert autodesk inventor (3D modeling software), an expert in simulations with magnetic fields in 2D with PERMAG, and expert at using of software for the structural dimensioning, so if you need anything in particular has the my email and free as you are doing.

Save the state of a simulation is a build in function for simulation created with EJS.

You can download the jar file and double click it to run it.

Right click in the simulation region, and you will find menu to save the state of your simulations (you can save as many as you like).You can load the state , and the simulation will be back to when it was saved.

Quote

I'd like to have the possibility to set the height of the work area, not just the scale with a slider that starts from 1 centimeter up to 20 centimeters

Would you like the range for width/height to be entered with numerical value instead of changed with slider?What about the range for the wall ?(for particle to bounce up and down).

1. The message for time has been moved to the center.2. You can enter scale by enter numerical value, so you can change the range for x and y to any value you want. (how ever you need to adjust other parameters so that the scale make sense).3. The max value can be change to 300 only when scale is set to larger than 20. (from 0.01 to 300 is a very large ratio, it does not make sense for large sigma with small range).4. The yscale for Gaussian function change according to bounce wall in the y-direction.

simulation now works correctly but there would be so many parameters you can tweak.

1. time step is expected to reach 0.500 us, from 0.01us, because the simulation is too slow at high value of scale eg 6002. the length of the black mark that represents the trajectory should be more long, it tends to disappear with the advance of the particle. at 600 scale3. the scale of 600, sigma must reach a maximum of 3000 and not 9000, as it is now, because the fixing of parameters is too difficult4. the dimension of velocity vector shoud be became largest if the scale increase. but not big only a bit