Version 5 (modified by 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.
- The total mass injected should equal
- The center of mass of the injected mass should equal
- The total momentum injected should be (bipolar)
- The scalar momentum injected should equal
- 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 equationThis can be expressed as
and we can solve this underconstrained problem using the pseudo-inverse of AWhile 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 forwhere
Attachments (5)
- Screen Shot 2017-12-15 at 3.06.47 PM.png (21.7 KB ) - added by 7 years ago.
- Screen Shot 2017-12-15 at 3.07.00 PM.png (19.9 KB ) - added by 7 years ago.
- Screen Shot 2017-12-15 at 3.07.04 PM.png (20.5 KB ) - added by 7 years ago.
- Screen Shot 2017-12-15 at 3.10.01 PM.png (22.0 KB ) - added by 7 years ago.
- test_solver2.m (1.4 KB ) - added by 7 years ago.
Download all attachments as: .zip