Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106574048
computeIntegrals.py.svn-base
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Mar 27, 14:32
Size
1 KB
Mime Type
text/x-python
Expires
Sat, Mar 29, 14:32 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25223468
Attached To
rGEAR Gear
computeIntegrals.py.svn-base
View Options
#!/usr/bin/env python
import Ptools as pt
from pNbody import myNumeric
from numpy import *
from scipy.integrate import cumtrapz
import libmetalsSNII
######################################################
# Parameters
######################################################
# IMF
Mmin = 0.05
Mmax = 50.
#m_s = []
#a_s = [-1.35]
m_s = [0.08, 0.5, 1.0]
#a_s = [0.7, -0.8, -1.7, -1.3]
a_s = [-1.35, -1.35, -1.35, -1.35]
# files
MetalFile = 'MetalEjection.dat'
HeliumCoreFile = 'HeliumCore.dat'
OutputFile = 'chemyves.dat'
# number of elements to follow
nelts = 4
# masses for metal injection
Mmin1 = 10.
Mmax1 = Mmax*1.5
# masses for helium core
Mmin2 = Mmin
Mmax2 = Mmax*1.5
# resolution in mass for integration
dM = 0.001
# number of output points
n = 106
IRess,IHcos,IFes,IMgs,IOxs,IMes,Mmin1,lStep1,Mmin2,lStep2 = libmetals.ComputeIntegrals(Mmin,Mmax,m_s,a_s,MetalFile,HeliumCoreFile,nelts,Mmin1,Mmax1,Mmin2,Mmax2,dM,n)
# output
f = open(OutputFile,'w')
libmetalsSNII.WriteOutput(f,IRess,IHcos,IFes,IMgs,IOxs,IMes,n,nelts,Mmin1,lStep1,Mmin2,lStep2)
f.close()
Event Timeline
Log In to Comment