Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gdat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SPC
gdat
Commits
bf10d660
Commit
bf10d660
authored
7 months ago
by
Antonia Frank
Browse files
Options
Downloads
Patches
Plain Diff
start changing to nodes for LIUQE calls, in progress
parent
1558f619
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!137
Add quantities to ids for MRE
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/TCV_IMAS/tcv_get_ids_core_sources.m
+45
-5
45 additions, 5 deletions
matlab/TCV_IMAS/tcv_get_ids_core_sources.m
with
45 additions
and
5 deletions
matlab/TCV_IMAS/tcv_get_ids_core_sources.m
+
45
−
5
View file @
bf10d660
...
...
@@ -48,6 +48,29 @@ params_eff = params_eff_ref; params_eff.data_request='ohm_data';
ohm_gdat
=
gdat
(
params_core_sources
.
shot
,
params_eff
);
params_eff
=
params_eff_ref
;
params_eff
.
data_request
=
'powers'
;
powers_gdat
=
gdat
(
params_core_sources
.
shot
,
params_eff
);
%% load liuqe data from nodes for conversions
params_eff
=
params_eff_ref
;
% normalized sqrt poloidal flux including axis
params_eff
.
data_request
=
'\tcv_shot::top.results.equil_1.results:rho'
;
rho_pol_norm_liu
=
gdat
(
shot
,
params_eff
);
% <1/R^2>
params_eff
.
data_request
=
'\tcv_shot::top.results.equil_1.results:gpsi0_r2_fsa'
;
Rm2_fs
=
gdat
(
shot
,
params_eff
);
% Volume
params_eff
.
data_request
=
'\tcv_shot::top.results.equil_1.results:vol'
;
vol
=
gdat
(
shot
,
params_eff
);
% T(\psi) = R*B_tor
params_eff
.
data_request
=
'\tcv_shot::top.results.equil_1.results:rbtor_rho'
;
T
=
gdat
(
shot
,
params_eff
);
% Q1Q: -dpsi/dV
%mVprime = 1./LY.Q1Q; % Q1Q: -dpsi/dV
params_eff
.
data_request
=
'\tcv_shot::top.results.equil_1.results:DPSI_VOL'
;
Vprime
=
gdat
(
shot
,
params_eff
);
% I_tor = I_p, total plasma current
params_eff
.
data_request
=
'\tcv_shot::top.results.equil_1.results:i_pl'
;
Ip
=
gdat
(
shot
,
params_eff
);
%% initialize source from template
% ohm
ohm_t_grid
=
powers_gdat
.
ohm
.
t
;
ohm_n_t
=
numel
(
ohm_t_grid
);
...
...
@@ -64,13 +87,26 @@ ohm_data = ohm_gdat.ohm.ohm_data;
% load LIUQE data to convert
% \tilde{j}_// = <jdotB>/(R0<Bphi/R>) to j_//0 = <jdotB>/B0; Bphi=T(psi)/R
[
L
,
~
,
LY
]
=
liuqe
(
shot
,
ohm_t_grid
,
'iterq'
,
50
,
'ilim'
,
3
,
'icsint'
,
true
);
rho_pol_norm_liu
=
L
.
pQ
;
% normalized sqrt poloidal flux including axis
T
=
LY
.
TQ
;
Rm2_fs
=
LY
.
Q2Q
;
vol
=
LY
.
VQ
;
params_eff
=
params_eff_ref
;
% normalized sqrt poloidal flux including axis
params_eff
.
data_request
=
'\tcv_shot::top.results.equil_1.results:rho'
;
rho_pol_norm_liu
=
gdat
(
shot
,
params_eff
);
% <1/R^2>
params_eff
.
data_request
=
'\tcv_shot::top.results.equil_1.results:gpsi0_r2_fsa'
;
Rm2_fs
=
gdat
(
shot
,
params_eff
);
% Volume
params_eff
.
data_request
=
'\tcv_shot::top.results.equil_1.results:vol'
;
vol
=
gdat
(
shot
,
params_eff
);
% T(\psi) = R*B_tor
params_eff
.
data_request
=
'\tcv_shot::top.results.equil_1.results:rbtor_rho'
;
T
=
gdat
(
shot
,
params_eff
);
%rho_pol_norm_liu = L.pQ; % normalized sqrt poloidal flux including axis
%T = LY.TQ;
%Rm2_fs = LY.Q2Q;
%vol = LY.VQ;
R0
=
ids_core_sources
.
vacuum_toroidal_field
.
r0
;
B0
=
interp1
(
ids_core_sources
.
time
,
ids_core_sources
.
vacuum_toroidal_field
.
b0
,
ohm_t_grid
);
jpar_tilde_to_jpar_0
=
R0
*
T
.*
Rm2_fs
.
/
B0
'
;
jpar_tilde_to_jpar_0
=
R0
*
T
.
data
.
*
Rm2_fs
.
data
.
/
B0
'
;
% map volume and conversion factor on rho_pol grid of ohm_data cd_dens
jpar_tilde_to_jpar_0_mapped
=
interp1
(
rho_pol_norm_liu
,
jpar_tilde_to_jpar_0
,
ohm_data
.
cd_dens
.
rhopol_norm
'
);
...
...
@@ -180,6 +216,10 @@ if ~isempty(ec_gdat.ec.data) % if EC data available, fill sources
rho_pol_norm_liu
=
L
.
pQ
;
% normalized sqrt poloidal flux including axis
mu0
=
4
*
pi
*
10
^-
7
;
Rm2_fs
=
LY
.
Q2Q
;
params_eff
=
params_eff_ref
;
params_eff
.
data_request
=
'\tcv_shot::top.results.equil_1.results:gpsi0_r2_fsa'
;
Rm2_fs
=
gdat
(
shot
,
params_eff
);
mVprime
=
1.
/
LY
.
Q1Q
;
% Q1Q: -dpsi/dV
Ip_psi
=
LY
.
ItQ
;
% Ip(psi) = I_tor(psi)
T
=
LY
.
TQ
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment