Skip to content
Snippets Groups Projects
Commit 7e9c95e8 authored by Antonia Frank's avatar Antonia Frank
Browse files

Add liuqe call to get the conversion factor between j_TORAY and j_//

parent 76d351b6
Branches
Tags
1 merge request!137Add quantities to ids for MRE
......@@ -87,7 +87,7 @@ end
last_index = last_index+1; % add if statement to only increment if bs source has been added
%% ec
ec_gdat = gdat(shot,'ec_data');
ec_gdat = gdat(shot,'ec_data','ec_inputs',1);
if ~isempty(ec_gdat.ec.data) % if EC data available, fill sources
......@@ -113,6 +113,18 @@ if ~isempty(ec_gdat.ec.data) % if EC data available, fill sources
ids_core_sources.source{last_index+i_lau}.global_quantities = globals_template;
end
% get geometrical parameters and conversion from j_V,TORAY to j// = <jdotB>/B0
% from LIUQE
[L,~,LY] = liuqe(shot,ec_data_tgrid,'iterq',50,'ilim',3,'icsint',true);
rho_pol_norm_liu = L.pQ; % normalized sqrt poloidal flux including axis
mu0 = 4*pi*10^-7;
Rm2_fs = LY.Q2Q;
Vprime = -1./LY.Q1Q; % Q1Q: -dpsi/dV
Ip_psi = LY.ItQ; % Ip(psi) = I_tor(psi)
T = LY.TQ;
B2_fs = mu0*Ip_psi.*2.*pi./Vprime + T.^2.*Rm2_fs;
toray_to_parallel = 1./(T.*Rm2_fs).*B2_fs./R0./B0;
% get data for globals from gdat powers and fill in ids_structure
ec_total_pow = transpose(powers_gdat.ec.data(:,nb_launchers+1)); %use power from powers_gdat(injected ec power) instead of ec_data power
ec_total_pow(isnan(ec_total_pow)) = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment