wiki:u/johannjc/injection

Version 5 (modified by Jonathan, 7 years ago) ( diff )

When calculating injection from outflows, we generally have some prescription for the mass, momentum, and possibly energy injection as a function of position within the outflow kernel. However, we would like the numerical injection to satisfy certain requirements.

  1. The total mass injected should equal
  2. The center of mass of the injected mass should equal
  3. The total momentum injected should be (bipolar)
  4. The scalar momentum injected should equal
  5. The angular momentum injected should equal

First, let's consider a simpler example. Let's assume we want to inject a certain amount of mass around a point (in 2D) with a kernel given by

where our normalized kernel

for .

Here is the distance from a sink particle.

For a grid with 10 points in x and y over the interval x=[-1,1] y=[-1,1] - and for a sink particle at [.05,.05] the result is

Note the center of mass of the injected material is not .05,.05 and the injected mass is not 1.0. This is because of discretization error.

We would like to find a solution for that is close to this, but subject to the constraints involving the center of mass and the total mass injected. If we consider each zone inside the kernel, we can write the matrix equation

This can be expressed as and we can solve this underconstrained problem using the pseudo-inverse of A

While this solves our constraints - it looks nothing like our desired profile. What we would like to do is to solve , in a way that does not minimize , but that minimizes where is our vector of initial given by our kernel.

We can do this using Matlab's lsqlin function - or we can use the prescription given in https://see.stanford.edu/materials/lsoeldsee263/08-min-norm.pdf (page 8-13 through 8-15)

This gives

Now for the more complicated case, we have , but the matrix would contain two blocks - so we can solve the problem in two steps. First we can solve for , and then use that solution to construct the matrix equation for

where

Attachments (5)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.