Commit ac6bb441 authored by Olaf's avatar Olaf

remove unused pressure calculation

parent 7dc8cfff
......@@ -3,36 +3,6 @@ import numpy as np
import math
def pressure(X, F, L, kbT):
"""
Calculates the pressure inside the particle box at each time step. Formula from Exercize 8.3.c from the book "Molecular Dynamics" (see background reading at GitLab).
Last modified: 6-3-2019
Parameters
----------
X : ((N_time_steps, N_particles, N_dimensions) np.array, natural units)
Matrix with the position of each particle at each time step
F : ((N_time_steps, N_particles, N_dimensions) np.array, natural units)
Matrix with the force at each particle at each time step
L : scalar
Length of the particle box (natural units)
kbT : scalar
Energy, kb*T/epsilon (natural units)
Returns
-------
P : ((N_time_steps) np.array)
Array with the pressure inside the particle box at each time step
"""
P = np.zeros(X.shape[0])
for t in range(X.shape[0]):
P[t] = X.shape[1]*kbT/(L**3) + 1/(3*L**3)*np.sum(np.sum(X[t]*F[t], axis=1))
# return
return P
def pressure_coll(D, V, L, kbT, h):
"""
Calculates the pressure inside the particle box at each time step, based on collisions. Formula from Exercize 8.3.c from the book "Molecular Dynamics" (see background reading at GitLab).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment