renorm_fmoments_jd

PURPOSE ^

SYNOPSIS ^

function [XXf0,ZP0,Zcurr,Znorm,ZXXS,XxRR_fsav,xMRR_flux,xMRR_tau,xMRR_power_flux,xMRR_power_tau,xRRm_fsav,xRRp_fsav,xTe_norm_out,Zmom] =renorm_fmoments_jd(xnorm_fac,equilDKE,mksa,XXf0,ZP0,Zcurr,Znorm,ZXXS,XxRR_fsav,xMRR_flux,xMRR_tau,xMRR_power_flux,xMRR_power_tau,xRRm_fsav,xRRp_fsav,xTe_norm_out,Zmom)

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [XXf0,ZP0,Zcurr,Znorm,ZXXS,XxRR_fsav,xMRR_flux,xMRR_tau,xMRR_power_flux,xMRR_power_tau,xRRm_fsav,xRRp_fsav,xTe_norm_out,Zmom] = ...
0002     renorm_fmoments_jd(xnorm_fac,equilDKE,mksa,...
0003           XXf0,ZP0,Zcurr,Znorm,ZXXS,XxRR_fsav,xMRR_flux,xMRR_tau,xMRR_power_flux,xMRR_power_tau,xRRm_fsav,xRRp_fsav,xTe_norm_out,Zmom)
0004 %
0005 [npn,nmhu,nr] = size(XXf0);
0006 %
0007 XXnorm_fac = repmat(reshape(xnorm_fac,[1,1,nr]),[npn,nmhu,1]);
0008 %
0009 % distribution
0010 %
0011 XXf0 = XXf0./XXnorm_fac;
0012 %
0013 % power
0014 %
0015 ny = size(ZP0.xyn_rf_fsav,2);
0016 nn_rf = size(ZP0.xyn_rf_fsav,3);
0017 %
0018 ZP0.xyn_rf_fsav = ZP0.xyn_rf_fsav./repmat(xnorm_fac.',[1,ny,nn_rf]);
0019 ZP0.xy_rf_fsav = ZP0.xy_rf_fsav./repmat(xnorm_fac.',[1,ny]);
0020 ZP0.x_rf_fsav = ZP0.x_rf_fsav./xnorm_fac.';
0021 ZP0.x_c_fsav = ZP0.x_c_fsav./xnorm_fac.';
0022 ZP0.x_e_fsav = ZP0.x_e_fsav./xnorm_fac.';
0023 %
0024 ZP0.P_rf_2piRp = sum(ZP0.x_rf_fsav.'.*equilDKE.xdV_2piRp_dke*mksa.P_ref);
0025 ZP0.P_ohm_2piRp = sum(ZP0.x_e_fsav.*equilDKE.xdV_2piRp_dke*mksa.P_ref);
0026 %
0027 % Current
0028 %
0029 Zcurr.x_0 = Zcurr.x_0./xnorm_fac;
0030 Zcurr.x_tp = Zcurr.x_tp./xnorm_fac;
0031 Zcurr.x_g = Zcurr.x_g./xnorm_fac;
0032 Zcurr.x_tot = Zcurr.x_tot./xnorm_fac;
0033 Zcurr.x_0_fsav = Zcurr.x_0_fsav./xnorm_fac;
0034 Zcurr.x_0_vfsav = Zcurr.x_0_vfsav./xnorm_fac;
0035 Zcurr.x_0_vcfsav = Zcurr.x_0_vcfsav./xnorm_fac;
0036 Zcurr.x_tp_fsav = Zcurr.x_tp_fsav./xnorm_fac;
0037 Zcurr.x_tp_vfsav = Zcurr.x_tp_vfsav./xnorm_fac;
0038 Zcurr.x_tp_vcfsav = Zcurr.x_tp_vcfsav./xnorm_fac;
0039 Zcurr.x_g_fsav = Zcurr.x_g_fsav./xnorm_fac;
0040 Zcurr.x_g_vfsav = Zcurr.x_g_vfsav./xnorm_fac;
0041 Zcurr.x_g_vcfsav = Zcurr.x_g_vcfsav./xnorm_fac;
0042 Zcurr.x_tot_fsav = Zcurr.x_tot_fsav./xnorm_fac;
0043 Zcurr.x_tot_vfsav = Zcurr.x_tot_vfsav./xnorm_fac;
0044 Zcurr.x_tot_vcfsav = Zcurr.x_tot_vcfsav./xnorm_fac;
0045 Zcurr.x_B_fsav = Zcurr.x_B_fsav./xnorm_fac;
0046 Zcurr.x_Rfrac_0 = Zcurr.x_Rfrac_0./xnorm_fac;
0047 Zcurr.x_Rfrac_0_fsav = Zcurr.x_Rfrac_0_fsav./xnorm_fac;
0048 %
0049 Zcurr.I_tot = sum(Zcurr.x_0_fsav.*equilDKE.xdA_dke*mksa.j_ref);
0050 Zcurr.I_Rfrac_tot = sum(Zcurr.x_Rfrac_0_fsav.*equilDKE.xdA_dke*mksa.j_ref);
0051 %
0052 % Normalization
0053 %
0054 Znorm.x_0 = Znorm.x_0./xnorm_fac;
0055 Znorm.x_tp = Znorm.x_tp./xnorm_fac;
0056 Znorm.x_g = Znorm.x_g./xnorm_fac;
0057 Znorm.x_0_fsav = Znorm.x_0_fsav./xnorm_fac;
0058 Znorm.x_tp_fsav = Znorm.x_tp_fsav./xnorm_fac;
0059 Znorm.x_g_fsav = Znorm.x_g_fsav./xnorm_fac;
0060 Znorm.x_Rfrac_0 = Znorm.x_Rfrac_0./xnorm_fac;
0061 Znorm.x_Rfrac_0_fsav = Znorm.x_Rfrac_0_fsav./xnorm_fac;
0062 %
0063 % Fluxes
0064 %
0065 ZXXS.p0_rf_imj = ZXXS.p0_rf_imj./XXnorm_fac;
0066 ZXXS.p0_rf_ipj = ZXXS.p0_rf_ipj./XXnorm_fac;
0067 ZXXS.m0_rf_ijm = ZXXS.m0_rf_ijm./XXnorm_fac;
0068 ZXXS.m0_rf_ijp = ZXXS.m0_rf_ijp./XXnorm_fac;
0069 ZXXS.p0_c_imj = ZXXS.p0_c_imj./XXnorm_fac;
0070 ZXXS.p0_c_ipj = ZXXS.p0_c_ipj./XXnorm_fac;
0071 ZXXS.m0_c_ijm = ZXXS.m0_c_ijm./XXnorm_fac;
0072 ZXXS.m0_c_ijp = ZXXS.m0_c_ijp./XXnorm_fac;
0073 ZXXS.p0_e_imj = ZXXS.p0_e_imj./XXnorm_fac;
0074 ZXXS.p0_e_ipj = ZXXS.p0_e_ipj./XXnorm_fac;
0075 ZXXS.m0_e_ijm = ZXXS.m0_e_ijm./XXnorm_fac;
0076 ZXXS.m0_e_ijp = ZXXS.m0_e_ijp./XXnorm_fac;
0077 %
0078 % Runaways
0079 %
0080 Xxnorm_fac = repmat(xnorm_fac,[npn,1]);
0081 %
0082 XxRR_fsav = XxRR_fsav./Xxnorm_fac;
0083 xRRm_fsav = xRRm_fsav./xnorm_fac;
0084 xRRp_fsav = xRRp_fsav./xnorm_fac;
0085 %
0086 % Ripple losses
0087 %
0088 xMRR_flux = xMRR_flux./xnorm_fac;
0089 xMRR_tau = xMRR_tau./xnorm_fac;
0090 xMRR_power_flux = xMRR_power_flux./xnorm_fac;
0091 xMRR_power_tau = xMRR_power_tau./xnorm_fac;
0092 %
0093 % Apparent temperature
0094 %
0095 xTe_norm_out = xTe_norm_out./xnorm_fac;
0096 %
0097 % Momentum transfer rate
0098 %
0099 Zmom.x_rf = Zmom.x_rf./xnorm_fac;
0100 %
0101 
0102

Community support and wiki are available on Redmine. Last update: 18-Apr-2019.