-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set TORAX equations to use rhonorm form
Previously, the equations were in mixed form: temp_ion, temp_el, and dens were in the "rho form", meaning that the vpr derivative and discretization matrix derivatives were with respect to rho. The psi equation was in the "rhonorm form", meaning that these derivatives were with respect to rhonorm. Also, TORAX native derivatives were mixed: fvm gradients are with respect to rhonorm, the mesh is in rhonorm, but vpr was previously with respect to rho. geo.rmax was used to convert the equations to rho or rhonorm forms. This PR makes things consistent. All governing equations are now posed in rhonorm form, as in the published paper and documentation. vpr and spr are modified to be with respect to rhonorm. These changes had the following impact on the equation solutions and necessitated newly generated reference cases for the CHEASE cases: 1. numerics.largeValueT and numerics.largeValuen, used for the adaptive source to set the pedestal, are not multiplied by vpr like all the other sources. Due to the change in vpr definition, this means that the ratio of the standard sources to this adaptive source changed. The defaults were modified such that the ratio is exactly maintained for the circular geometry cases. However, for the CHEASE cases, due to different geo.rmax, the change in vpr resulted in a slightly different ratio of largeValueT and largeValuen to the other sources, slightly changing the dynamics of pedestal formation. 2. In CHEASE, vpr = gradient(volume, rho)*rho[-1] is not exactly the same as vpr = gradient(volume, rhon), leading to slight differences Overall the impact of the above is minor. The average rel differences in the new test/sim references compared to before, are in the 1e-3 - 1e-4 range. PiperOrigin-RevId: 655641372
- Loading branch information
Showing
51 changed files
with
321 additions
and
382 deletions.
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.