Skip to content
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

need to set default values for TERPSICHORE input #67

Open
pomphrey opened this issue Jun 19, 2020 · 1 comment
Open

need to set default values for TERPSICHORE input #67

pomphrey opened this issue Jun 19, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@pomphrey
Copy link

When running STELLOPT with a TERPSICHORE calculation of kink stability, the TERPSICHORE calculation 'hangs' if certain parameters are not set.
For example, if instead of having
TARGET_KINK(001) = 0.000000000000E+000 SIGMA_KINK(001) = 1.e-1 MLMNS_KINK(001) = 76 NJ_KINK(001) = 87 NK_KINK(001) = 47 LSSL_KINK(001) = 1537 LSSD_KINK(001) = 815
as an input line, I have
TARGET_KINK(001) = 0.000000000000E+000 SIGMA_KINK(001) = 1.e-1
(ie omitting values for MLMNS_KINK, NJ_KINK, LSSL_KINK and LSSD_KINK), the calculation hangs.
This suggests that one or all of these parameters are not set by default. I suggest they should have preset values or a warning message be sent to the user to define these quantities in the input file.

@lazersos
Copy link
Collaborator

lazersos commented Jun 23, 2020

The variables MLMNS_KINK, NJ_KINK, LSSL_KINK, and LSSD_KINK do have default values set in stellopt_input_mod. The problem is inside TERPSICHORE as NJ_KINK and NK_KINK depend on the number of modes set in the input file for TERPSICHORE. This could be fixed:

Project: Write subroutine which reads the TERPSICHORE input file and pre-calculates these values based on the file.

The prototype for this subroutine would look something like

TERPSICHORE_CALC_ARRAY_SIZE(FILENAME,MLMNB,NJ,NK,LSSL,LSSD,IVAC)
CHARACTER(*), INTENT(IN) :: FILENAME
INTEGER,INTENT(OUT) :: MLMNB,NJ,NK,LSSL,LSSD,IVAC
! Note MLMNV and NS are already set dynamically based on VMEC

The TERPSICHORE page can help with definitions of these variables. There's also a good PDF write-up by W. Cooper.

This would be a descent first task for a summer student, we could then remove these variables from the OPTIMUM namelist completely. It would also make TERPSICHORE more portable.

@lazersos lazersos added the enhancement New feature or request label Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants