NLTE Solver population checks - #88
Closed
jpollin98 wants to merge 2 commits into
Closed
Conversation
Member
|
Does running this code solve the problem with your multiD runs? Do you know what is going wrong in the NLTE solver that requires the populations to be clamped afterwards? I would prefer to move in the direction of eliminating arbitrary parameters like MINPOP that must be manually adjusted. Ideally, the code will automatically set it to some sensible value, if it is really needed at all. I know one of the main uses is to prevent nne from going to zero, but it should not be a problem for an ion or level population to be zero. |
lukeshingles
force-pushed
the
develop
branch
3 times, most recently
from
September 4, 2024 15:00
a434b42 to
ec46b73
Compare
lukeshingles
force-pushed
the
develop
branch
from
November 11, 2024 16:19
c8d3ef9 to
8e01c64
Compare
lukeshingles
force-pushed
the
develop
branch
7 times, most recently
from
February 19, 2025 14:48
9ef9733 to
8111c67
Compare
lukeshingles
force-pushed
the
develop
branch
6 times, most recently
from
March 14, 2025 15:53
238a966 to
62c04e6
Compare
lukeshingles
force-pushed
the
develop
branch
2 times, most recently
from
July 15, 2025 14:03
0f6bcf4 to
bc467fd
Compare
lukeshingles
force-pushed
the
develop
branch
2 times, most recently
from
October 5, 2025 12:57
674d45c to
f23e974
Compare
lukeshingles
force-pushed
the
develop
branch
2 times, most recently
from
October 13, 2025 15:03
f10b3ac to
8fecd57
Compare
lukeshingles
force-pushed
the
develop
branch
3 times, most recently
from
October 28, 2025 13:18
1386401 to
9c1b024
Compare
lukeshingles
force-pushed
the
develop
branch
3 times, most recently
from
October 31, 2025 12:37
2873d47 to
d1b5cb9
Compare
lukeshingles
force-pushed
the
develop
branch
3 times, most recently
from
December 17, 2025 16:48
9d04064 to
5ab61a7
Compare
lukeshingles
force-pushed
the
develop
branch
4 times, most recently
from
February 10, 2026 15:57
838fba6 to
78bf7c8
Compare
lukeshingles
force-pushed
the
develop
branch
from
February 14, 2026 13:02
b517d67 to
c01edb0
Compare
lukeshingles
force-pushed
the
develop
branch
4 times, most recently
from
February 25, 2026 09:26
428265c to
8e3dbf6
Compare
lukeshingles
force-pushed
the
develop
branch
2 times, most recently
from
April 17, 2026 13:14
d6129fa to
921aeb9
Compare
lukeshingles
force-pushed
the
develop
branch
4 times, most recently
from
June 26, 2026 20:24
b3f181e to
8330d16
Compare
This file contains hidden or 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
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.
I have been thinking about the errors in the multid nebular runs. I think a check at the end of the NLTE solver would be a good idea. We would need to check for two cases:
when the population may become sufficiently small to cause problems with floating point numbers. (On this point, I also think min pop should be changed to something larger, 1e-35 to ensure we are not close to the float limit)
The case when we have a population inversion. The division by the groundpop when we have a successful solution with a population inversion can cause significant problems at the point the partition function is cast from a double to a float. There is no physical justification for not allowing a population inversion thus simply setting the population to LTE might not be the best approach. Thus, I suggest some tolerance on what we would accept.
As such, I have attempted to introduce two checks on the solved populations. I believe the changes in the outputs are from numerical round-offs as the spec.out files are the same. Although I'd appreciate some sanity checking of the implementation for the 2nd case. Do you think there's a better way to implement this safety mechanism on the NLTE solver?