@@ -84,7 +84,7 @@ contains
8484 integer :: i, encoded_pid1, encoded_pid2, xp1, xp2, yp1, yp2, zp1, zp2, pid1, pid2, l ! iterators and patch IDs
8585 real (wp) :: overlap_distance
8686 real (wp), dimension (3 ) :: normal_vector, centroid_1, centroid_2
87- real (wp), dimension (3 ) :: normal_velocity, tangental_vector , normal_force, tangental_force , torque, radial_vector, &
87+ real (wp), dimension (3 ) :: normal_velocity, tangential_vector , normal_force, tangential_force , torque, radial_vector, &
8888 & rotation_velocity, vel1, vel2
8989 real (wp) :: k, eta, effective_mass ! the spring stiffness and damping coefficient and mass of a specific interaction
9090
@@ -95,7 +95,7 @@ contains
9595 ! Iterate over all collisions detected
9696 $:GPU_PARALLEL_LOOP(private= ' [i, l, encoded_pid1, encoded_pid2, xp1, xp2, yp1, yp2, zp1, zp2, pid1, pid2, centroid_1, &
9797 & centroid_2, normal_vector, overlap_distance, effective_mass, k, eta, normal_velocity, &
98- & tangental_vector , normal_force, tangental_force , torque, radial_vector, rotation_velocity, vel1, &
98+ & tangential_vector , normal_force, tangential_force , torque, radial_vector, rotation_velocity, vel1, &
9999 & vel2]' , copy= ' [forces, torques]' )
100100 do i = 1 , num_considered_collisions
101101 encoded_pid1 = collision_lookup(i, 3 )
@@ -138,25 +138,25 @@ contains
138138 vel2 = patch_ib(pid2)%vel + rotation_velocity
139139
140140 normal_velocity = dot_product (vel1 - vel2, normal_vector)* normal_vector
141- tangental_vector = (vel1 - vel2) - normal_velocity
142- if (.not. f_approx_equal(norm2(tangental_vector ), &
143- & 0._wp )) tangental_vector = tangental_vector / norm2(tangental_vector )
141+ tangential_vector = (vel1 - vel2) - normal_velocity
142+ if (.not. f_approx_equal(norm2(tangential_vector ), &
143+ & 0._wp )) tangential_vector = tangential_vector / norm2(tangential_vector )
144144
145145 ! compute force and torque
146146 normal_force = - k* overlap_distance* normal_vector - eta* normal_velocity
147- tangental_force = - ib_coefficient_of_friction* norm2(normal_force)* tangental_vector
148- call s_cross_product(normal_vector* patch_ib(pid1)%radius, tangental_force , torque)
147+ tangential_force = - ib_coefficient_of_friction* norm2(normal_force)* tangential_vector
148+ call s_cross_product(normal_vector* patch_ib(pid1)%radius, tangential_force , torque)
149149
150150 do l = 1 , num_dims
151151 ! update the first IB
152152 $:GPU_ATOMIC(atomic= ' update' )
153- forces(pid1, l) = forces(pid1, l) + (normal_force(l) + tangental_force (l))
153+ forces(pid1, l) = forces(pid1, l) + (normal_force(l) + tangential_force (l))
154154 $:GPU_ATOMIC(atomic= ' update' )
155155 torques(pid1, l) = torques(pid1, l) + torque(l)
156156
157157 ! apply equal and opposite force/ torque to second IB
158158 $:GPU_ATOMIC(atomic= ' update' )
159- forces(pid2, l) = forces(pid2, l) - (normal_force(l) + tangental_force (l))
159+ forces(pid2, l) = forces(pid2, l) - (normal_force(l) + tangential_force (l))
160160 $:GPU_ATOMIC(atomic= ' update' )
161161 torques(pid2, l) = torques(pid2, l) + torque(l)* patch_ib(pid2)%radius/ patch_ib(pid1)%radius
162162 end do
@@ -172,12 +172,12 @@ contains
172172
173173 real (wp), dimension (num_ibs, 3 ), intent (inout ) :: forces, torques
174174 integer :: patch_id, i, l
175- real (wp), dimension (3 ) :: normal_force, tangental_force , normal_vector, normal_velocity, tangental_vector , &
175+ real (wp), dimension (3 ) :: normal_force, tangential_force , normal_vector, normal_velocity, tangential_vector , &
176176 & collision_location, torque, radial_vector, rotation_velocity, velocity
177177 real (wp) :: k, eta ! the spring stiffness and damping coefficient for a specific IB
178178
179179 $:GPU_PARALLEL_LOOP(private= ' [patch_id, i, l, collision_location, normal_vector, k, eta, normal_velocity, &
180- & tangental_vector , normal_force, tangental_force , torque, radial_vector, rotation_velocity, &
180+ & tangential_vector , normal_force, tangential_force , torque, radial_vector, rotation_velocity, &
181181 & velocity]' , copy= ' [forces, torques]' , collapse= 2 )
182182 do patch_id = 1 , num_ibs
183183 do i = 1 , num_dims* 2
@@ -214,16 +214,16 @@ contains
214214
215215 ! standard soft- sphere collision with the wall
216216 normal_velocity = dot_product (velocity, normal_vector)* normal_vector
217- tangental_vector = velocity - normal_velocity
218- if (.not. f_approx_equal(norm2(tangental_vector ), &
219- & 0._wp )) tangental_vector = tangental_vector / norm2(tangental_vector )
217+ tangential_vector = velocity - normal_velocity
218+ if (.not. f_approx_equal(norm2(tangential_vector ), &
219+ & 0._wp )) tangential_vector = tangential_vector / norm2(tangential_vector )
220220 normal_force = - k* wall_overlap_distances(patch_id, i)* normal_vector - eta* normal_velocity
221- tangental_force = - ib_coefficient_of_friction* norm2(normal_force)* tangental_vector
222- call s_cross_product(normal_vector* patch_ib(patch_id)%radius, tangental_force , torque)
221+ tangential_force = - ib_coefficient_of_friction* norm2(normal_force)* tangential_vector
222+ call s_cross_product(normal_vector* patch_ib(patch_id)%radius, tangential_force , torque)
223223
224224 do l = 1 , num_dims
225225 $:GPU_ATOMIC(atomic= ' update' )
226- forces(patch_id, l) = forces(patch_id, l) + (normal_force(l) + tangental_force (l))
226+ forces(patch_id, l) = forces(patch_id, l) + (normal_force(l) + tangential_force (l))
227227 $:GPU_ATOMIC(atomic= ' update' )
228228 torques(patch_id, l) = torques(patch_id, l) + torque(l)
229229 end do
0 commit comments