u/mbradle / Blog: Recent posts

Running a network calculation with simple hydrodynamics

In my recent posts, I have been running calculations with the network/run_entropy.cpp examples code. These calculations have had the parameter τ set to infinity, so the density has remained fixed. In this post, I will show how to use the code to run network calculations with simple one-zone hydrodynamics.

The starting point is to consider a ball of radius R. We consider the ball to have uniform properties, such as the density, which can change as the ball's radius expands or contracts with time. The run_entropy.cpp code solves a set of three similtaneous first order differential equations for the three quantities x[0], x[1], and x[2]. Together these quantities form a state vector x. The three components of x are, first, the scaled radius... read more

Posted by Bradley S. Meyer 2016-08-14

Modifying reaction rates with a user-defined rate modifier during a network calculation

In a previous post, I showed how one can modify reaction rates during a network calculation. This was done with the default rate modifier, which uses views to select out reactions and then multiply them by a constant factor. In this post, I will show how you can modify rates with your own rate modification routine.... read more

Posted by Bradley S. Meyer 2016-08-11

Computing NSE corrections to the entropy

In my last post, I included NSE (Coulomb) corrections to the chemical potentials of the nuclear species in a constant entropy calculation. These NSE corrections affect the relationship between the forward and reverse nuclear reaction rates in detailed balance and, consequently, the final NSE abundances to which the system evolved. The calculation did not, however, include corrections to the entropy. This is a slight inconsistency that I will address in this post.... read more

Posted by Bradley S. Meyer 2016-08-05

Including NSE corrections in a network calculation

In my last post, I studied the default NSE corrections in NucNet Tools (specifically, the Coulomb corrections in Bravo and Garcia-Senz). In this post, I will apply these corrections to a network calculation.

I will use the constant entropy calculation I previously made. I will in fact make two calculations--one with screening but no NSE corrections and one with both screening and NSE corrections. I begin by editing my nucnet-tools-code/data_pub/zone.xml file from the previous calculation. I first run the calculation with screening but no NSE correction. I change the use screening property from no to yes:... read more

Posted by Bradley S. Meyer 2016-08-02

Studying Coulomb corrections to NSE

In a previous post, I included electron screening in a network calculation. Because electrons surround nuclei, they "screen" the positive charge of the nuclei, thereby making it easier for interacting nuclei to overcome their mutual Coulomb repulsion. The Coulomb interaction of nuclei and electrons also alters the energy of the nuclei away from the simple ideal gas form usually used in network calculations. This changes the chemical potential of species and, therefore, their abundance in nuclear statistical equilibrium (NSE).... read more

Posted by Bradley S. Meyer 2016-07-31

Compiling NucNet Tools with the clang and gcc compilers on a mac

In a previous post, I demonstrated how to compile NucNet Tools with clang and gcc. Since then, we have made NucNet Tools dependent on Boost program options, which are compiled libraries. This adds some difficulty in that the libraries compiled for gcc are not compatible with clang. In this post, I will show how I switch between gcc and clang to compile NucNet Tools.... read more

Posted by Bradley S. Meyer 2016-07-27

Comparing a network calculation with and without entropy generation

In my last post, I ran a calculation at fixed density with no charge-changing reactions but with entropy generation. The calculation began with pure 4He at a mass density of 3 x 109 g/cc and a temperature of 2 billion Kelvins. The system evolved into nuclear statistical equilibrium (NSE) in about a nanosecond with a temperature of 10.318 billion Kelvins.... read more

Posted by Bradley S. Meyer 2016-06-17

Running a network calculation with entropy generation

In a previous post, I ran a network calculation at constant entropy. In a subsequent post, I computed the entropy generation rate for that network calculation. The modeled system generated entropy during its expansion; thus, holding the entropy constant is not a consistent treatment. In this calculation, I will include entropy generation in my network calculation.... read more

Posted by Bradley S. Meyer 2016-06-13

Supplying your own screening function

In my last post, I showed how to compute electron screening and include it in a network calculation. In this post, I will how a user could change the screening to his or her own parameterization.

The parameterization I will use here is that of DeWitt, Graboske, and Cooper. I first write files my_screen.cpp and my_screen.h, based on screen.cpp and screen.h in the nucnet-tools-code/user directory. The file my_screen.cpp, like the parent screen.cpp, has five key functions:... read more

Posted by Bradley S. Meyer 2016-06-08

Including electron screening in a network calculation

In this post, I will demonstrate how to include the default screening in a network calculation. Electron screening arises from the fact that the Coulomb potential of a nucleus can be altered by the surrounding charges. In the case of an astrophysical plasma, the nucleus can attract an electron cloud which screens the positive nuclear charge from other charges. The effect is to make it easier for a charged projectile nucleus to penetrate the Coulomb barrier of a charged target nucleus thereby enhancing the reaction rate.... read more

Posted by Bradley S. Meyer 2016-05-26

Using Boost compiled libraries

In a previous post, I mentioned that NucNet Tools examples now depend on the Boost program options library, which is a compiled library. This should present no problem to users who install Boost through the normal instructions. Neverthless, there may be users who wish to work with their own installation of Boost. In this post I will show how to do this.... read more

Posted by Bradley S. Meyer 2016-05-01

Computing the entropy generation rate for a weak decay

In my previous post, I explored the entropy generation rate during a network calculation by computing that rate for a particular reaction, namely, 46Ar + 4He → 49Ca + n. I was able to confirm the value of the rate at a particular time step with available data. That rate did not change the electron-to-nucleon ratio. In this post I will repeat the exercise of confirming the entropy generation rate for a reaction, but this time I will do it for a weak decay since this is a more complex calculation.... read more

Posted by Bradley S. Meyer 2016-04-29

Understanding the entropy generation rate

In my previous post, I computed the entropy generation rate during my constant-entropy r-process calculation. The calculation showed substantial entropy generation at certain points during the calculation. In this post, I will seek to understand that entropy generation.... read more

Posted by Bradley S. Meyer 2016-04-27

Computing the entropy generation rate

In my previous post, I ran an r-process calculation at constant entropy. In this post, I will begin to consider to what extent the entropy would really be constant in such an expansion by computing the entropy generation rate (in units of Boltzmann's constant) during the calculation.... read more

Posted by Bradley S. Meyer 2016-04-25

Comparing a constant entropy and a constant photon-to-nucleon ratio network calculation

In previous posts, I have run a constant photon-to-nucleon ratio and a constant entropy network calculation. In this post I will compare such calculations. To do this, I will run an r-process calculation with a hydrodynamic trajectory I previously defined at constant entropy and photon-to-nucleon ratio.... read more

Posted by Bradley S. Meyer 2016-03-08

Selecting a zone as input for a new calculation

In this post, I will demonstrate how to select out a zone from output from a single-zone calculation and use that as input for a new calculation. A user might find that useful if he or she would like to change the network after some point in the initial calculation or would like to try different sets of reaction rates or thermodynamic trajectories.

To begin, I repeat the steps to run my previous r-process calculation. This time, however, I will first run with a network only up to proton number Z = 50. This means that I run the calculation with the execution call... read more

Posted by Bradley S. Meyer 2016-03-06

Overriding the inverter in a constant entropy network calculation

In my last post, I showed how to run a network calculation that begins in NSE (nuclear statistical equilibrium) and evolve it at constant entropy. The calculation worked by finding the temperature at each time step consistent with the input entropy. In this calculation, at each time step, a root-finding routine varies the temperature. The abundances are evolved over the time step with the current temperature guess. The evolved abundances are then used to compute the entropy. The temperature guess is then varied until the computed entropy agrees with the input entropy. In this way, the network is called for each root-finding iteration, which means it is called many times for each time step. This makes the calculation rather slow.... read more

Posted by Bradley S. Meyer 2016-02-26

Running a network calculation at constant entropy

In my last post and the one before, I showed how to invert the entropy equation to compute, for a given entropy, the density for a set temperature and electron fraction or the temperature for a set density and electron fraction. In this post, I will show how to run a network calculation at constant entropy by inverting the entropy at each time step to obtain the proper temperature.... read more

Posted by Bradley S. Meyer 2016-02-20

Constraining the equilibrium while inverting the entropy

For systems that we study in nucleosynthesis, the entropy per nucleon s is a function of the temperature (T9 = T / 109 K), mass density ρ, and abundances {Y}: s = s(T9, ρ, {Y}). In my last post, I inverted the entropy function to compute the density required to yield a particular entropy given input temperature and abundances. The abundances were computed from nuclear statistical equilibrium. In this post, I will invert the entropy equation to compute the temperature from the density and abundances. For the abundances, I will use a quasi-equilibrium in which I constraint the number of heavy nuclei (those with atomic number Z greater than 2).... read more

Posted by Bradley S. Meyer 2016-02-15

Inverting the entropy to find the density

In my last several posts, I demonstrated how to use NucNet Tools codes to compute thermodynamic quantities, including cases where I can define my own quantity and add extra data to my definition. In this post I will use those routines to study the concept of the entropy per nucleon and its relevance for nucleosynthesis in some detail.... read more

Posted by Bradley S. Meyer 2016-02-14

Adding extra data to a user-defined zone function

In my last post, I demonstrated how to add your own thermodynamic function to the already-defined functions. The particular functions I added were calculations of the enthalpy per nucleon for the various components (the nuclei, the electrons and positrons, and the photons). The particular functions I added calculated the enthalpy per nucleon from default calculations of the internal energy and pressure. These calculations only required that I pass the zone class to the function. In this post I will demonstrate how to pass additional data to a user-defined function.... read more

Posted by Bradley S. Meyer 2016-02-12

Defining your own thermodynamic function

Two posts ago I showed how to override the default thermodynamic functions in NucNet Tools. In my last post I pointed out that a user needs to override each default thermodynamic function separately. In this post, I will show how to define a thermodynamic function that is not included among the defaults.... read more

Posted by Bradley S. Meyer 2016-02-11

Considering overriding default thermodynamic calculations further

In my last post, I promised to demonstrate how to compute user-defined thermodynamic quantities not present in the list of default quantities. Before I do this, I want to note a point regarding the default calculation.

Since the default calculations (as computed by libstatmech codes) are for non-interacting fully degenerate, fully relativistic electrons, overriding the default calculation of the electron chemical potential does not change the calculation of the other quantities. Consider, for example, the electron-positron pair plasma internal energy density. The default integral is given by... read more

Posted by Bradley S. Meyer 2016-02-09

Overriding default thermodynamic calculations

In my previous post, I demonstrated how to compute thermodynamic quantities for the output of a network calculation. These calculations used the default routines from libstatmech, which assume non-interacting fermions and bosons of arbitrary relativity and degeneracy. In this post, I will demonstrate how to override the default routines to use routines of your own design.... read more

Posted by Bradley S. Meyer 2016-01-31

Computing thermodynamic quantities

In a previous post, I showed how to keep track of a quantity (the photon-to-nucleon ratio) during a calculation. I can also compute certain thermodynamic quantities from the output XML of a calculation. I demonstrate how to do this in this post. In particular, I demonstrate how to compute the entropy per nucleon in my previous r-process calculation.... read more

Posted by Bradley S. Meyer 2016-01-24

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks