Peano 4
Loading...
Searching...
No Matches
applications::exahype2::euler::sphericalaccretion Namespace Reference

Data Structures

class  MassAccumulator
 Simple spherical mass accumulator. More...
 
class  SSInfall
 

Functions

void initialiseOverdensity_topHat (double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &x, double topHatRadius, double additionalMass, double baselineDensity, double baselinePressure, double gamma)
 Set the initial overdensity profile as top hat.
 
void initialiseHomogeneousDensity (double *__restrict__ Q, double baselineDensity, double baselinePressure, double gamma)
 Baseline configuration where no overdensity is applied.
 
void initialiseOverdensity_Gaussian (double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &x, double topHatRadius, double additionalMass, double baselineDensity, double baselinePressure, double gamma)
 Initialise overdensity according to Gaussian.
 
void initialiseOverdensity_bumpFunction (double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &x, double topHatRadius, double additionalMass, double baselineDensity, double baselinePressure, double gamma)
 Alternative to Gaussian.
 
void initialiseOverdensity_hyperbolicSecant (double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &x, double topHatRadius, double additionalMass, double baselineDensity, double baselinePressure, double gamma)
 Alternative to Gaussian.
 
void addGravitationalSource_AlphaCDM (double *__restrict__ S, const tarch::la::Vector< Dimensions, double > &x, const double *__restrict__ Q, double mass, double aInitial, double t)
 

Function Documentation

◆ addGravitationalSource_AlphaCDM()

void applications::exahype2::euler::sphericalaccretion::addGravitationalSource_AlphaCDM ( double *__restrict__ S,
const tarch::la::Vector< Dimensions, double > & x,
const double *__restrict__ Q,
double mass,
double aInitial,
double t )

◆ initialiseHomogeneousDensity()

void applications::exahype2::euler::sphericalaccretion::initialiseHomogeneousDensity ( double *__restrict__ Q,
double baselineDensity,
double baselinePressure,
double gamma )

Baseline configuration where no overdensity is applied.

Definition at line 4 of file GravityModel.cpp.

Referenced by benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallFD4::initialCondition().

Here is the caller graph for this function:

◆ initialiseOverdensity_bumpFunction()

void applications::exahype2::euler::sphericalaccretion::initialiseOverdensity_bumpFunction ( double *__restrict__ Q,
const tarch::la::Vector< Dimensions, double > & x,
double topHatRadius,
double additionalMass,
double baselineDensity,
double baselinePressure,
double gamma )

Alternative to Gaussian.

See also
initialiseOverdensity_Gaussian()

Definition at line 67 of file GravityModel.cpp.

References tarch::la::norm2(), tarch::la::PI, and tarch::la::smallerEquals().

Here is the call graph for this function:

◆ initialiseOverdensity_Gaussian()

void applications::exahype2::euler::sphericalaccretion::initialiseOverdensity_Gaussian ( double *__restrict__ Q,
const tarch::la::Vector< Dimensions, double > & x,
double topHatRadius,
double additionalMass,
double baselineDensity,
double baselinePressure,
double gamma )

Initialise overdensity according to Gaussian.

This routine computes the overdensity given the additionalMass and then distributes it according to the Gaussian. Different to the top hat function that is implemented in initialiseOverdensity_topHat(), we have an extremely smooth and global mass distribution.

To switch to a smooth global mass overdistribution is reasonable in the context of higher order methods, where discontinuous initial conditions yield oscillations in the absense of a limiter. A big disadvantage of a non-local overdensity is that the mass integration cannot be localised either.

We recognise that our MNRAS paper discretises the shells, i.e. the integration range, and that the underlying code in MassAccumulator identifies which shells do make a significant contribution. Shells far away from the centre of the overdensity are ignored. This corresponds to a localisation of the Gaussian, i.e. its support is again localised. The disadvantage of this truncation is that the total mass is not equal to additionalMass anymore. Therefore, it makes sense to slightly scale the mass distribution to preserve the total mass again. I found a scaling of around 1.5 reasonable for many experiments, but guess that a proper scaling in practice depends on the size of the shells that you use, the domain size, the integration order and the mesh width. So there might be some trial and error involved.

Definition at line 39 of file GravityModel.cpp.

References tarch::la::norm2(), and tarch::la::PI.

Referenced by benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallDG::initialCondition().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialiseOverdensity_hyperbolicSecant()

void applications::exahype2::euler::sphericalaccretion::initialiseOverdensity_hyperbolicSecant ( double *__restrict__ Q,
const tarch::la::Vector< Dimensions, double > & x,
double topHatRadius,
double additionalMass,
double baselineDensity,
double baselinePressure,
double gamma )

Alternative to Gaussian.

See also
initialiseOverdensity_Gaussian()

Definition at line 95 of file GravityModel.cpp.

References assertion, tarch::la::norm2(), and tarch::la::PI.

Here is the call graph for this function:

◆ initialiseOverdensity_topHat()

void applications::exahype2::euler::sphericalaccretion::initialiseOverdensity_topHat ( double *__restrict__ Q,
const tarch::la::Vector< Dimensions, double > & x,
double topHatRadius,
double additionalMass,
double baselineDensity,
double baselinePressure,
double gamma )

Set the initial overdensity profile as top hat.

Within the radius of topHatRadius, we add some overdensity. Everywhere else, no overdensity is applied, i.e. we stick to baselineDensity. The overdensity is chosen such that the total mass of the overdensity equals additionalMass but if and only if we integrate it exactly. The very moment you discretise the domain, you will get an under- or overapproximation.

This initial configuration usually works fine for Finite Volume-type methods which can resolve discontinuities. It usually breaks down for higher order methods where the discontinuity in the initial condition tends to induce oscillations. In this case, you have to approximate the top hat with something smooth. We usually use the Gaussian.

See also
initialiseOverdensity_Gaussian()

Definition at line 15 of file GravityModel.cpp.

References tarch::la::norm2(), and tarch::la::PI.

Referenced by benchmarks::exahype2::euler::sphericalaccretionupscaling::SelfSimilarInfallFV::initialCondition().

Here is the call graph for this function:
Here is the caller graph for this function: