Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • prodimopy prodimopy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 11
    • Issues 11
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • ProDiMo
  • prodimopyprodimopy
  • Issues
  • #9

Closed
Open
Created Jan 19, 2023 by Christian Rab@c.rabMaintainer

total species mass

Add some routine to get the total mass of a species in the disk (something like in idl). something like the code below should do the trick.

Have to think about where to put it. Could be part of species ... or just a routine in Data_ProDiMo.

import astropy.units as u

model=pread.read_prodimo("TTauri0_1_F0_10_20")
  
totmass=0.0
# loop over all species in the model
for spec in model.spnames:  
  # calculate the total mass for that species. 
  mass=np.sum(np.multiply(model.vol,model.nmol[:,:,model.spnames[spec]]*model.species.mass[spec]))
  # add it to the total disk mass ... just for checking. 
  totmass+=mass
  print(spec,(mass*u.g).to(u.M_sun))

print("tot",(totmass*u.g).to(u.M_sun))
Assignee
Assign to
Time tracking