Changes between Version 14 and Version 15 of fortran
- Timestamp:
- Oct 18, 2016, 9:51:21 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
fortran
v14 v15 646 646 647 647 == 13. Runge-Kutta method for harmonic oscillations == 648 Using method Runge-Kuta obtain the differential equations for oscillator, the same like in program 12 but the difference is that here we are using onother function for du(1) which is velocity. Part 2 648 649 {{{ 649 650 #!fortran 650 651 !Using method Runge-Kuta obtain the differential equations for oscillator, the same like in652 !program 12 but the difference is that here we are using onother function for du(1) which653 !is velocity654 !Part 2655 656 651 external fct, out 657 652 real aux(8,2) … … 866 861 867 862 == 14. Runge-Kutta method for harmonic oscillations == 863 The same like in program 12 and 12 using Runge Kutta obtain the differential equations but with another example and using !another function for du(1).Part 3 868 864 {{{ 869 865 #!fortran 870 !The same like in program 12 and 12 using Runge Kutta obtain the differential equations but 871 !with another example and using !another function for du(1) 872 !Part 3 866 873 867 external fct, out 874 868 real aux(8,2) … … 1070 1064 }}} 1071 1065 == 15. Electron acceleration in uniform electric field == 1066 The method Runge-Kuta is not used only for obtaining the differential equation for oscilloscope. The same method can be used in different tasks where the differential equations need be solve. Using method Runge-Kuta, it is easy to find the electron acceleration in electric filed. 1067 1072 1068 {{{ 1073 1069 #!fortran 1074 !The method Runge-Kuta is not used only for obtaining the differential equation for1075 !oscilloscope. The same method can be used in different tasks where the differential1076 !equations need be solve. Using method Runge-Kuta, it is easy to find the electron1077 !acceleration in electric filed1078 1079 1070 external fct, out 1080 1071 real aux(8,4) … … 1303 1294 1304 1295 == 16. Determination the conditions of electron capture in SGA mode and the bunch time == 1296 Also the method Runge Kuta is used for solving more complex problems in plasma physics, like SGA (synchrotron gyro-magnetic auto resonant) which is a self sustaining ECR plasma in magnetic field where the time is rising up. First the method Runge-Kuta is used for auto resonant condition and after that using the 1297 equations of plasma physics for the SGA mode it are determined the conditions. 1305 1298 {{{ 1306 1299 #!fortran 1307 !Also the method Runge Kuta is used for solving more complex problems in plasma physics, like1308 !SGA (synchrotron gyro-magnetic auto resonant) which is a self sustaining ECR plasma in1309 !magnetic field where the time is rising up.1310 !First the method Runge-Kuta is used for auto resonant condition and after that using the1311 !equations of plasma physics for the SGA mode it are determined the conditions.1312 1313 1300 external fct, out 1314 1301 real aux(8,2) … … 1546 1533 1547 1534 == 17. Determination the dependencies between the electron momentum and time, electron momentum and coordinate== 1535 Using the same condition like in program 16. Using method Runge-Kuta for determination the conditions of the electron motion. 1548 1536 {{{ 1549 1537 #!fortran 1550 1551 ! Using the same condition like in program 161552 ! Using method Runge-Kuta for determination the conditions of the electron motion.1553 1538 external fct, out 1554 1539 real aux(8,4) … … 1787 1772 1788 1773 == 18. Electron acceleration in a uniform electric field using speed light == 1774 The same introductions like in programs 16 and 17 but the difference is that here we have dependence of speed light. To get the relative conditions for the motion. Using metod Runge-Kuta 1789 1775 {{{ 1790 1776 #!fortran 1791 !The same introductions like in programs 16 and 17 but the difference is that here we have1792 !dependence of speed light. To get the relative conditions for the motion.1793 ! Using metod Runge-Kuta1794 1795 1777 external fct, out 1796 1778 real aux(8,4) … … 2022 2004 2023 2005 == 19. Charged particle motion in magnetic mirror trap under ECR == 2006 One of the most important thing in plasma physics is to get the motion equations of the particles. To get that equations it is used Boris method. This method is divided in for sections: using the momentum of the particles, their rotations, using the electrical field and at the end to determinate the coordinates. 2007 Using this method in this program is analyzed the ECR(electron cyclotron resonance) phenomenon in parabolic approximation of the magnetic field (mirror trap) for different input values. 2024 2008 {{{ 2025 2009 #!fortran 2026 !One of the most important thing in plasma physics is to get the motion equations of the2027 !particles. To get that equations it is used Boris method. This method is divided in for2028 !sections: using the momentum of the particles, their rotations, using the electrical field2029 !and at the end to determinate the coordinates.2030 !Using this method in this program is analyzed the ECR(electron cyclotron resonance)2031 !phenomenon in parabolic approximation of the magnetic2032 !field (mirror trap) for different input values2033 2034 2010 real :: ez = 4.8e-10, c=3.0e10, me=9.1e-28, f=2.4e09, pi=3.14159265 2035 2011 … … 2194 2170 2195 2171 == 20. Solving nonlinear equation == 2172 To find a solutions for solving nonlinear equation first need to find the roots in the initial interval. There are a lot of methods for how can these roots be obtained. In this program we are using method Newton-Raphson. This method is more rapidly convergent. To find the roots in the interval we are choosing a number which will serve as an initial approximation. 2196 2173 {{{ 2197 2174 #!fortran 2198 !To find a solutions for solving nonlinear equation first need to find the roots in the2199 !initial interval. There are a lot of methods for how can these roots be obtained. In this2200 !program we are using method Newton-Raphson. This method is more rapidly convergent. To find2201 !the roots in the interval we are choosing a number which will serve as an initial2202 !approximation.2203 2175 program heat1 2204 2176 … … 2269 2241 2270 2242 == 21. Poisson equations solver == 2243 To obtain the one dimensional Poisson equation is used the swap method and after the solving the Poisson equation can be determinate the electric filed of the electron layer. Get the plots of the dependencies between the density and the electric filed with coordinate z 2271 2244 {{{ 2272 2245 #!fortran 2273 !To obtain the one dimensional Poisson equation is used the swap method and after the2274 !solving the Poisson equation can be determinate the electric filed of the electron layer.2275 !Get the plots of the dependencies between the density and the electric filed with2276 !coordinate z2277 2246 program poisn1 2278 2247 real d,n0 … … 2374 2343 2375 2344 == 22. Distribution of Langmuir waves in a uniform plasma == 2345 1D plasma simulation (demo version) using numerical method created by particle cell method calculate the wavelength and the velocity of wave propagation 2376 2346 {{{ 2377 2347 #!fortran 2378 !2379 ! 1D plasma simulation (demo version)2380 ! using numerical method created by particle cell method2381 ! calculate the wavelength and the velocity of wave propogation2382 2383 2348 program plasma_1D 2384 2349 real n,m0 … … 2553 2518 2554 2519 2555 == 23. Proton acceleration by the filed of electron leyer == 2520 == 23. Proton acceleration by the filed of electron layer == 2521 Using method Runge-Kutta find the max possible acceleration of the proton (maximum gradient of the magnetic filed). Plot the graphics dependencies between the power and time, coordinate difference and time 2556 2522 {{{ 2557 2523 #!fortran 2558 2559 2560 !Using method Runge-Kutta find the max possible acceleration of the proton (maximum2561 !gradient of the magnetic filed). Plot the graphics dependencies between the power and2562 !time, coordinate difference and time2563 2564 2565 2524 external fct, out 2566 2525 common /a/ g0, dt, k, pp2b, gme, gmi, dbdz, pi, rl, d … … 2829 2788 2830 2789 == 24. Electron motion in uniform electric filed == 2790 To integrate the ordinary differential equations is used method Euler. This method is applicable to a system of first order differential equations. In this program this method will help to find the velocity of the electron in uniform electric filed. 2831 2791 {{{ 2832 2792 #!fortran 2833 !To integrate the ordinary differential equations is used method Euler. This method is2834 !applicable to a system of first order differential equations. In this program this method2835 !will help to find the velocity of the electron in uniform electric filed.2836 2793 real v,x,dt,t,dv,Fm 2837 2794 open(2,file='y2.dat', status='unknown')