SPH methods

class pNbody._sph_mixin._NbodySphMixin

Bases: object

Provide SPH functions for N-body simulation particles.

ComputeDensityAndHsml(pos=None, Hsml=None, DesNumNgb=None, MaxNumNgbDeviation=None, Tree=None)

Compute Density and Hsml (for a specific place)

ComputeRsp(Nngb=5)

Compute a value for self.rsp base on the distance to the Nngb neighbours This function is not paralellised.

ComputeSph(DesNumNgb=None, MaxNumNgbDeviation=None, Tree=None)

Compute self.SphDensity and self.Hsml using sph approximation

InitSphParameters(DesNumNgb=33, MaxNumNgbDeviation=3)
SphEvaluate(val, pos=None, vel=None, hsml=None, DesNumNgb=None, MaxNumNgbDeviation=None, Tree=None)

Return an sph evaluation of the variable var

getTree(force_computation=False, ErrTolTheta=0.8)

Return a Tree object

get_rsp_approximation(DesNumNgb=None, MaxNumNgbDeviation=None, Tree=None)

Return an aproximation of rsp, based on the tree.

real_numngb(num)

number of particles wor wich r<h

setTreeParameters(Tree, DesNumNgb, MaxNumNgbDeviation)
usual_numngb(num)

usual way to compute the number of neighbors

weighted_numngb(num)

num = particle where to compute weighted_numngb see Springel 05