Cholla 3.0.1-dev
Cholla - Massively parallel hydro on GPUs
Loading...
Searching...
No Matches
Public Member Functions | List of all members
selfgrav_hydrostatic_col::DerivFn< OtherPhiFn > Class Template Reference

#include <selfgrav_hydrostatic_col.h>

Public Member Functions

 DerivFn ()=delete
 !< Caches the value of other_phi_fn(0.0)
 
 DerivFn (Real isoth_term, Real cur_R, Real rho_midplane_guess, OtherPhiFn other_phi_fn) noexcept
 
Real calc_PhiOtherZ (Real z) const noexcept
 
std::array< Real, 3 > operator() (Real z, std::array< Real, 3 > cur_val) const noexcept
 

Detailed Description

template<typename OtherPhiFn>
class selfgrav_hydrostatic_col::DerivFn< OtherPhiFn >

This is all functionality related to initialization strategy described in Wang+ (2010), https://ui.adsabs.harvard.edu/abs/2010MNRAS.407..705W

In this paper, they show how to initialize a self-gravitating gas disk in the limit where the disk is relatively thin. This lets them come up with a reduced form of the Poisson Equation for the gas potential: d2_PhiGas_dz2 = 4 * pi * G (Eqn 14) where d2_PhiGas_dz2 is the second derivative of the gas gravitational potential with respect to z.

In particular, we use their "Potential method", to solve for a vertical density profiles at fixed cyclindrical radius. This only works for a disk where the gas is isothermal. By assuming that the gas is isothermal, they derive that the gas density is given by: rho_gas(z) = rho_midplane * exp(-1 * PhiZ(z) / isoth_term), (Eqn 18)

The primary equation we solve comes from plugging Eqn 18 into Eqn 14. This produces the following equation: d2_PhiGasZ_dz2 = alpha*rho_midplane * exp(-1*PhiZ(z)/isoth_term) (Eqn 19)

where:

At the same time that we solve Eqn 19, we also want to solve for posZ_unnormalized_Sigma0, (the integral or rho_gas(z) from z = 0 to some large z, assuming rho_midplane is temporarily 1). This last quantity is important if we know Sigma(R), the surface density as a function of cylindrical radius.

We can recast these 2 equations into a system of 3 coupled first-order ordinary differential equations:

(d/dz) dPhiGasZ_dz             = alpha * rho_midplane *
                                 exp(-1 * (PhiGasZ(z) + PhiOtherZ(z)) /
                                     isoth_term)
(d/dz) PhiGasZ                 = d_PhiGasZ_dz`
(d/dz) posZ_unnormalized_Sigma = exp(-(PhiGasZ(z) + PhiOtherZ(z)) /
                                     isoth_term)

With this in mind here is our procedure (again this is just for a single cylindrical radius):

  1. Start with an initial guess for rho_midplane
  2. Use our guess for rho_midplane to integrate the system of 3 differential equations from z = 0 out to "large z." At z = 0: d_PhiGasZ_dz, PhiGasZ, & posZ_unnormalized_Sigma are all 0.
  3. Compute a new guess for rho_midplane from Sigma(R) / (2 * posZ_unnormalized_Sigma)
  4. If our new guess was "close enough" to our previous guess, we're done. Otherwise, go back to step 2 using our newest guess.

Member Function Documentation

◆ calc_PhiOtherZ()

template<typename OtherPhiFn >
Real selfgrav_hydrostatic_col::DerivFn< OtherPhiFn >::calc_PhiOtherZ ( Real  z) const
inlinenoexcept

helper function that computes the gravitational potential (not contributed by the gas) measured with respect to the midplane

◆ operator()()

template<typename OtherPhiFn >
std::array< Real, 3 > selfgrav_hydrostatic_col::DerivFn< OtherPhiFn >::operator() ( Real  z,
std::array< Real, 3 >  cur_val 
) const
inlinenoexcept

Compute the actual derivative of the 3 quantities at the given z and current values.


The documentation for this class was generated from the following file: