vice.migration.specs.gas¶
Type : migration_matrix
Default: Zeroes (i.e. no gas migration)
The gas migration matrix. For a multizone simulation with N zones, this is an NxN matrix.
This matrix is defined such that \(G_{ij}\) represents the mass fraction of gas that moves from the \(i\)’th zone to the \(j\)’th zone in a 10 Myr time interval.
Allowed Types¶
real number The fraction of gas that migrates in a 10 Myr time interval is constant, given by this value.
<function> Must accept time in Gyr as the only parameter. The fraction of gas that migrates in a 10 Myr time interval varies with time, and is described by this function.
Notes¶
The mass fraction of interstellar gas that migration from zone \(i\) to zone \(j\) at a time \(t\) is calculated via
The mass that migrates is then given by \(M_{g,i} f_{ij}(t)\), where \(M_{g,i}\) is the total mass of the interstellar medium in zone \(i\).
This guarantees that the amount of gas that migrates in a given time interval does not depend on the timestep size.
Example Code¶
>>> import math
>>> import vice
>>> example = vice.migration.specs(3)
>>> example.gas[1][0] = 0.1
>>> def f(t):
return math.exp(-t / 2)
>>> example.gas[0][1] = f
>>> example.gas
MigrationMatrix{
0 ---------> {0.0, <function f at 0x120588560>, 0.0}
1 ---------> {0.1, 0.0, 0.0}
2 ---------> {0.0, 0.0, 0.0}
}