Skip to content

Commit

Permalink
(windtunnel) fix some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
themikelau committed Sep 28, 2023
1 parent 86b003b commit 416d0cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/main/inject_windtunnel.f90
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module inject

! Particle-related parameters
integer, public :: lattice_type = 1
real, public :: handled_layers = 4
integer, public :: handled_layers = 4
real, public :: wind_radius = 30.
real, public :: wind_injection_x = -10.
real, public :: wind_length = 100.
Expand Down Expand Up @@ -146,7 +146,8 @@ subroutine init_inject(ierr)
max_particles = int(max_layers*(nodd+neven)/2) + nstar
time_between_layers = distance_between_layers/v_inf

call print_summary(v_inf,cs_inf,rho_inf,pres_inf,mach,pmass,distance_between_layers,time_between_layers,max_layers,nstar,max_particles)
call print_summary(v_inf,cs_inf,rho_inf,pres_inf,mach,pmass,distance_between_layers,&
time_between_layers,max_layers,nstar,max_particles)

if (max_particles > maxp) call fatal('windtunnel', 'maxp too small for this simulation, please increase MAXP!')

Expand Down
6 changes: 3 additions & 3 deletions src/setup/setup_windtunnel.f90
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ subroutine setpart(id,npart,npartoftype,xyzh,massoftype,vxyzu,polyk,gamma,hfact,
stop 'please check and edit .setup file and rerun phantomsetup'
endif

call check_setup(pmass,ierr)
if (ierr /= 0) call fatal('windtunnel','errors in setup parameters')
pmass = Mstar / real(nstar)
massoftype(igas) = pmass
call check_setup(pmass,ierr)
if (ierr /= 0) call fatal('windtunnel','errors in setup parameters')


! Initialise particle injection
Expand Down Expand Up @@ -259,7 +259,7 @@ end subroutine read_setupfile
!+
!-----------------------------------------------------------------------
subroutine check_setup(pmass,ierr)
real, intent(in) :: pmass
real, intent(in) :: pmass
integer, intent(out) :: ierr
real :: min_layer_sep

Expand Down

0 comments on commit 416d0cf

Please sign in to comment.