!####################################################################### ! MODULE PROGRAM --- mod_variable --- ### !####################################################################### ! ### ! Module Program for Variables ### ! ### ! The program uses mod_parameter. ### ! ### ! 2009/08/27 ### ! mod 2011/06/11 ### ! mod 2011/07/13 ### !####################################################################### module mod_variable use mod_parameter implicit none !---- Variable for Total Number of SPH Particles ----------------------- integer(4) :: np ! Total Number of SPH Particles !---- Variable for Starting Time --------------------------------------- real(8) :: time_sta ! Starting Time !---- Variables for Each Particles ------------------------------------- integer(4), allocatable :: imat(:) ! Material ID real(8), allocatable :: m(:) ! Mass real(8), allocatable :: x(:,:) ! Position (x,y,z) real(8), allocatable :: v(:,:) ! Velocity (x,y,z) real(8), allocatable :: h(:) ! Smoothing Length real(8), allocatable :: d(:) ! Density real(8), allocatable :: p(:),p_pk(:) ! Pressure real(8), allocatable :: e(:) ! Specific Internal Energy real(8), allocatable :: sv(:) ! Sound Velocity real(8), allocatable :: a(:,:) ! Acceleration of particle (x,y,z) real(8), allocatable :: a_grav(:,:) ! Gravitational Acceleration (x,y,z) real(8), allocatable :: dedt(:) ! de/dt : e is the internal energy real(8), allocatable :: a1(:,:) ! Acceleration [predictor] (x,y,z) real(8), allocatable :: dedt1(:) ! de/dt [predictor] real(8), allocatable :: nu_max(:) ! Max nu for Calculating Timestep real(8), allocatable :: omega(:) ! Term accounting for the gradient of h real(8), allocatable :: zeta(:) real(8), allocatable :: t(:),t_pk(:) ! Temperature real(8), allocatable :: s(:) ! Entropy !---- Variables for Smoothing Length ----------------------------------- real(8) :: hg ! Smoothing Length for Gravity (Constant) real(8) :: h_max ! Max Smoothing Length !---- Variables for Tree Method ---------------------------------------- integer(4), allocatable :: nb(:) ! # of Neighbor Prtcl for Each Prtcl integer(4) :: node_tot ! Total Number of Node !---- Variables for Each Node ------------------------------------------ integer(4), allocatable :: flag_node(:) ! Flag real(8), allocatable :: center_node(:,:) ! Center Position (x,y,z) real(8), allocatable :: center_mass_node(:,:) ! Position of COM (x,y,z) real(8), allocatable :: mass_node(:) ! Mass of Node real(8), allocatable :: h_max_node(:) ! Max h of Node real(8), allocatable :: leng_node(:) ! Length of Node real(8), allocatable :: radius_node(:) ! Radius of Node integer(4), allocatable :: head_branch_id(:) ! Head ID of Branch integer(4), allocatable :: num_branch(:) ! # of Branch !---- Variables for Iteration ------------------------------------------ integer(4) :: h_ite_max ! Max Number of Iterations real(8) :: h_ite_ave ! Average Number of Iterations integer(4), allocatable :: nbi_list(:,:) ! Neighbor List for i-th Particle real(8), allocatable :: dis2_nbi_list(:,:) ! Distance^2 between i-th Particle ! and Neighbor Particles integer(4), allocatable :: wait_list(:,:) integer(4), allocatable :: head_ptcl_id_list(:) integer(4), allocatable :: ptcl_id_list(:) integer(4), allocatable :: np_node(:) integer(4), allocatable :: ptcl_id_list_branch(:) real(8), allocatable :: pdd(:) integer(4), allocatable :: id_nb(:,:) real(8), allocatable :: mc_nb(:,:) real(8), allocatable :: xc_nb(:,:,:) real(8), allocatable :: dis2_nb(:,:) integer(4), allocatable :: iec(:) integer(4), allocatable :: it(:) !----- temptemp ------- ! real(8), allocatable :: ec_tmp(:) ! real(8), allocatable :: tt(:),tt_pk(:) !---------------------- end module mod_variable