Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 24 additions & 8 deletions process/plasma_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,30 @@ def parameterise_plasma(self):

def parabolic_paramterisation(self):
"""Parameterise plasma profiles in the case where ipedestal=0"""
# Reset pedestal values to agree with original parabolic profiles
physics_variables.rhopedt = 1.0e0
physics_variables.rhopedn = 1.0e0
physics_variables.teped = 0.0e0
physics_variables.tesep = 0.0e0
physics_variables.neped = 0.0e0
physics_variables.nesep = 0.0e0
physics_variables.tbeta = 2.0e0
# Reset pedestal values to agree with original parabolic profiles
if (
physics_variables.rhopedt != 1.0
or physics_variables.rhopedn != 1.0
or physics_variables.teped != 0.0
or physics_variables.tesep != 0.0
or physics_variables.neped != 0.0
or physics_variables.nesep != 0.0
or physics_variables.tbeta != 2.0
):
logger.warning(
"Parabolic plasma profiles is used for an L-Mode plasma, "
"but the physics variables do not describe an L-Mode plasma. "
"'rhopedt', 'rhopedn', 'teped', 'tesep', 'neped', 'nesep', "
"and 'tbeta' have all been reset to L-Mode appropriate values"
)

physics_variables.rhopedt = 1.0e0
physics_variables.rhopedn = 1.0e0
physics_variables.teped = 0.0e0
physics_variables.tesep = 0.0e0
physics_variables.neped = 0.0e0
physics_variables.nesep = 0.0e0
physics_variables.tbeta = 2.0e0

self.teprofile.run()
self.neprofile.run()
Expand Down