wiki:u/erica/scratch

The accretion luminosity is summed up for all cells surrounding the sink particle, and the total is given by 'E_acc'. This total accretion energy is then smoothed over a kernel of cells surrounding the sink, such that,

The differential dE's are given by multiplying E_acc by a decaying exponential function at each cell surrounding the sink in the kernel.

In addition to being normalized (i.e. satisfying the first equation), this exponential function needs to go to zero at the boundary of the kernel. Thus, we have the following equation,

which gives the normalization constant,

where N is the max number of cells in the kernel. Note that i) the sum runs over cells i, where the '1st' cell is the cell the sink is in, and the 'Nth' cell is the furthest cell from the sink in the kernel, ii) that the exponential goes to zero at this boundary, iii) and dx*i gives a position (which here implicitly assumes the sink is at the cell center — the actual function will be described below).

Now, 2 things effect the shape of this smoothing function, 1. the number of cells in the kernel, and 2. dx.

Here is a plot showing, for dx=.1, a kernel of 4 cells (top), and a kernel of 40 cells (bottom):

As you can see, the smaller kernel looks like a triangle function, but the larger kernel begins to resemble a true exponential.

Now, keeping the kernel constant (let N=4), but changing dx from dx=.1 (top) to dx=1 (bottom).

We see that in this case, smaller dx resembles a triangle, while dx~1 resembles a truer exponential. However, as dx << 1 the function remains triangular, but as dx > 1, the function quickly drops to 0 (i.e. one cell removed from the origin). This is when the smoothing function would no longer serve its purpose (i.e. smoothing)… We could probably best avoid these issues by enforcing a larger kernel around the sink so that it most resembles an exponential, but then that would require changing the kernel of max refinement around a sink as well (which is currently set to 4 dx). Or we could just leave it with an error message in the code when dx > 1 that this may not be the best smoothing function.

Note, the mathematica notebook used for these plots are attached to this page.

Last modified 9 years ago Last modified on 02/08/16 12:53:18

Attachments (7)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.