Skip to content

Commit

Permalink
WIP: Fixed simulation timestep bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Fraser-Birks committed Dec 9, 2023
1 parent 7419fa4 commit 0743b28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions matscipy/fracture_mechanics/thin_strip_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,8 @@ def check_steady_state(self,atom_1_traj,atom_2_traj):
dist_between_atoms = x_pos[1]-x_pos[0]
#compute velocity from dist_between_atoms and the time diff between times
v = dist_between_atoms/(break_tsteps[1]-break_tsteps[0])
#convert v from A/fs to km/s
v_kms = v*(10**2)
#convert v from A/ps to km/s
v_kms = v*(10**-1)
#print velocity
print(f'Velocity is {v_kms} km/s')
#find sum squared overlap between trajectories for 5 ps
Expand Down
4 changes: 2 additions & 2 deletions scripts/fracture_mechanics/thin_strip_lammps.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
bulk_nn = parameter('bulk_nn')
paste_threshold = parameter('paste_threshold')
track_spacing = parameter('track_spacing',150) #distance between tracked atoms
track_tstep = parameter('track_tstep',5) #timestep between tracked atom dumping
track_tstep = parameter('track_tstep',5) #number of timesteps between tracked atom dumping
restart = parameter('restart', False)
checkpointing = parameter('checkpointing',False)
checkpoint_filename = parameter('checkpoint_filename','thin_strip')
Expand Down Expand Up @@ -180,7 +180,7 @@
sim_time_tmp = sim_time
for tstep in range(1,len(traj)):
t = traj[tstep]
sim_time_tmp += track_tstep
sim_time_tmp += track_tstep*sim_tstep
atom = t[0]
tracked_motion_dict[tracked_array[atom_index]][tstep-1,:] = [sim_time_tmp,atom.position[1],atom.position[0]+tsb.total_added_dist]
sim_time=sim_time_tmp
Expand Down

0 comments on commit 0743b28

Please sign in to comment.