SERiF
0.0.1a
3+1D Stellar Structure and Evolution
Loading...
Searching...
No Matches
evaluateNetwork.py
Go to the documentation of this file.
1
from
serif.network.approx8
import
Approx8Network
2
from
serif.network
import
NetIn
3
from
serif.composition
import
Composition
4
5
comp =
Composition
(
6
[
"H-1"
,
"He-3"
,
"He-4"
,
"C-12"
,
"N-14"
,
"O-16"
,
"Ne-20"
,
"Mg-24"
]
7
)
8
comp.setMassFraction(
9
[
"H-1"
,
"He-3"
,
"He-4"
,
"C-12"
,
"N-14"
,
"O-16"
,
"Ne-20"
,
"Mg-24"
],
10
[0.708, 2.94e-5, 0.276, 0.003, 0.0011, 9.62e-3, 1.62e-3, 5.16e-4]
11
)
12
comp.finalize(
True
)
13
14
netIn =
NetIn
()
15
netIn.composition = comp
16
netIn.temperature = 1e7
17
netIn.density = 1e2
18
netIn.energy = 0.0
19
netIn.tMax = 3.15e17
20
netIn.dt0 = 1e12
21
22
net =
Approx8Network
()
23
netOut = net.evaluate(netIn)
24
25
print(netIn)
26
print(netOut)
27
print(net)
serif::composition::Composition
Manages the composition of elements.
Definition
composition.h:216
serif::network::approx8::Approx8Network
Class for the Approx8 nuclear reaction network.
Definition
approx8.h:294
serif::composition
Definition
composition.cpp:36
serif::network::approx8
Definition
approx8.cpp:75
serif::network
Definition
approx8.cpp:75
serif::network::NetIn
Input structure for the network evaluation.
Definition
network.h:65
tests
python
network
evaluateNetwork.py
Generated by
1.13.2