DelNov / T-Flows

Program for Simulation of Turbulent Flows
Other
109 stars 48 forks source link

Calculate the distance between neighbouring cell #223

Open tom450 opened 3 years ago

tom450 commented 3 years ago

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 ?