-
Notifications
You must be signed in to change notification settings - Fork 12
736 warnings for function ncore #3060
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
Conversation
I would still like the warning to be explicit about what sort of lower and upper bounds people should set. For example: It might also help to narrow the default bounds as follows. Separatrix densityPROCESS/source/fortran/iteration_variables.f90 Lines 3378 to 3380 in b8c0a3d
Pedestal density
Change to
Change to
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chris-ashe if you answer my comment I will approve it subject to your reply
if ncore < 0.0: | ||
# Allows solver to continue and | ||
# warns the user to raise the lower bound on dene if the run did not converge | ||
error_handling.report_error(282) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the reason this was not done before? What was the point of the kludge if the solver can deal with a negative ncore
? I always thought this was to stop NaNs
further down the code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running the files it dosent seem to make a difference as they all fail eventually anyway. It seems better to have it fail quickly and the user updates the lower bound to prevent it going negative again in future runs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I probably need @jonmaddock to comment on this, as he is the one that wrote the kludge. For now, since this is a level 2 error, I will approve it but will make a follow-up issue to check that this fix is ok with the UQ tools (which is why the kludge was added)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If needs be we could put the kludge back in without adding back the logger output as it just slows down the terminal output
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably a good idea, and then #3059 can address making this model more robust
@@ -3377,7 +3377,7 @@ subroutine init_itv_152 | |||
implicit none | |||
lablxc(152) = 'fgwsep ' | |||
boundl(152) = 0.001D0 | |||
boundu(152) = 1.000D0 | |||
boundu(152) = 0.1D0 | |||
end subroutine init_itv_152 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a little concerned about changing the default bounds as this could lead to existing input files (that use the default bounds) starting outside of the feasible region. In this instance, the 3 changes are minor so I think I am happy with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The output values in the large tokamak regression are 0.85 and 0.5 for pedestal and separatrix respectively. @mkovari
Which is outside the bounds recommended
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Output values? Have you calculated neped
/nGW and nesep
/nGW from the data in the output file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Electron density at separatrix / nGW (fgwsep_out) 5.000E-01
Electron density at pedestal / nGW (fgwped_out) 8.500E-01
From the output file of the large tokamak regression test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would still like the warning to be explicit about what sort of lower and upper bounds people should set.
For example:
dene Recommended value of boundl(6) > 80% of expected volume-averaged density.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this true for all cases? Even for a stellerator?
The output warning are limited to one line so I will need to amend the current one as I cant add it under unless we change their length
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe point people to a section in the documentation with the warning? And have a longer explanation in the docs.
With all due respect, I find this approach slightly annoying. Wouldn't it be best to agree first on what should be done? |
So what has actually changed? |
|
I agree that the solution to this issue and the papercut is to remove the warning "spam" and providing help in the documentation. Subsequent discussions can decide a long-term solution to our profiles and will be able to consider how best we can stop unphysical profiles from occurring. |
@mkovari Are you happy with the changes as of now that provide a route to solving the negative problems by pointing to the documentation and raising new warning? |
I am happy in the sense that I don't think these changes are going to make the situation any worse. |
* ncore warning * syntax fix * return ncore * change error type * tidy up * update docs * updated bounds of pedestal params * add ncore = 1E-6 back in * re-update pedestal bounds
* ncore warning * syntax fix * return ncore * change error type * tidy up * update docs * updated bounds of pedestal params * add ncore = 1E-6 back in * re-update pedestal bounds
Description
The logging of the ncore error to the terminal during iterations has been removed and replaced with a level 2 error that is shown at the end of the run. This warns the user to raise the lower bound of dene to prevent VMCON going near negative calculated values of n0. This is only shown when the run is finished.
Documentation has been added warning the user to use constraint 81 to prevent un-realistic profiles and to be weary about setting the lower bound of dene too low.
The bounds in
iteration_variables.f90
forfgwped, fgwsep & dene
have been varied to represent the values found in realistic solutions.Long term solution is being discussed in #3059
Checklist
I confirm that I have completed the following checks: