-
Notifications
You must be signed in to change notification settings - Fork 24
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
Low temp2 #293
Merged
Merged
Low temp2 #293
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
some processes, e.g freebound, if the T_e is <100 K, thn we assume it is 100 K) for the purpose of estimating the cooling.
keep from overwriting the results of a previous debug mode run. The files are now named something like Zwhatever05.windsave, where whatever is the rootname of the .pf file
possible to call this from python itself
to tables in the diag directory
print_rad_summary since it is now duplicated in windsave2table
Did minor cleanups on some other routines
TMIN still exists in zeta.c, where it is used due to the way an very old set of data concerning recombination to the ground state is used. There the minimum is 1000 K, which may be a problem for low temperatures, but that is not addressed here
are printed out are. Also closes #226 I have defined variables SPECTYPE_RAW, etc to replace the numbering scheme used previously for various types of spectra, and added a variable D_SOURCE to python.h that defines the distance to the source (100 pc). The units of the spectra are now contained in the spectral files.
emission in freebound processes
In trying to conistently use -f as the only way to fix the electron temperatures, I somehow introduced a problem which caused problems with calculating dvds. While this change prevents that problem, it may now be that -f is not the only way to fix the temperature, and therefore I may have undone the earlier fix. So this is a quickfix to restore functionality, and the consistency quesion needs testing
models from working. This fix solve the problem for ksl's cv model using Kurucz models, which resulted in non-monotonic cdfs, but does not fix a second problem of photons being produced out of range in continuum.c, which causes stellar_1em16_kuruz.out.pf to crash python.
…pstream_lowtemp3
Upstream lowtemp3
… non-lum sources which were already added on in cooling
Upstream loewtemp3
to run a series of srhort python models for testing various aspects of the code. The models that are run are stored (by default) in the directory examples/regress. This is intended as way to partially address #292
jhmatthews
modified the milestone:
LT2: Multiple issues relating to wind emission, CDFs, and optically thick cells
Sep 4, 2017
of the input directory. The routine first looks for the directory in the current working directory, and if it is not there it looks in $PYTHON/examples. Small modifications to improve the output apperance were also made
file when it doesn't exist. Small change to regression.d so that it does not attempt to run pf files of the form whatever.out.pf, since these are created when whatever.pf is run.
@kslong - most recent change seems to produce a segfault. Should one use fclose(file_ptr) if file_ptr is NULL? I think that's the cause. |
Mea culpa. Should be fixed now.
|
I've attempted to check that this looks sensible, but it's not an easy task. In particular, I have not checked changes to cdf.c, but all the other changes look like they are at least based around the right problems. Testing to continue, but merging into dev now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a major pull request, to pull in the work done by NSH and KSL in the summer of 2017 to address problems with python working in optically thick conditions.
The following issues are addressed
#261 - This was a major bug - free-bound luminosity did not include the ionisation potential of the recombining ion, so the luminosity was far too low and energy was being lost. This caused cells to cool to very low temperatures. A set of new luminosity variables was made to allow radiative recombination to be split into a cooling and a luminosity variable. New code made the 'full' mode in the various subroutines contained in recombination.c work as intended. Many other commits fixed the various checks for convergence, sharing between parallel tasks and outputting the data in wind_updates2d.c. Py_wind was also modified to output these variables as part of the 'e' option and the '1' option.
#258 - this is really a question, but is addressed by the changes made to split luminosity and cooling
#270 - This was fixed during the major revamp of PDFs
#284 #36 These two issues raised about when we calculate the cooling rates which will be saved into the wind save file have been addressed. We now compute the cooling rates one last time after the new electron temperature has been settled upon.
Other important things dealt with that were never raised as issues:
The initial reason for this new branch was KSLs experiment with reducing the minimum temperature at which FB cooling was calulated. We now compute FB cooling down to 100K
Other changes were made by KSL at the start of this work that he might be best placed to explain - talking about the modifications made up to about Jun 20...
The other major piece of work was prompted by testing of the new recombination code which revealed very odd shapes to recombination continua in a h only model. This was tracked down to problems in the code for making recombination photons. The original code was intended to use an array of 'jumps' which told the CDF code where discontinuities were in the freebound continuum. This was broken and has essentially been bypassed years ago. It was fixed by eliminating the jumps and instead ensuring that the PDF was properly sampled around discontinuities. This necessitated a significant rewrite of the PDF-CDF code and this opportunity was used to also rename many subroutines to properly indicate wether they were dealing with PDFs (which most weren't) or CDFs (which most were - so many routines were renamed from PDF***** to CDF*****. Changes were also made to free free generation and models - this is where #270 was fixed.
Other changes were made to deal with the extra variables that were made - writing out in py_wind and communicating for MPI.