Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two level atom - improve radiative excitation #90

Closed
Higginbottom opened this issue Jul 22, 2014 · 2 comments
Closed

Two level atom - improve radiative excitation #90

Higginbottom opened this issue Jul 22, 2014 · 2 comments

Comments

@Higginbottom
Copy link
Collaborator

The two level atom code in lines.c includes both collisional and radiative excitation from lower to upper level. However, the radiative excitation only permits a dilute blackbody model of the mean intensity.

An enhancement would be to permit the model of mean intensity (power law or exponential) to be used.

@Higginbottom
Copy link
Collaborator Author

This enhancement has been implemented with the following changes.

A new subroutine - mean intensity has been written in radiation.c. This returns a value for the specific mean intensity at a requested frequency, either using dilute blackbody or a model depending on the ionization mode. The reason for this new routine is that we will now have two locations where the mean intensity is calculated (two level atom, and induced compton). It is best practice to have a subroutine to do this rather than duplicate code.

The second change is simply to replace the code in induced compton that currently computes the mean intensity with a call to the new code.

Finally, the actual meat of the change is to call mean intensity, and then use the resulting value of J_nu in the two level atom equation in two_level_atom.

@jhmatthews
Copy link
Collaborator

This was done in pull request #88 and was merged via commit agnwinds/python@5401775

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants