diff --git a/src/common/include/ExtrusionHardcodedIC.fpp b/src/common/include/ExtrusionHardcodedIC.fpp index 762876ecc3..0e54397e3a 100644 --- a/src/common/include/ExtrusionHardcodedIC.fpp +++ b/src/common/include/ExtrusionHardcodedIC.fpp @@ -192,7 +192,7 @@ end select #:enddef -#:def HardcodedDellacation() +#:def HardcodedDeallocation() if (allocated(stored_values)) then @:DEALLOCATE(stored_values) @:DEALLOCATE(x_coords) diff --git a/src/common/m_finite_differences.fpp b/src/common/m_finite_differences.fpp index 32075eb034..0bc85518ed 100644 --- a/src/common/m_finite_differences.fpp +++ b/src/common/m_finite_differences.fpp @@ -39,7 +39,7 @@ contains #ifdef MFC_POST_PROCESS if (allocated(fd_coeff_s)) deallocate (fd_coeff_s) - allocate (fd_coeff_s(-fd_number_in:fd_number_in,lb:lE)) + allocate (fd_coeff_s(-fd_number_in:fd_number_in,lB:lE)) #endif ! Computing the 1st order finite-difference coefficients diff --git a/src/pre_process/m_icpp_patches.fpp b/src/pre_process/m_icpp_patches.fpp index 9775d15bc7..d80949037a 100644 --- a/src/pre_process/m_icpp_patches.fpp +++ b/src/pre_process/m_icpp_patches.fpp @@ -216,7 +216,7 @@ contains if (1._wp - eta < sgm_eps) patch_id_fp(i, 0, 0) = patch_id end if end do - @:HardcodedDellacation() + @:HardcodedDeallocation() end subroutine s_icpp_line_segment @@ -280,7 +280,7 @@ contains end if end do end do - @:HardcodedDellacation() + @:HardcodedDeallocation() end subroutine s_icpp_spiral @@ -336,7 +336,7 @@ contains end if end do end do - @:HardcodedDellacation() + @:HardcodedDeallocation() end subroutine s_icpp_circle @@ -393,7 +393,7 @@ contains end if end do end do - @:HardcodedDellacation() + @:HardcodedDeallocation() end subroutine s_icpp_varcircle @@ -456,7 +456,7 @@ contains end do end do end do - @:HardcodedDellacation() + @:HardcodedDeallocation() end subroutine s_icpp_3dvarcircle @@ -513,7 +513,7 @@ contains end if end do end do - @:HardcodedDellacation() + @:HardcodedDeallocation() end subroutine s_icpp_ellipse @@ -584,7 +584,7 @@ contains end do end do end do - @:HardcodedDellacation() + @:HardcodedDeallocation() end subroutine s_icpp_ellipsoid @@ -653,7 +653,7 @@ contains end if end do end do - @:HardcodedDellacation() + @:HardcodedDeallocation() end subroutine s_icpp_rectangle @@ -712,7 +712,7 @@ contains end if end do end do - @:HardcodedDellacation() + @:HardcodedDeallocation() end subroutine s_icpp_sweep_line @@ -781,7 +781,7 @@ contains end if end do end do - @:HardcodedDellacation() + @:HardcodedDeallocation() end subroutine s_icpp_2D_TaylorGreen_Vortex @@ -835,7 +835,7 @@ contains end if end if end do - @:HardcodedDellacation() + @:HardcodedDeallocation() end subroutine s_icpp_1D_bubble_pulse @@ -1023,7 +1023,7 @@ contains end do end do end do - @:HardcodedDellacation() + @:HardcodedDeallocation() end subroutine s_icpp_sphere @@ -1093,7 +1093,7 @@ contains end do end do end do - @:HardcodedDellacation() + @:HardcodedDeallocation() end subroutine s_icpp_cuboid @@ -1188,7 +1188,7 @@ contains end do end do end do - @:HardcodedDellacation() + @:HardcodedDeallocation() end subroutine s_icpp_cylinder @@ -1259,7 +1259,7 @@ contains end do end do end do - @:HardcodedDellacation() + @:HardcodedDeallocation() end subroutine s_icpp_sweep_plane diff --git a/src/simulation/m_collisions.fpp b/src/simulation/m_collisions.fpp index 9a7af03ac1..8167ecc887 100644 --- a/src/simulation/m_collisions.fpp +++ b/src/simulation/m_collisions.fpp @@ -84,7 +84,7 @@ contains integer :: i, encoded_pid1, encoded_pid2, xp1, xp2, yp1, yp2, zp1, zp2, pid1, pid2, l ! iterators and patch IDs real(wp) :: overlap_distance real(wp), dimension(3) :: normal_vector, centroid_1, centroid_2 - real(wp), dimension(3) :: normal_velocity, tangental_vector, normal_force, tangental_force, torque, radial_vector, & + real(wp), dimension(3) :: normal_velocity, tangential_vector, normal_force, tangential_force, torque, radial_vector, & & rotation_velocity, vel1, vel2 real(wp) :: k, eta, effective_mass ! the spring stiffness and damping coefficient and mass of a specific interaction @@ -95,7 +95,7 @@ contains ! Iterate over all collisions detected $:GPU_PARALLEL_LOOP(private='[i, l, encoded_pid1, encoded_pid2, xp1, xp2, yp1, yp2, zp1, zp2, pid1, pid2, centroid_1, & & centroid_2, normal_vector, overlap_distance, effective_mass, k, eta, normal_velocity, & - & tangental_vector, normal_force, tangental_force, torque, radial_vector, rotation_velocity, vel1, & + & tangential_vector, normal_force, tangential_force, torque, radial_vector, rotation_velocity, vel1, & & vel2]', copy='[forces, torques]') do i = 1, num_considered_collisions encoded_pid1 = collision_lookup(i, 3) @@ -138,25 +138,25 @@ contains vel2 = patch_ib(pid2)%vel + rotation_velocity normal_velocity = dot_product(vel1 - vel2, normal_vector)*normal_vector - tangental_vector = (vel1 - vel2) - normal_velocity - if (.not. f_approx_equal(norm2(tangental_vector), & - & 0._wp)) tangental_vector = tangental_vector/norm2(tangental_vector) + tangential_vector = (vel1 - vel2) - normal_velocity + if (.not. f_approx_equal(norm2(tangential_vector), & + & 0._wp)) tangential_vector = tangential_vector/norm2(tangential_vector) ! compute force and torque normal_force = -k*overlap_distance*normal_vector - eta*normal_velocity - tangental_force = -ib_coefficient_of_friction*norm2(normal_force)*tangental_vector - call s_cross_product(normal_vector*patch_ib(pid1)%radius, tangental_force, torque) + tangential_force = -ib_coefficient_of_friction*norm2(normal_force)*tangential_vector + call s_cross_product(normal_vector*patch_ib(pid1)%radius, tangential_force, torque) do l = 1, num_dims ! update the first IB $:GPU_ATOMIC(atomic='update') - forces(pid1, l) = forces(pid1, l) + (normal_force(l) + tangental_force(l)) + forces(pid1, l) = forces(pid1, l) + (normal_force(l) + tangential_force(l)) $:GPU_ATOMIC(atomic='update') torques(pid1, l) = torques(pid1, l) + torque(l) ! apply equal and opposite force/torque to second IB $:GPU_ATOMIC(atomic='update') - forces(pid2, l) = forces(pid2, l) - (normal_force(l) + tangental_force(l)) + forces(pid2, l) = forces(pid2, l) - (normal_force(l) + tangential_force(l)) $:GPU_ATOMIC(atomic='update') torques(pid2, l) = torques(pid2, l) + torque(l)*patch_ib(pid2)%radius/patch_ib(pid1)%radius end do @@ -172,12 +172,12 @@ contains real(wp), dimension(num_ibs, 3), intent(inout) :: forces, torques integer :: patch_id, i, l - real(wp), dimension(3) :: normal_force, tangental_force, normal_vector, normal_velocity, tangental_vector, & + real(wp), dimension(3) :: normal_force, tangential_force, normal_vector, normal_velocity, tangential_vector, & & collision_location, torque, radial_vector, rotation_velocity, velocity real(wp) :: k, eta ! the spring stiffness and damping coefficient for a specific IB $:GPU_PARALLEL_LOOP(private='[patch_id, i, l, collision_location, normal_vector, k, eta, normal_velocity, & - & tangental_vector, normal_force, tangental_force, torque, radial_vector, rotation_velocity, & + & tangential_vector, normal_force, tangential_force, torque, radial_vector, rotation_velocity, & & velocity]', copy='[forces, torques]', collapse=2) do patch_id = 1, num_ibs do i = 1, num_dims*2 @@ -214,16 +214,16 @@ contains ! standard soft-sphere collision with the wall normal_velocity = dot_product(velocity, normal_vector)*normal_vector - tangental_vector = velocity - normal_velocity - if (.not. f_approx_equal(norm2(tangental_vector), & - & 0._wp)) tangental_vector = tangental_vector/norm2(tangental_vector) + tangential_vector = velocity - normal_velocity + if (.not. f_approx_equal(norm2(tangential_vector), & + & 0._wp)) tangential_vector = tangential_vector/norm2(tangential_vector) normal_force = -k*wall_overlap_distances(patch_id, i)*normal_vector - eta*normal_velocity - tangental_force = -ib_coefficient_of_friction*norm2(normal_force)*tangental_vector - call s_cross_product(normal_vector*patch_ib(patch_id)%radius, tangental_force, torque) + tangential_force = -ib_coefficient_of_friction*norm2(normal_force)*tangential_vector + call s_cross_product(normal_vector*patch_ib(patch_id)%radius, tangential_force, torque) do l = 1, num_dims $:GPU_ATOMIC(atomic='update') - forces(patch_id, l) = forces(patch_id, l) + (normal_force(l) + tangental_force(l)) + forces(patch_id, l) = forces(patch_id, l) + (normal_force(l) + tangential_force(l)) $:GPU_ATOMIC(atomic='update') torques(patch_id, l) = torques(patch_id, l) + torque(l) end do diff --git a/toolchain/mfc/test/case.py b/toolchain/mfc/test/case.py index ebc037a42b..e839c41030 100644 --- a/toolchain/mfc/test/case.py +++ b/toolchain/mfc/test/case.py @@ -484,9 +484,9 @@ def create_input_lagrange(path_test): def copy_input_lagrange(path_example_input, path_test): folder_path_dest = path_test + "/input/" - fite_path_dest = folder_path_dest + "lag_bubbles.dat" + file_path_dest = folder_path_dest + "lag_bubbles.dat" file_path_src = common.MFC_EXAMPLE_DIRPATH + path_example_input + "/input/lag_bubbles.dat" if not os.path.exists(folder_path_dest): os.mkdir(folder_path_dest) - shutil.copyfile(file_path_src, fite_path_dest) + shutil.copyfile(file_path_src, file_path_dest)