Skip to content
Open
Show file tree
Hide file tree
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
11 changes: 7 additions & 4 deletions INGRID/topologies/sf15.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,6 @@ def construct_patches(self):
F3_W = self.LineTracer.draw_line(xpt2['E'], {'psi': psi_1}, option='rho', direction='ccw',
show_plot=visual, text=verbose)

F3_W = self.LineTracer.draw_line(xpt2['E'], {'psi': psi_1}, option='rho', direction='ccw',
show_plot=visual, text=verbose)
E3_E = F3_W.reverse_copy()

F3_N = self.LineTracer.draw_line(F3_W.p[-1], {'line': EastPlate2}, option='theta', direction='cw',
Expand All @@ -443,8 +441,13 @@ def construct_patches(self):

midline_1__WestPlate1 = self.LineTracer.draw_line(C3_N.p[0], {'line': WestPlate1}, option='theta', direction='ccw',
show_plot=visual, text=verbose)
B3_W = self.LineTracer.draw_line(B2_W.p[-1], {'line': midline_1__WestPlate1}, option='rho', direction='ccw',
show_plot=visual, text=verbose)
if self.settings['grid_settings']['patch_generation']['use_xpt1_W']:
tilt = self.settings['grid_settings']['patch_generation']['xpt1_W_tilt']
B3_W = self.LineTracer.draw_line(B2_W.p[-1], {'line': (midline_1__WestPlate1,tilt)}, option='z_const', direction='ccw',
show_plot=visual, text=verbose)
else:
B3_W = self.LineTracer.draw_line(B2_W.p[-1], {'line': midline_1__WestPlate1}, option='rho', direction='ccw',
show_plot=visual, text=verbose)
A3_E = B3_W.reverse_copy()

A3_N, B3_N = midline_1__WestPlate1.reverse_copy().split(B3_W.p[-1], add_split_point=True)
Expand Down
7 changes: 4 additions & 3 deletions INGRID/topologies/udn.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ def construct_patches(self):

xpt2__psiMinPF2 = self.LineTracer.draw_line(xpt2['S'], {'psi': psi_pf_2},
option='rho', direction='cw', show_plot=visual, text=verbose)
#TODO: Implement split point ratio option here
E2_E, E1_E = xpt2__psiMinPF2.split(xpt2__psiMinPF2.p[len(xpt2__psiMinPF2.p) // 2], add_split_point=True)
D1_W = E1_E.reverse_copy()
D2_W = E2_E.reverse_copy()
Expand Down Expand Up @@ -282,14 +283,14 @@ def construct_patches(self):

if self.settings['grid_settings']['patch_generation']['use_xpt2_W']:
tilt = self.settings['grid_settings']['patch_generation']['xpt2_W_tilt']
E3_E = self.LineTracer.draw_line(xpt2['W'], {'psi_horizontal': (psi_2, tilt)}, option='z_const', direction='cw', show_plot=visual, text=verbose).reverse_copy()
E3_E = self.LineTracer.draw_line(xpt2['W'], {'psi_horizontal': (psi_2, tilt)}, option='z_const', direction='ccw', show_plot=visual, text=verbose).reverse_copy()
else:
E3_E = self.LineTracer.draw_line(xpt2['W'], {'psi': psi_2}, option='rho', direction='ccw', show_plot=visual, text=verbose).reverse_copy()
F3_W = E3_E.reverse_copy()

if self.settings['grid_settings']['patch_generation']['use_xpt2_E']:
tilt = self.settings['grid_settings']['patch_generation']['xpt2_E_tilt']
D3_W = self.LineTracer.draw_line(xpt2['E'], {'psi_horizontal': (psi_1, tilt)}, option='z_const', direction='ccw', show_plot=visual, text=verbose)
D3_W = self.LineTracer.draw_line(xpt2['E'], {'psi_horizontal': (psi_1, tilt)}, option='z_const', direction='cw', show_plot=visual, text=verbose)
else:
D3_W = self.LineTracer.draw_line(xpt2['E'], {'psi': psi_1}, option='rho', direction='ccw', show_plot=visual, text=verbose)
C3_E = D3_W.reverse_copy()
Expand Down Expand Up @@ -319,7 +320,7 @@ def construct_patches(self):
G2_E = H2_W.reverse_copy()

if self.settings['grid_settings']['patch_generation']['use_xpt1_W']:
tilt = -self.settings['grid_settings']['patch_generation']['xpt1_W_tilt']
tilt = self.settings['grid_settings']['patch_generation']['xpt1_W_tilt']
B3_W = self.LineTracer.draw_line(B2_W.p[-1], {'line': (midline_1__WestPlate1, tilt)}, option='z_const', direction='ccw', show_plot=visual, text=verbose)
else:
B3_W = self.LineTracer.draw_line(B2_W.p[-1], {'line': midline_1__WestPlate1},
Expand Down
83 changes: 83 additions & 0 deletions example_files/UDN/xpt_tilt_demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
DEBUG:
verbose:
grid_generation: 0
patch_generation: 0
target_plates: 0
visual:
SF_analysis: 0
find_NSEW: 0
gridue: 0
patch_map: 0
subgrid: 0
eqdsk: ../data/NEQDSK_maxim/neqdsk_2
grid_settings:
grid_generation:
distortion_correction:
all:
active: false
resolution: 1000
theta_max: 120.0
theta_min: 80.0
np_default: 1
nr_default: 1
poloidal_f_default: x, x
radial_f_default: x, x
guard_cell_eps: 0.001
nlevs: 30
num_xpt: 2
patch_generation:
xpt1_E_tilt: 0.1
xpt1_W_tilt: -0.2
rmagx_shift: 0.0
xpt2_E_tilt: -3.0
xpt2_W_tilt: 2.8
strike_pt_loc: limiter
magx_tilt_1: 0.0
magx_tilt_2: 0.0
use_xpt1_E: true
use_xpt1_W: true
use_xpt2_E: true
use_xpt2_W: true
zmagx_shift: 0.0
psi_1: 1.7
psi_2: 1.6
psi_core: 0.89
psi_pf_1: 0.7
psi_pf_2: 1.4
rmagx: 1.6
rxpt: 1.5
rxpt2: 1.8
view_mode: filled
zmagx: 0.0
zxpt: -0.62
zxpt2: 0.56
integrator_settings:
dt: 0.01
eps: 5.0e-06
first_step: 5.0e-05
max_step: 0.064
step_ratio: 0.02
tol: 0.005
limiter:
rshift: 0.0
use_efit_bounds: true
zshift: -0.1
efit_buffer_r: 0.1
efit_buffer_z: 0.7
target_plates:
plate_E1:
file: ''

zshift: 0.0
plate_E2:
file: ''

zshift: 0.0
plate_W1:
file: ''

zshift: 0.0
plate_W2:
file: ''

zshift: 0.0