SPH
Classes | Functions
Stellar Namespace Reference

Classes

struct  Star
 

Functions

Lut< FloatsolveLaneEmden (const Float n, const Float dz=1.e-3_f, const Float z_max=1.e3_f)
 Solves the Lane-Emden equation given the polytrope index. More...
 
Star polytropicStar (const Float radius, const Float mass, const Float n)
 Computes radial profiles of state quantities for a polytropic star. More...
 
Storage generateIc (const IDistribution &distribution, const Size particleCnt, const Float radius, const Float mass, const Float n)
 Creates a spherical polytropic star. More...
 

Function Documentation

◆ generateIc()

Storage Stellar::generateIc ( const IDistribution distribution,
const Size  particleCnt,
const Float  radius,
const Float  mass,
const Float  n 
)

Creates a spherical polytropic star.

Parameters
distributionDistribution used to generate particles
particleCntNumber of particles
radiusRadius of the star
massTotal mass of the star
nPolytropic index (0 <= n <= 5)
Todo:
add to params

Definition at line 67 of file Stellar.cpp.

◆ polytropicStar()

Stellar::Star Stellar::polytropicStar ( const Float  radius,
const Float  mass,
const Float  n 
)

Computes radial profiles of state quantities for a polytropic star.

Definition at line 38 of file Stellar.cpp.

◆ solveLaneEmden()

NAMESPACE_SPH_BEGIN Lut< Float > Stellar::solveLaneEmden ( const Float  n,
const Float  dz = 1.e-3_f,
const Float  z_max = 1.e3_f 
)

Solves the Lane-Emden equation given the polytrope index.

Definition at line 14 of file Stellar.cpp.