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

Bugfix for cooling call... Also want to test using mue functionality. #1

Open
nfrontiere opened this issue Feb 23, 2024 · 1 comment

Comments

@nfrontiere
Copy link

A bug is in the call to the cooling function:

In all instances where m_radcool is called
i.e.
RAD_T lambda = (*m_radcool)(Ti, (RAD_T)rhoi, (RAD_T)Zi, (RAD_T)Yi, (RAD_T)aa_av, mui, &iter, false, &nHIi, &nei);

You need to call it with the metalicity-free (or primordial) Y not the true value of Y.

Meaning if the particle data has a value of Yi
you need to calculate:
double y = Yi/Xi;//nHe/nH * (mHe/mH)
double Yp = y/(1.0+y);//Metal-free helium fraction
and use Yp, instead of Yi in the m_radcool call

Also m_radcool now returns mu_e
so instead of doing nemass/rho to get neV = Ne
you can just use mass/mu_e*mh = Ne
Perhaps is the same but avoids worry about density. I think in general though using mi/rho for volume is consistent too

@nfrontiere
Copy link
Author

reminder for later that our Cloudy tables now have the ability to measure L instead of using free-free emission approximation only. need to update the map codes to use it

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

No branches or pull requests

1 participant