-
Notifications
You must be signed in to change notification settings - Fork 19
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
Modify vboot loop to be produce consistent solutions #16
Comments
@jcschmitt I was just looking at the stellopt_bootsj code. For one (and this was in the original BOOTSJ code itself), it handles small values of NE and TE at the boundary very poorly. I've not changed it so that Te floors to 10 eV and ne floors to 1E17 m^-3. This isn't a perfect solution but avoids a divide by zero problem which was present in the original code. Also we should be careful, because only the master of MPI_COMM_LOCAL will have the correct values of TE, NE, TI and ZEFF each iteration if they're changing due to optimization. BOOTSJ handles this by having master BCAST the relevant internal arrays to the processors. Attach an input file for the case you're having problems with and I'll try to help out. |
Most of the bug fixes shouldn't affect me (afaik), although the *1000 correction to the central Ti/Te seems like something that I should have run into...it must not have been triggered by having constant (non-changning) Te/Ne/Ti/Zeff values. The bug that I run into (actually, this one: #15 ) seems to be triggered when I leave one or more of the following variables in the OPTIMUM namelist: NE_TYPE, NE_OPT, TE_TYPE, TE_OPT, TI_TYPE, TI_OPT, BOOTJ_TYPE, BOOTJ_AUX_F, SFINCS_S, SFINCS_MIN_PROCS, VBOOT_TOLERANCE, VBOOT_MAX_ITERATIONS, SFINCS_ER_OPTION OR, somehting in the one of the bootjs or sfincs namelist. I've found that I can eliminate the errant behavior by eliminating all of the variables above and the namelist for bootsj and sfincs. Otherwise, some section of code (I haven't traced it to find it yet) in the initialization procedure overwrites AC_AUX_F with bogus information, even with EQUIL_TYPE = VMEC2000 or VMEC2000_ONEEQ. |
Will the modification you made change the behavior for profiles that go to identically zero at only the LCFS? i.e, with profiles that go like: |
@jcschmitt Your To answer your question, the mods I've made (in the ASCOT_INTERFACE branch) will prevent any value on the grid from going below these values. |
Hmm. It seems that even with TEMPRES=64, I was getting results that were only off by about 16% (net currrent), and with JBS profiles that weren't strange. The Te, Ti profiles that were reported by bootsj were proportional to the total pressure, but the density was constant. I'm sure it was just a coincidence that the results were so similar. I've fixed it in the input list. (and closed issue #15 ). |
Status? |
As far as I know, this is still an issue with vboot/bootsj on 2nd/3rd/4th/etc. iterations. I don't think sfincs suffers from the same problem since the initial profile is initialized differently in the sfincs version of the vboot loop. |
This behavior is observed when running stellopt with regcoil in the vboot loop. Even though I'm in the vboot loop, I'm not modifying the boundary coefficients, so I would expect the vboot loop to converge to an identical answer for every iteration of the vboot loop. However, what I observe is that the behavior is mirrored across processors (I'm using 32 procs, so pattern is repeated 32 times):
I would expect that I would be calling the vboot loop multiple times with identical starting points, and I would expect each evaluation of vboot to take 3 loops (vboot iteration 0, 1, and 2).
It appears that something is not being reset to identical starting points, because later calls of vboot on the same processor converge almost immediately.
I would request that we (I) look at how to modify this loop (or make a new version?) that produces the behavior that I describe above, because it effects later calculations, specifically bnorm and anything related to it later in the food chain, (and their derivatives)...
I don't fully understand the loop count totals, either.
31 + 31 + 17 + 1 + 1
Cut-N-Paste
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 0: ctor= 3.612E+04, vboot convergence factor= 1.000E+00
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 1: ctor= 3.680E+04, vboot convergence factor= 3.783E-02
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 2: ctor= 3.682E+04, vboot convergence factor= 4.602E-04. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 5.809E-06. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 8.841E-08. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 8.841E-08. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 8.841E-08. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 8.841E-08. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 8.841E-08. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 8.841E-08. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 8.841E-08. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 8.841E-08. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 8.841E-08. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 8.841E-08. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 8.841E-08. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 8.841E-08. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 8.841E-08. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 8.841E-08. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 8.841E-08. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 8.841E-08. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 8.841E-08. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 1.252E-08. Tolerance achieved.
Vboot iteration 0: ctor= 3.682E+04, vboot convergence factor= 7.318E-09. Tolerance achieved.
The text was updated successfully, but these errors were encountered: