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

Wind tunnel setup and injection module #470

Merged
merged 14 commits into from
Oct 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion build/Makefile_setups
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ ifeq ($(SETUP), blob)
# Blob evaporation problem
PERIODIC=yes
SETUPFILE= setup_blob.f90
DOUBLEPRECISION= no
DOUBLEPRECISION=no
KNOWN_SETUP=yes
endif

Expand Down Expand Up @@ -843,6 +843,16 @@ ifeq ($(SETUP), BHL)
IND_TIMESTEPS=yes
endif

ifeq ($(SETUP), windtunnel)
# Wind tunnel setup
SETUPFILE= setup_windtunnel.f90
SRCINJECT= inject_windtunnel.f90
GRAVITY=yes
KNOWN_SETUP=yes
IND_TIMESTEPS=yes
ANALYSIS=analysis_common_envelope.f90
endif

ifeq ($(SETUP), jet)
# Jet simulation from Price, Tricco & Bate (2012)
SETUPFILE= velfield_fromcubes.f90 setup_sphereinbox.f90
Expand Down
8 changes: 4 additions & 4 deletions src/main/inject_BHL.f90
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,11 @@ subroutine inject_particles(time,dtlast,xyzh,vxyzu,xyzmh_ptmass,vxyz_ptmass,&
endif

last_time = time-dtlast
outer_layer = ceiling(last_time/time_between_layers)
inner_layer = ceiling(time/time_between_layers)-1 + handled_layers
outer_layer = ceiling(last_time/time_between_layers) ! No. of layers present at t - dt
inner_layer = ceiling(time/time_between_layers)-1 + handled_layers ! No. of layers ought to be present at t
! Inject layers
do i=outer_layer,inner_layer
local_time = time - i*time_between_layers
do i=outer_layer,inner_layer ! loop over layers
local_time = time - i*time_between_layers ! time at which layer was injected
i_limited = mod(i,max_layers)
i_part = int(i_limited/2)*(nodd+neven)+mod(i_limited,2)*neven
if (mod(i,2) == 0) then
Expand Down
Loading