Skip to content

Modify flux_coordinates.pro to use Bisection near LCFS#60

Open
mgyoo86 wants to merge 1 commit intoPrincetonUniversity:masterfrom
mgyoo86:feature/idl_script
Open

Modify flux_coordinates.pro to use Bisection near LCFS#60
mgyoo86 wants to merge 1 commit intoPrincetonUniversity:masterfrom
mgyoo86:feature/idl_script

Conversation

@mgyoo86
Copy link
Copy Markdown
Collaborator

@mgyoo86 mgyoo86 commented Jun 12, 2023

Current flux_coordinates.pro may not find some target flux surfaces near LCFS
(For example, see Chen Zhao's MAST case on Stellar:/scratch/gpfs/cz12/sim2/fw1_equil/)

Two things are implemented in this commit to fix this problem.

  1. Check target psin values
    Ensure that the target psin valuse must form closed flux surfaces within a given rectangular boundary. Otherwise, we cannot find target psin along some poloidal angles, which might causes errors.

  2. Use the Bisection method near LCFS (psin>0.95)
    Newton's method may not work correctly near LCFS due to too steep dpsi/drho there. Instead, use the Bisection method for a more reliable root finding. Note that the Bisection method here is not optimal form to minimize changes in the code. Currently, the Bisection method works for target_psin>0.95. If necessary, we can set a more general condition to determine whether to use Newton's or Biscection in the future.

Current flux_coordinates.pro may not find some target flux surfaces near LCFS
(For example, see Chen Zhao's MAST case on Stellar:/scratch/gpfs/cz12/sim2/fw1_equil/)

Two things are implemented in this commit to fix this problem.

1) Check target psin values
Ensure that the target psin valuse must form closed flux surfaces within a given
rectangular boundary. Otherwise, we cannot find target psin along some poloidal
angles, which might causes errors.

2) Use the Bisection method near LCFS (psin>0.95)
Newton's method may not work correctly near LCFS due to too steep dpsi/drho there.
Instead, use the Bisection method for a more reliable root finding.
Note that the Bisection method here is not optimal form to minimize changes in the code.
Currently, the Bisection method works for target_psin>0.95.
If necessary, we can set a more general condition to determine
whether to use Newton's or Biscection in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant