johnson-c / ColRadPy

Collisional-radiative python solver
Other
27 stars 10 forks source link

Related to input Ad04 files and excitation rate coefficients #5

Closed pritivish closed 1 year ago

pritivish commented 4 years ago

Hello All,

There is oprtion in AD04 where it takes non maxweelian rates. for eaxample

Ba+ 9 56 10 1166600.0(1S) 1783696.48(3D) 1949485.63(3H) 1 5s1 (2)0( 0.5) 0.00 {1}1.000 {2}1.000 {3}1.000 2 5p1 (2)1( 0.5) 137266.46 {1}1.000 3 5p1 (2)1( 1.5) 163685.60 {1}1.000 4 4f1 (2)3( 2.5) 220657.77 {1}1.000 5 4f1 (2)3( 3.5) 221857.68 {1}1.000 9.0 4 1.16+06 1.22+06 1.27+06 1.30+06 1.33+06 1.36+06 1.39+06 1.42+06 1.45+06 1.48+06 1.51+06 1.54+06 1.57+06 1.62+06 3 1 1.18+08 3.77-09 3.71-09 3.65-09 3.63-09 3.60-09 3.57-09 3.55-09 3.53-09 3.50-09 3.48-09 3.46-09 3.44-09 3.42-09 3.38-09 4 1 7.13-01 1.70-10 1.58-10 1.46-10 1.41-10 1.36-10 1.32-10 1.27-10 1.23-10 1.19-10 1.15-10 1.11-10 1.08-10 1.04-10 9.82-11 5 1 1.44+10 9.05-08 8.93-08 8.82-08 8.76-08 8.71-08 8.66-08 8.61-08 8.57-08 8.52-08 8.48-08 8.43-08 8.40-08 8.35-08 8.27-08

