Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

发现粘性力功率计算的实现和公式(4.59)有出入 #11

Closed
wants to merge 8 commits into from
3 changes: 2 additions & 1 deletion src/kernel/kernel.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
!> 计算光滑函数 Wij 及其倒数 dWdxij 的子例程
!> 计算光滑函数 Wij 及其导数 dWdxij 的子例程
!> subroutine to calculate the smoothing kernel wij and its
!> derivatives dwdxij.
subroutine kernel(r, dx, hsml, w, dwdx)
Expand Down Expand Up @@ -53,6 +53,7 @@ subroutine kernel(r, dx, hsml, w, dwdx)
w = factor*1._rk/6._rk*(2._rk - q)**3
do d = 1, dim
dwdx(d) = -factor*1._rk/6._rk*3.*(2._rk - q)**2/hsml*(dx(d)/r)
!dwda(d) =-factor*(2._rk - q)**2/2*hsml*(dx(d)/r)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dwdx(d)应该没有问题?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

原来的写着比较冗余,所以我简化了一下

end do
else
w = 0._rk
Expand Down