Coryab/code #13

Merged
coryab merged 6 commits from coryab/code into develop 2023-10-24 20:43:28 +00:00
8 changed files with 82 additions and 9 deletions
Showing only changes of commit df38780e69 - Show all commits

View File

@ -917,7 +917,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched. # Note: If this tag is empty the current directory is searched.
INPUT = include src README.md INPUT = include src src/scripts README.md
# This tag can be used to specify the character encoding of the source files # This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses

View File

@ -1,3 +1,14 @@
## @file animate_100_particles.py
#
# @author Cory Alexander Balaton (coryab)
# @author Janita Ovidie Sandtrøen Willumsen (janitaws)
#
# @version 1.0
#
# @brief Animate 100 particles.
#
# @bug No known bugs
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import numpy as np import numpy as np
from matplotlib import animation from matplotlib import animation

View File

@ -1,3 +1,15 @@
## @file plot_2_particles.py
#
# @author Cory Alexander Balaton (coryab)
# @author Janita Ovidie Sandtrøen Willumsen (janitaws)
#
# @version 1.0
#
# @brief Plot 2 particles with and without particle interactions in the
# xy-plane.
#
# @bug No known bugs
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import numpy as np import numpy as np
import seaborn as sns import seaborn as sns

View File

@ -1,3 +1,14 @@
## @file plot_3d.py
#
# @author Cory Alexander Balaton (coryab)
# @author Janita Ovidie Sandtrøen Willumsen (janitaws)
#
# @version 1.0
#
# @brief Plot 2 particles with and without particle interactions in 3D.
#
# @bug No known bugs
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import numpy as np import numpy as np
import seaborn as sns import seaborn as sns

View File

@ -1,3 +1,15 @@
## @file plot_particles_left.py
#
# @author Cory Alexander Balaton (coryab)
# @author Janita Ovidie Sandtrøen Willumsen (janitaws)
#
# @version 1.0
#
# @brief Plot how many particles are left after 500 microseconds using
# different angular frequencies.
#
# @bug No known bugs
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import seaborn as sns import seaborn as sns

View File

@ -1,3 +1,15 @@
## @file plot_phase_space.py
#
# @author Cory Alexander Balaton (coryab)
# @author Janita Ovidie Sandtrøen Willumsen (janitaws)
#
# @version 1.0
#
# @brief Plot the phase space for 2 particles in the x and z direction, with
# and without particle interactions.
#
# @bug No known bugs
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import numpy as np import numpy as np
import seaborn as sns import seaborn as sns

View File

@ -1,3 +1,14 @@
## @file plot_relative_error.py
#
# @author Cory Alexander Balaton (coryab)
# @author Janita Ovidie Sandtrøen Willumsen (janitaws)
#
# @version 1.0
#
# @brief Plot the relative error for forward Euler and RK4 method.
#
# @bug No known bugs
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import numpy as np import numpy as np
import seaborn as sns import seaborn as sns

View File

@ -1,3 +1,15 @@
## @file plot_single_particle.py
#
# @author Cory Alexander Balaton (coryab)
# @author Janita Ovidie Sandtrøen Willumsen (janitaws)
#
# @version 1.0
#
# @brief Plot the approximation and analytical solution for one particle
# in the z axis.
#
# @bug No known bugs
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import numpy as np import numpy as np
import seaborn as sns import seaborn as sns
@ -23,14 +35,6 @@ def z(t):
return 20.*np.cos(w_z*t) return 20.*np.cos(w_z*t)
def main(): def main():
colors = [
"lightskyblue",
"deepskyblue",
"salmon",
"tomato",
"mediumaquamarine",
"mediumseagreen"
]
filename = "output/simulate_single_particle/particle_0_r.txt" filename = "output/simulate_single_particle/particle_0_r.txt"
r = t = [] r = t = []
with open(filename) as f: with open(filename) as f: