Blackholes swallowing - Gas case
This implements the following:
- Black holes carry metal information. That is obtained at brith time and written to snapshots.
- Added 1 new loop over the gas neighbours of BHs to tag the gas particles that will be swallowed.
- Added a field to the gas particles to carry the swallowing information.
- Added a set of tasks to process the particles that have been tagged for swallowing.
- Reduced the number of BH tasks by only creating them for cells that actually contain black holes.
- Added the communication and dependencies that are needed for the swallowing.
- Implemented the EAGLE model for BH swallowing of gas.
- In debugging mode, copy the (const) pointer to the task that is run into the runner. Helps seeing where we are.
Merge request reports
Activity
I do not really know how to test this effectively. I guess making sure it does not crash or hang on big runs is the starting point.
To force more swallowing to happen in the low-z examples, the line 58 of
src/black_holes/EAGLE/black_holes.h
can be alterted to make the subgrid mass much larger than the actual mass. However, this will also increase the amount of feedback that will take place. Maybe reducingmass
instead of increasingsubgrid_mass
can work...The new example is currently not useful. I will expand it to make it more useful and actually a good example when I work on the BH-BH swallowing.
added 1 commit
- 51698c15 - Fixed typo in the default chemistry model and missing file update.
mentioned in issue #589 (closed)
mentioned in issue #593 (closed)
Just running some basic checks and it fails on the following:
./configure --disable-vec --with-chemistry=GEAR
libtool: compile: mpicc -DHAVE_CONFIG_H -I. -I.. -I/cosma/local/Python/2.7.15/lib/python2.7/site-packages/numpy/core/include/ -I/cosma/local/fftw//gnu_7.3.0_intel_mpi_2018/3.3.7/include -I/cosma/local/parmetis/gnu_7.3.0_intel_mpi_2018/4.0.3/include -I/cosma/local/hdf5//gnu_7.3.0/1.8.20/include -I/cosma/local/gsl/2.4/include -I/cosma/local/Intel/Parallel_Studio_XE_2018/impi/2018.2.199//include64/ -I/cosma/local/gcc/7.3.0/include -I/cosma/local/parmetis/intel_2018_intel_mpi_2018/4.0.3/include -I/cosma/local/fftw//intel_2018_intel_mpi_2018/3.3.7/include -I/cosma/local/hdf5//intel_2018/1.10.3/include -I/cosma/local/gcc/7.3.0/include -I/cosma/local/hdf5/gnu_7.3.0/1.8.20/include -O3 -fomit-frame-pointer -malign-double -fstrict-aliasing -ffast-math -funroll-loops -march=sandybridge -mavx -fno-tree-vectorize -pthread -Wall -Wextra -Wno-unused-parameter -Wshadow -Werror -Wstrict-prototypes -MT libswiftsim_la-space.lo -MD -MP -MF .deps/libswiftsim_la-space.Tpo -c space.c -fPIC -DPIC -o .libs/libswiftsim_la-space.o libtool: compile: mpicc -DHAVE_CONFIG_H -I. -I.. -I/cosma/local/Python/2.7.15/lib/python2.7/site-packages/numpy/core/include/ -I/cosma/local/fftw//gnu_7.3.0_intel_mpi_2018/3.3.7/include -I/cosma/local/parmetis/gnu_7.3.0_intel_mpi_2018/4.0.3/include -I/cosma/local/hdf5//gnu_7.3.0/1.8.20/include -I/cosma/local/gsl/2.4/include -I/cosma/local/Intel/Parallel_Studio_XE_2018/impi/2018.2.199//include64/ -I/cosma/local/gcc/7.3.0/include -I/cosma/local/parmetis/intel_2018_intel_mpi_2018/4.0.3/include -I/cosma/local/fftw//intel_2018_intel_mpi_2018/3.3.7/include -I/cosma/local/hdf5//intel_2018/1.10.3/include -I/cosma/local/gcc/7.3.0/include -I/cosma/local/hdf5/gnu_7.3.0/1.8.20/include -O3 -fomit-frame-pointer -malign-double -fstrict-aliasing -ffast-math -funroll-loops -march=sandybridge -mavx -fno-tree-vectorize -pthread -Wall -Wextra -Wno-unused-parameter -Wshadow -Werror -Wstrict-prototypes -MT libswiftsim_la-runner.lo -MD -MP -MF .deps/libswiftsim_la-runner.Tpo -c runner.c -fPIC -DPIC -o .libs/libswiftsim_la-runner.o In file included from part.h:117:0, from space.h:37, from space.c:40: ./black_holes/Default/black_holes_part.h:67:31: error: field 'chemistry_data' has incomplete type struct chemistry_bpart_data chemistry_data; ^~~~~~~~~~~~~~ In file included from part.h:117:0, from gravity.h:28, from multipole.h:34, from cell.h:37, from cache.h:27, from runner.h:30, from runner.c:38: ./black_holes/Default/black_holes_part.h:67:31: error: field 'chemistry_data' has incomplete type struct chemistry_bpart_data chemistry_data; ^~~~~~~~~~~~~~
added 1 commit
- b1ac5b83 - Added the new missing functions and structures to the GEAR model.
All seems to compile and simple tests run, so I'm trying an EAGLE_50/0.1 with all the EAGLE physics switched on. The bh tasks ran in steps 90, 154 and 244 so far. No idea if any actual gas particles went down the hole. I guess that number will change in the snapshots, but only have one so far (running with debugging checks enabled). I doubt I'll get back to this until the end of next week, (holidays/hackathons) so if this is holding you up, go ahead and accept. The results are in:
- /cosma5/data/pdraper/swift-tests/swiftsim-master/examples/EAGLE_low_z/EAGLE_50
if curious.
BTW, running with
-y 1
, so each step outputs athread_stats-step<n>.dat
, that is a light weight way of seeing what tasks run in each step and doesn't need any configuration options.Edited by Peter W. Draperadded 1 commit
- 4cf55d05 - Also remove the gpart counterpart of a particle when they go beyond the edge.
added 1 commit
- 5340f2ca - Do not collect the number of inhibited particles in the cells. The space counter is enough.
added 1 commit
- 470edb92 - Count the inhibited particles correctly when constructing the hash table for snapshots.
added 1 commit
- c83e655d - Be more clean about types when incrementing the global inhibited counters.