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

Calculate the distance between neighbouring cell #223

Open
tom450 opened this issue Mar 5, 2021 · 0 comments
Open

Calculate the distance between neighbouring cell #223

tom450 opened this issue Mar 5, 2021 · 0 comments

Comments

@tom450
Copy link

tom450 commented Mar 5, 2021

On the one hand, in the subroutine of "Grid_Mod_Load_Geo(grid, this_proc, domain)", there are:
read(fu) (grid % xc(c), c = -grid % n_bnd_cells, grid % n_cells)
read(fu) (grid % yc(c), c = -grid % n_bnd_cells, grid % n_cells)
read(fu) (grid % zc(c), c = -grid % n_bnd_cells, grid % n_cells)
read(fu) (grid % dx(s), s = 1, grid % n_faces + grid % n_shadows)
read(fu) (grid % dy(s), s = 1, grid % n_faces + grid % n_shadows)
read(fu) (grid % dz(s), s = 1, grid % n_faces + grid % n_shadows)

On the other hand, in the subroutine of " Grid_Mod_Calculate_Face_Geometry(grid)", there are:
!-------------------------------------------------------!
! Calculate the distance between neighbouring cells !
! (For normal faces, including the periodic ones, !
! dx, dy and dz are distanes between cell centers) !
!-------------------------------------------------------!
do s = 1, grid % n_faces
c1 = grid % faces_c(1,s)
c2 = grid % faces_c(2,s)

xc1 = grid % xc(c1)
yc1 = grid % yc(c1)
zc1 = grid % zc(c1)

xc2 = grid % xc(c2) + grid % dx(s)
yc2 = grid % yc(c2) + grid % dy(s)
zc2 = grid % zc(c2) + grid % dz(s)

grid % dx(s) = xc2-xc1
grid % dy(s) = yc2-yc1
grid % dz(s) = zc2-zc1

end do ! faces

Thus,I think these lines mean "grid % dx(s) = 2 * grid % dx(s) ", "grid % dy(s) = 2 * grid % dy(s) " and "grid % dz(s) = 2 * grid % dz(s) " . Is it correct ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant