@@ -81,7 +81,7 @@ contains
8181 integer :: i, encoded_pid1, encoded_pid2, xp1, xp2, yp1, yp2, zp1, zp2, pid1, pid2, l ! iterators and patch IDs
8282 real (wp) :: overlap_distance
8383 real (wp), dimension (3 ) :: normal_vector, centroid_1, centroid_2
84- real (wp), dimension (3 ) :: normal_velocity, tangental_vector , normal_force, tangental_force , torque, radial_vector, &
84+ real (wp), dimension (3 ) :: normal_velocity, tangential_vector , normal_force, tangential_force , torque, radial_vector, &
8585 & rotation_velocity, vel1, vel2
8686 real (wp) :: k, eta, effective_mass ! the spring stiffness and damping coefficient and mass of a specific interaction
8787
@@ -92,7 +92,7 @@ contains
9292 ! Iterate over all collisions detected
9393 $:GPU_PARALLEL_LOOP(private= ' [i, l, encoded_pid1, encoded_pid2, xp1, xp2, yp1, yp2, zp1, zp2, pid1, pid2, centroid_1, &
9494 & centroid_2, normal_vector, overlap_distance, effective_mass, k, eta, normal_velocity, &
95- & tangental_vector , normal_force, tangental_force , torque, radial_vector, rotation_velocity, vel1, &
95+ & tangential_vector , normal_force, tangential_force , torque, radial_vector, rotation_velocity, vel1, &
9696 & vel2]' , copy= ' [forces, torques]' )
9797 do i = 1 , num_considered_collisions
9898 encoded_pid1 = collision_lookup(i, 3 )
@@ -132,25 +132,25 @@ contains
132132 vel2 = patch_ib(pid2)%vel + rotation_velocity
133133
134134 normal_velocity = dot_product (vel1 - vel2, normal_vector)* normal_vector
135- tangental_vector = (vel1 - vel2) - normal_velocity
136- if (.not. f_approx_equal(norm2(tangental_vector ), &
137- & 0._wp )) tangental_vector = tangental_vector / norm2(tangental_vector )
135+ tangential_vector = (vel1 - vel2) - normal_velocity
136+ if (.not. f_approx_equal(norm2(tangential_vector ), &
137+ & 0._wp )) tangential_vector = tangential_vector / norm2(tangential_vector )
138138
139139 ! compute force and torque
140140 normal_force = - k* overlap_distance* normal_vector - eta* normal_velocity
141- tangental_force = - ib_coefficient_of_friction* norm2(normal_force)* tangental_vector
142- call s_cross_product(normal_vector* patch_ib(pid1)%radius, tangental_force , torque)
141+ tangential_force = - ib_coefficient_of_friction* norm2(normal_force)* tangential_vector
142+ call s_cross_product(normal_vector* patch_ib(pid1)%radius, tangential_force , torque)
143143
144144 do l = 1 , num_dims
145145 ! update the first IB
146146 $:GPU_ATOMIC(atomic= ' update' )
147- forces(pid1, l) = forces(pid1, l) + (normal_force(l) + tangental_force (l))
147+ forces(pid1, l) = forces(pid1, l) + (normal_force(l) + tangential_force (l))
148148 $:GPU_ATOMIC(atomic= ' update' )
149149 torques(pid1, l) = torques(pid1, l) + torque(l)
150150
151151 ! apply equal and opposite force/ torque to second IB
152152 $:GPU_ATOMIC(atomic= ' update' )
153- forces(pid2, l) = forces(pid2, l) - (normal_force(l) + tangental_force (l))
153+ forces(pid2, l) = forces(pid2, l) - (normal_force(l) + tangential_force (l))
154154 $:GPU_ATOMIC(atomic= ' update' )
155155 torques(pid2, l) = torques(pid2, l) + torque(l)* patch_ib(pid2)%radius/ patch_ib(pid1)%radius
156156 end do
@@ -166,12 +166,12 @@ contains
166166
167167 real (wp), dimension (num_ibs, 3 ), intent (inout ) :: forces, torques
168168 integer :: patch_id, i, l
169- real (wp), dimension (3 ) :: normal_force, tangental_force , normal_vector, normal_velocity, tangental_vector , &
169+ real (wp), dimension (3 ) :: normal_force, tangential_force , normal_vector, normal_velocity, tangential_vector , &
170170 & collision_location, torque, radial_vector, rotation_velocity, velocity
171171 real (wp) :: k, eta ! the spring stiffness and damping coefficient for a specific IB
172172
173173 $:GPU_PARALLEL_LOOP(private= ' [patch_id, i, l, collision_location, normal_vector, k, eta, normal_velocity, &
174- & tangental_vector , normal_force, tangental_force , torque, radial_vector, rotation_velocity, &
174+ & tangential_vector , normal_force, tangential_force , torque, radial_vector, rotation_velocity, &
175175 & velocity]' , copy= ' [forces, torques]' , collapse= 2 )
176176 do patch_id = 1 , num_ibs
177177 do i = 1 , num_dims* 2
@@ -208,16 +208,16 @@ contains
208208
209209 ! standard soft- sphere collision with the wall
210210 normal_velocity = dot_product (velocity, normal_vector)* normal_vector
211- tangental_vector = velocity - normal_velocity
212- if (.not. f_approx_equal(norm2(tangental_vector ), &
213- & 0._wp )) tangental_vector = tangental_vector / norm2(tangental_vector )
211+ tangential_vector = velocity - normal_velocity
212+ if (.not. f_approx_equal(norm2(tangential_vector ), &
213+ & 0._wp )) tangential_vector = tangential_vector / norm2(tangential_vector )
214214 normal_force = - k* wall_overlap_distances(patch_id, i)* normal_vector - eta* normal_velocity
215- tangental_force = - ib_coefficient_of_friction* norm2(normal_force)* tangental_vector
216- call s_cross_product(normal_vector* patch_ib(patch_id)%radius, tangental_force , torque)
215+ tangential_force = - ib_coefficient_of_friction* norm2(normal_force)* tangential_vector
216+ call s_cross_product(normal_vector* patch_ib(patch_id)%radius, tangential_force , torque)
217217
218218 do l = 1 , num_dims
219219 $:GPU_ATOMIC(atomic= ' update' )
220- forces(patch_id, l) = forces(patch_id, l) + (normal_force(l) + tangental_force (l))
220+ forces(patch_id, l) = forces(patch_id, l) + (normal_force(l) + tangential_force (l))
221221 $:GPU_ATOMIC(atomic= ' update' )
222222 torques(patch_id, l) = torques(patch_id, l) + torque(l)
223223 end do
0 commit comments