Skip to content

Commit

Permalink
effect edits
Browse files Browse the repository at this point in the history
Former-commit-id: 3233493
  • Loading branch information
dtamayo committed Mar 15, 2023
1 parent 380d9bf commit 112b7f2
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 28 deletions.
39 changes: 39 additions & 0 deletions doc/effects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,45 @@ R_eq (double) No Equatorial radius of nonspherical body
============================ =========== ==================================================================


Gas Effects
^^^^^^^^^^^^^^^^^^

.. _gas_df:

gas_df
******

======================= ===============================================
Authors A. Generozov, H. Perets
Implementation Paper `Generozov and Perets 2022 <https://arxiv.org/abs/2212.11301>`_
Based on `Ostriker 1999 (with simplifications) <https://ui.adsabs.harvard.edu/abs/1999ApJ...513..252O/abstract>`_, `Just et al 2012 <https://ui.adsabs.harvard.edu/abs/2012ApJ...758...51J/abstract>`_.
C Example :ref:`c_example_gas_df`
Python Example `gas_df.ipynb <https://github.com/dtamayo/reboundx/blob/master/ipython_examples/gas_df.ipynb>`_


======================= ===============================================


**Effect Parameters**

============================ =========== ==================================================================
Field (C type) Required Description
============================ =========== ==================================================================
rhog (double) Yes Normalization of density. Density in the disk midplane is rhog*r^alpha_rhog
alpha_rhog (double) Yes Power-law slope of the power-law density profile.
cs (double) Yes Normalization of the sound speed. Sound speed has profile cs*r^alpha_cs
alpha_cs (double) Yes Power-law slope of the sound speed
xmin (double) Yes Dimensionless parameter that determines the Coulomb logarithm (ln(L) =log (1/xmin))
hr (double) Yes Aspect ratio of the disk
Qd (double) Yes Prefactor for geometric drag
============================ =========== ==================================================================


**Particle Parameters**

None.


Integration Steppers
^^^^^^^^^^^^^^^^^^^^

Expand Down
2 changes: 1 addition & 1 deletion examples/gas_df/problem.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Gas dynamical friction
*
* This example shows how to add a the gas_df force.
* This example shows how to add the gas_df force.
*/
#include <stdio.h>
#include <stdlib.h>
Expand Down
33 changes: 13 additions & 20 deletions ipython_examples/gas_df.ipynb

Large diffs are not rendered by default.

11 changes: 4 additions & 7 deletions src/gas_df.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
*
* ======================= ===============================================
* Authors A. Generozov, H. Perets
* Implementation Paper `Generozov and Perets 2022 <https://arxiv.org/abs/2212.11301>`_.
* Based on `Ostriker 1999 (with simplifications) <https://ui.adsabs.harvard.edu/abs/1999ApJ...513..252O/abstract>`, `Just et al 2012 <https://ui.adsabs.harvard.edu/abs/2012ApJ...758...51J/abstract>`
* Implementation Paper `Generozov and Perets 2022 <https://arxiv.org/abs/2212.11301>`_
* Based on `Ostriker 1999 (with simplifications) <https://ui.adsabs.harvard.edu/abs/1999ApJ...513..252O/abstract>`_, `Just et al 2012 <https://ui.adsabs.harvard.edu/abs/2012ApJ...758...51J/abstract>`_.
* C Example :ref:`c_example_gas_df`
* Python Example :ref:`gas_df.ipynb <https://github.com/dtamayo/reboundx/blob/master/ipython_examples/gas_df.ipynb>`_.
* Python Example `gas_df.ipynb <https://github.com/dtamayo/reboundx/blob/master/ipython_examples/gas_df.ipynb>`_
*
*
* ======================= ===============================================
Expand All @@ -47,7 +47,7 @@
* alpha_rhog (double) Yes Power-law slope of the power-law density profile.
* cs (double) Yes Normalization of the sound speed. Sound speed has profile cs*r^alpha_cs
* alpha_cs (double) Yes Power-law slope of the sound speed
* xmin (double) Yes Dimensionaless parameter that determines the Coulomb logarithm (ln(L) =log (1/xmin))
* xmin (double) Yes Dimensionless parameter that determines the Coulomb logarithm (ln(L) =log (1/xmin))
* hr (double) Yes Aspect ratio of the disk
* Qd (double) Yes Prefactor for geometric drag
* ============================ =========== ==================================================================
Expand All @@ -63,9 +63,6 @@
#include <math.h>
#include <stdlib.h>
#include "reboundx.h"
#include <gsl/gsl_sf_exp.h>
#include <gsl/gsl_sf_erf.h>


static double mach_piece_sub(const double mach){
//Using powerlaw expansion at low mach numbers for numerical reasons
Expand Down

0 comments on commit 112b7f2

Please sign in to comment.