Here in the first line of the excitation data array

  1. ion chage +1
  2. 4-----> represents non maxwellian rate
  3. temp grid (K) However, I am confused with no 2, is collisional stength (As nothing specific is mentioned in Ad04 file for option 4, just wrtten reserve for non maxweelian) data or excitation rate coefficient data?? beacuse it is mentioned in Ad04 files that 4 is reseved for non maxwellian rate but here i think code is taking it as collisional strength not rate.

    I have run the time independent ionization balance, I have given the rate at temperature grid at which I want to calulate abundance. however, It is giving "" "Atleast one user temp point above last calculated temperature using extrapolation be carefull" and using tully rates. """

My querry is , I want to use exciation rate coefficients (cm3/s) and I am giving rates at the temp where I need abundance (here 100 to 150eV, yes while giving input I have converted eV to K) as CR matrix will need rate at which temp we want solution. However, is seems grid is inappropriate as I think It is not taking as rate but collisional stength so calculationg rate it need collision stregth at various temperature.

Is it possible to give direct rate coefficients for excitation also, as we are giving for ionization and recombination.?

Thank you

johnson-c commented 4 years ago

The short answer is that ColRadPy can't do non-Maxwellian rates yet.

Thinking about this real quick, using the existing infrastructure to get the rates into colradpy would require the read_adf04.py to be modified as the read_adf04_py3_class.py assumes Maxwellian rates. This might actually take the most amount of modification.

colradpy_class.py would need to be modified from lines 695-720 really just modifying .data['cr_matrix']['q_ji'] and .data['cr_matrix']['qij'] to take the non-Maxwellian rates instead of After this I think everything else should just work.

This might be easier to collaborate on through email or the discord. Ba is an interesting element, I didn't know there were calculated excitation rates for it.

pritivish commented 4 years ago

Dear Johnson,

Thank you so much. I will check by changing the modification suggested by you. As I mentioned these rated are not presented in the ADAS database. I have calculated all the rates . I will be very happy to discuss with you. should I contact to you at this email id?

I am sorry for this silly question, but as rates coeffcients are obtained by integration the cross section over a distribution function. So if I am providing directly rates coefficients (cm3/s) at temperate at which I am interested to calculate population densities in CR matix and modify code such that it directly reads the rate coefficients. so It will not make any difference weather I am providing maxwellian or non maxwellian rate.

Also as In the code we are providing rate coefficients for ionization and recombination.

Thank You With Regards, Priti Researcher, University of Electro-Communication, Tokyo, Japan

On Thu, Aug 13, 2020 at 2:09 PM Curt Johnson notifications@github.com wrote:

The short answer is that ColRadPy can't do non-Maxwellian rates yet.

Thinking about this real quick, using the existing infrastructure to get the rates into colradpy would require the read_adf04.py to be modified as the read_adf04_py3_class.py assumes Maxwellian rates. This might actually take the most amount of modification.

colradpy_class.py would need to be modified from lines 695-720 really just modifying .data['cr_matrix']['q_ji'] and .data['cr_matrix']['qij'] to take the non-Maxwellian rates instead of After this I think everything else should just work.

This might be easier to collaborate on through email or the discord. Ba is an interesting element, I didn't know there were calculated excitation rates for it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/johnson-c/ColRadPy/issues/5#issuecomment-673260204, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANLOSBLZBKS2BEIZNHT7QIDSANYPRANCNFSM4P5XNQ6A .

johnson-c commented 4 years ago

caj0026@auburn.edu

stuartloch commented 4 years ago

Hi Priti and Curt,

I am very interested in this discussion. Let me add a few points about non-Maxwellian rate coefficients as I am aware of the ADAS work on this area. You are right that the ADAS database doesn't contain non-Maxwellian rates in general in the adf04 files. This is partly because there would be a wide range of non-Maxwellian electron distribution functions that people would be interested in. The short answer is that the best way to make non-Maxwellian rate coefficients would be to take a form of the adf04 file (called a type 1) file that stores a quantity related to the cross section, this can then be converted into a type 4 (Non-Maxwellian file) by convolving the cross section with the appropriate electron distribution function. I think that it would be a good idea to get ColRadPy to be able to do this. There are, I think, some examples of type 1 adf04 files in the ADAS database. There should be one for neutral helium, I think. I will have a look and send any examples that I find.

The more detailed answer is as follows: As a way to make non-Maxwellian rate coefficients, ADAS has a version of the adf04 file that is type 1 and stores the collision strength. The language is a bit confusing, but the collision strength is related to the excitation cross section, it is a dimensionless version of that. If you convolve the cross section with a Maxwellian distribution function you get a rate coefficient, which is what the C-R code uses. If you convolve the collision strength with a Maxwellian distribution function, then you get a dimensionless quantity called an 'effective collision strength'. This is what is archived in most adf04 files. It is a nice smooth function, is dimensionless, and is easy to interpolate. But more importantly you just need to store one of these for each transition. It can then be converted into an excitation rate coefficients or a de-excitation rate coefficient using something called detailed balance. This is why most adf04 files just have one set of numbers for each transition, ColRadPy converts the effective collision strength into both an excitation and a de-excitation rate coefficient.

The type 1 adf04 file can be convolved with any electron distribution function. In this case the collision strengths are archived on an energy grid instead of a temperature grid. There is an existing ADAS fortran routine that would convert the type 1 file into a non-Maxwellian adf04 file where you give it the electron distribution function.

One subtlety is that for non-Maxwellian rate coefficients, you have to store both the up and the down rates separately as you can no longer use detailed balance to get the de-excitation from the excitation rate coefficient. So the type 4 adf04 files should have the transitions in both directions in the file. It seems to me like it wouldn't be a very complicated change to ColRadPy to get it to use these non-Maxwellian adf04 type 4 files.

There was an ADAS PhD dissertation on non-Maxwellian rates if you are interested in seeing more of the details.

http://www.adas.ac.uk/theses/bryans_thesis.pdf

On the Spectral Emission of Non-Maxwellian Plasmashttp://www.adas.ac.uk/theses/bryans_thesis.pdf On the Spectral Emission of Non-Maxwellian Plasmas A thesis submitted to The Department of Physics of the University of Strathclyde for the degree of Doctor of Philosophy. www.adas.ac.uk So in summary, if there is an adf04-type 1 file for the element and ion stage you are interested in, then it could be converted to a non-Maxwellian type 4 file without too much difficulty. ColRadPy would need to be modified to take the up and down rate coefficients separately, but not much else would need to change. If there is no type 1 file for the ion you need, then we could look into making one.

Best wishes,

Stuart


From: pritivish notifications@github.com Sent: Thursday, August 13, 2020 12:27 AM To: johnson-c/ColRadPy ColRadPy@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [johnson-c/ColRadPy] Related to input Ad04 files and excitation rate coefficients (#5)

Dear Johnson,

Thank you so much. I will check by changing the modification suggested by you. As I mentioned these rated are not presented in the ADAS database. I have calculated all the rates . I will be very happy to discuss with you. should I contact to you at this email id?

I am sorry for this silly question, but as rates coeffcients are obtained by integration the cross section over a distribution function. So if I am providing directly rates coefficients (cm3/s) at temperate at which I am interested to calculate population densities in CR matix and modify code such that it directly reads the rate coefficients. so It will not make any difference weather I am providing maxwellian or non maxwellian rate.

Also as In the code we are providing rate coefficients for ionization and recombination.

Thank You With Regards, Priti Researcher, University of Electro-Communication, Tokyo, Japan

On Thu, Aug 13, 2020 at 2:09 PM Curt Johnson notifications@github.com wrote:

The short answer is that ColRadPy can't do non-Maxwellian rates yet.

Thinking about this real quick, using the existing infrastructure to get the rates into colradpy would require the read_adf04.py to be modified as the read_adf04_py3_class.py assumes Maxwellian rates. This might actually take the most amount of modification.

colradpy_class.py would need to be modified from lines 695-720 really just modifying .data['cr_matrix']['q_ji'] and .data['cr_matrix']['qij'] to take the non-Maxwellian rates instead of After this I think everything else should just work.

This might be easier to collaborate on through email or the discord. Ba is an interesting element, I didn't know there were calculated excitation rates for it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/johnson-c/ColRadPy/issues/5#issuecomment-673260204, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANLOSBLZBKS2BEIZNHT7QIDSANYPRANCNFSM4P5XNQ6A .

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/johnson-c/ColRadPy/issues/5#issuecomment-673267127, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADTSNVGHDR6JB5A7P3UWOALSAN2UDANCNFSM4P5XNQ6A.

pritivish commented 4 years ago

Dear Stuart,

Thank you so much for the detailed explanation. I will try to implement your suggestions.

johnson-c commented 1 year ago

Going to close this, I need to keep up with github more :P