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

ENH: Add dust sizes for multifluid and setup fargo_multifluid_dustsizes #22

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

volodia99
Copy link

@volodia99 volodia99 commented Dec 9, 2024

  • Dust fluids can now be modeled as fluids with constant Stokes numbers [-DSTOKESNUMBER in *.opt] or constant sizes [-DEPSTEINDRAG in *.opt].
  • We added a SETUP=fargo_multifluid_dustsizes. In that setup, dust sizes are parametrized by DustSizeMin and DustSizeMax. The initial dust-to-gas density ratio is parametrized by Epsilon (total dust-to-gas mass ratio) and DustSlopeDist (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 the DustInternalRho parameter. DustSizeMin and DustSizeMax are set in meters, and DustInternalRho in 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 use StokesMin and StokesMax.

@pbllambay pbllambay added the enhancement New feature or request label Dec 26, 2024
@pbllambay pbllambay self-assigned this Dec 26, 2024
Copy link
Contributor

@pbllambay pbllambay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. In the current state, your contribution involves unnecessary changes to the src/ directory:
  • The function InitSizes() is internal to condinit.c so it does not need to be added to src/prototypes.h.
  • Please move src/collisions.c and src/collision_kernel.h to 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.

  1. It seems that your 2D setup makes sense only in the ISOTHERMAL case. In the ADIABATIC case 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.

  2. For 3D ADIABATIC runs, your setup does not work on GPUs as the cs pointer is not defined. To fix this add the corresponding pointer in std/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).

  1. Please use the units already defined in src/fondam.c instead of redefining new unit variables within the condinit.c file.

thank you for your contribution.

@pbllambay pbllambay assigned volodia99 and unassigned pbllambay Dec 26, 2024
Copy link
Contributor

@krappleo krappleo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Modify the macro EPSTEINDRAG to CONSTANTSIZE
  • 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants