|
From: Max K. <max...@gm...> - 2012-08-27 20:23:15
|
Ehsan, As you may know, if you just enable "center h1" in your history_columns file then you will get the central h1 mass fraction (center_h1, in the terminology of star_data.inc) at each recorded model number. With regard to the code, which allows you to fine-tune what number you're actually observing, what you want to do is create an integer j that records the species number in the network of your isotope (while the other modules have functions that allow you to work with isotope names or abbreviations, the array xa is indexed by species number in your network). You can use the recommended code to automate this, e.g. real :: center_h1_new integer :: j j = net_iso(h1) ! Assigns the isotope number in the network for h1 to the integer j center_h1_new = xa(j,s% nz) ! Records mass fraction of species j (h1) in center cell Or, you could make slightly more complicated averages of the innermost, say, 10 cells: real :: center_h1_avg integer :: j, i j = net_iso(h1) center_h1_avg = 0. do i = (s% nz) - 9, s% nz center_h1_avg = + center_h1_avg + xa(j,i) end do center_h1_avg = center_h1_avg / 10. In any case, the xa_old and xa_older variables may be useful for internal bookkeeping in the code but I do not think they will be helpful to you for this purpose. Finally, the next trick would be to figure out how to output your new variable in the standard history.data file (or, you could be less tricky and just write to file as part of your above code, in run_star_extras). Max On Mon, Aug 27, 2012 at 3:56 PM, Ehsan Moravveji <mor...@ia...>wrote: > Hello all, > > I would like to trace center_h1 during the main sequence evolution, and > make sure it is monotonically dropping. for this, I know that I must use > the three star_info pointers: xa, xa_old and xa_older in star_data.dek > (now star_data.inc in the new release): > > ! composition variables: xa(j,k) holds mass fraction of species j > for location k > ! j is an integer from 1 to s% species > ! chem_id(j) gives the iso identifier from chem_def > ! net_iso(chem_id(j)) = j > real(dp), pointer, dimension(:,:) :: xa, xa_old, xa_older > > However, I cannot understand what values to assign to j and k > in e.g. xa(j,k). > > Can someone please help me with this? > > Best regards. > Ehsan. > > > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > mesa-users mailing list > mes...@li... > https://lists.sourceforge.net/lists/listinfo/mesa-users > |