ENH: Add dust sizes for multifluid and setup fargo_multifluid_dustsizes#22
ENH: Add dust sizes for multifluid and setup fargo_multifluid_dustsizes#22volodia99 wants to merge 2 commits into
Conversation
pbllambay
left a comment
There was a problem hiding this comment.
Thanks for sharing your setup @volodia99 ,
With @krappleo we reviewed your pull request and we think it would be ready to be merged after some minor changes:
- In the current state, your contribution involves unnecessary changes to the
src/directory:
- The function
InitSizes()is internal tocondinit.cso it does not need to be added tosrc/prototypes.h. - Please move
src/collisions.candsrc/collision_kernel.hto the setup directory.
Once the file collision_kernel.h in the setup directory, change the line
#include "collision_kernel.h"
to
#include "../setups/fargo_multilfluid_dustsizes/collision_kernel.h"
and it should compile smoothly.
-
It seems that your 2D setup makes sense only in the
ISOTHERMALcase. In theADIABATICcase the sound speed should be explicitly used to obtain the collision rate. Please make sure that your setup is physically consistent in the adiabatic case. Otherwise add a warning at the beginning and stop the execution if the setup is adiabatic. -
For 3D
ADIABATICruns, your setup does not work onGPUs as thecspointer is not defined. To fix this add the corresponding pointer instd/collisions_template.cu. In any case, I would suggest removing all occurrences to 3D and ADIABATIC to keep it simple and working only for the proposed setup (2D isothermal fargo setup with a dust-size distribution).
- Please use the units already defined in
src/fondam.cinstead of redefining new unit variables within thecondinit.cfile.
thank you for your contribution.
krappleo
left a comment
There was a problem hiding this comment.
- Modify the macro
EPSTEINDRAGtoCONSTANTSIZE - Please add a brief documentation for the setup in the comments of the pull request (we can include it later in the official documentation of the FARGO3D code)
- Erase the file
setups/fargo_multifluid_dustsizes/._boundaries.txt
-DSTOKESNUMBERin *.opt] or constant sizes [-DEPSTEINDRAGin *.opt].SETUP=fargo_multifluid_dustsizes. In that setup, dust sizes are parametrized byDustSizeMinandDustSizeMax. The initial dust-to-gas density ratio is parametrized byEpsilon(total dust-to-gas mass ratio) andDustSlopeDist(the power-law exponent of the dust size distribution). The implemented drag regime is the epstein regime, which features the dust's internal mass volume density via theDustInternalRhoparameter.DustSizeMinandDustSizeMaxare set in meters, andDustInternalRhoin g/cc. We therefore added two extra parameters, which set the code's unit of length (UnitOfLengthAu) and mass (UnitOfMassMSun). In case the fluids are defined with constant stokes numbers, we useStokesMinandStokesMax.