def Task4a_iii_fast(): print("TASK : Task4a_iii") maxTime = 10 t, N, T = SetTime(maxTime, increments) t_initial = 190 particles = MDGenerators.PopulateCreateCrystalStructure( 3, "Ar", 1.7, N, constants.mass, t_initial) MDFunctions.MoveToCentreOfBox(particles) MDSolver.solveFaster(MDSolver.velocityVerletFast2, particles, maxTime, N) #temp = MDFunctions.ComputeTemperatureReduced(N-1, particles, constants.eps) #print(f"AT time {maxTime} temperature is {temp} kelvin") chartName = f"4a) iii Temp ({t_initial} K) (fast)" MDPlot.plotTemperature(particles, t, N, chartName, "4a_iii_fast")
def Task4a_ii_fast(): print("TASK : Task4a_ii") maxTime = 1.5 t, N, T = SetTime(maxTime, increments) t_initial = 300 particles = MDGenerators.PopulateCreateCrystalStructure( 3, "Ar", 1.7, N, constants.mass, t_initial) MDFileWriter.WriteFirstFrame(particles, "firstFrame", N) #MDFunctions.MoveToCentreOfBox(particles) MDSolver.solveFaster(MDSolver.velocityVerletFast2, particles, maxTime, N) #MDSolver.solve(MDSolver.velocityVerlet, particles, maxTime, N, constants.eps, constants.sig) MDFileWriter.WriteXYZFile(particles, "checkthis_fast", N) chartName = f"4a) ii Temp ({t_initial} K) (fast)" MDPlot.plotTemperature(particles, t, N, chartName, "4a_ii_fast")