-
Notifications
You must be signed in to change notification settings - Fork 6
Stellarator branch #30
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
base: main
Are you sure you want to change the base?
Conversation
…l (including iota) into the openpopcon
…ings.yml, POPCON_input_example.yaml, and STELLARATOR_EX.ipynb
| # Machine Paramters | ||
| #----------------------------------------------------------------------- | ||
|
|
||
| name: "SPARC" |
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.
Please change this
|
|
||
| #---------------------- | ||
| scalinglaw: "ISSO" # Name of tau_E scaling law as defined in scaling_laws.yaml | ||
| is_stellarator: true # Set to True for stellarator 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.
Can we change this to device_type, which would either be stellarator or tokamak?
resources/scalinglaws.yml
Outdated
| ISSO_fake: | ||
| scaling_const: 0.148 | ||
| M_i_alpha: 0 #TO DO: implement as if statement | ||
| Ip_alpha: 0 #TO DO: implement as if statement | ||
| R_alpha: 0.64 | ||
| a_alpha: 2.33 | ||
| kappa_alpha: 0 #TO DO: implement as if statement | ||
| B0_alpha: 0.85 | ||
| Pheat_alpha: -0.61 | ||
| n20_alpha: 0.55 | ||
| # iota_23_alpha: 0.41 # For future real ISSO |
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.
Please get rid of ISSO_fake, since we eventually just want the real ISSO scaling
resources/scalinglaws.yml
Outdated
| M_i_alpha: 0 #TO DO: implement as if statement | ||
| Ip_alpha: 0 #TO DO: implement as if statement |
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.
These are still marked as a todo - can you clean them up with the device_type logic that you've written such that the user does not need to specify them in this file?
resources/scalinglaws.yml
Outdated
| B0_alpha: 0.84 | ||
| n20_alpha: 0.54 | ||
| Pheat_alpha: -0.61 | ||
| iota_alpha: -0.41 |
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.
Double check the sign of this
| self.Pheat_alpha: float = -0.69 # Power degradation scaling law exponent | ||
| self.n20_alpha: float = 0.41 # Greenwald density scaling law exponent | ||
|
|
||
| self.iota_alpha: float = 0.41 # Iota scaling law exponent (stellarator only) |
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.
Please double check the sign of this
src/openpopcon.py
Outdated
| assert 'H89' in data.keys() | ||
| assert 'H98y2' in data.keys() | ||
| assert 'H_NT23' in data.keys() | ||
| assert 'ISSO_fake' in data.keys() |
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.
Change this to only check for ISSO if the device_type == 'stellarator', and only check for the others if device_type == 'tokamak'
src/openpopcon.py
Outdated
| self.device_type = device_str | ||
| self.device = 0 if device_str == "tokamak" else 1 | ||
| self.is_tokamak = self.device == 0 |
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 is going on here?
…nd removed ISSO_fake from scalinglaws.yml and updated values for ISSO
…d updated openpopcon code
|
adding stellarator scaling factor to openpopcon |
| tauE = self.H_fac * self.scaling_const | ||
| if self.device_type == 1: #stellarator | ||
| if hasattr(self, 'iota_alpha'): | ||
| tauE *= self.iota_23**self.iota_alpha |
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.
@amelias21114252 we need to make so that self.iota_23 is calculated by OpenPONCON when you give it a VMEC file.
| #---------------------- | ||
| scalinglaw: "ISSO" # Name of tau_E scaling law as defined in scaling_laws.yaml | ||
| device_type: stellarator #tokamak or stellarator | ||
| iota_23: 1 #stellarator scaling law constant |
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.
Here instead of specifying iota_23=1, we need to provide a vmecfilename and have OpenPOPCON calculate iota_23 for us from the VMEC file.
No description provided.