fppgridweights_dke_yp

PURPOSE ^

SYNOPSIS ^

function [Xdeltap_imj,Xdeltap_ipj,Xdeltam_ijm,Xdeltam_ijp,Xdeltap_imjmm,Xdeltap_imjpp,Xdeltap_ipjmm,Xdeltap_ipjpp,Xdeltam_immjm,Xdeltam_ippjm,Xdeltam_immjp,Xdeltam_ippjp,xdeltap_npj,xdeltap_npjmm,xdeltap_npjpp] =fppgridweights_dke_yp(Xdpnmm,Xdpnm,Xdpn,Xdpnp,Xdpnpp,Xdmhumm,Xdmhum,Xdmhu,Xdmhup,Xdmhupp,XDpp_ipj,XDpp_imj,XFp_ipj,XFp_imj,XDpp_ij,XFp_ij);

DESCRIPTION ^

Extended Chang & Cooper weights: link between full grid (flux mesh) and half grid (distribution mesh) in the momentum direction
Linear weighting in pitch-angle direction

    - Xdeltap: Extended Chang & Cooper coefficients for momentum grid that are reused for fluxes calculations at the end of the code
    - Xdeltam: Extended Chang & Cooper coefficients for pitch-angle grid that are reused for fluxes calculations at the end of the code
      (Notations: _imjp -> (i,j+1);_imjm -> (i,j);_ijp -> (i+1/2,j+1);_ijm -> (i+1/2,j);_immjp -> (i-1/2,j+1);_immjm -> (i-1/2,j)

    Input:

    Output:

  - Xdeltap_imj
  - Xdeltap_ipj
  - Xdeltam_ijm
  - Xdeltam_ijp

By Joan Decker (MIT-RLE) and Yves Peysson (CEA-DRFC,yves.peysson@cea.fr)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function      [Xdeltap_imj,Xdeltap_ipj,...
0002               Xdeltam_ijm,Xdeltam_ijp,...
0003               Xdeltap_imjmm,Xdeltap_imjpp,Xdeltap_ipjmm,Xdeltap_ipjpp,...
0004               Xdeltam_immjm,Xdeltam_ippjm,Xdeltam_immjp,Xdeltam_ippjp,...
0005               xdeltap_npj,xdeltap_npjmm,xdeltap_npjpp] = ...
0006                   fppgridweights_dke_yp(Xdpnmm,Xdpnm,Xdpn,Xdpnp,Xdpnpp,...
0007                   Xdmhumm,Xdmhum,Xdmhu,Xdmhup,Xdmhupp,...
0008                   XDpp_ipj,XDpp_imj,XFp_ipj,XFp_imj,...
0009                   XDpp_ij,XFp_ij);
0010 %
0011 %Extended Chang & Cooper weights: link between full grid (flux mesh) and half grid (distribution mesh) in the momentum direction
0012 %Linear weighting in pitch-angle direction
0013 %
0014 %    - Xdeltap: Extended Chang & Cooper coefficients for momentum grid that are reused for fluxes calculations at the end of the code
0015 %    - Xdeltam: Extended Chang & Cooper coefficients for pitch-angle grid that are reused for fluxes calculations at the end of the code
0016 %      (Notations: _imjp -> (i,j+1);_imjm -> (i,j);_ijp -> (i+1/2,j+1);_ijm -> (i+1/2,j);_immjp -> (i-1/2,j+1);_immjm -> (i-1/2,j)
0017 %
0018 %    Input:
0019 %
0020 %    Output:
0021 %
0022 %  - Xdeltap_imj
0023 %  - Xdeltap_ipj
0024 %  - Xdeltam_ijm
0025 %  - Xdeltam_ijp
0026 %
0027 %By Joan Decker (MIT-RLE) and Yves Peysson (CEA-DRFC,yves.peysson@cea.fr)
0028 %
0029 if nargin < 16,
0030     error('Wrong number of input arguments in fppgridweights_dke_yp')
0031 end
0032 %
0033 [np,nmhu] = size(Xdpnmm);
0034 %
0035 %Momentum grid interpolation
0036 %
0037 Xdeltap_ipj = g_dke_yp(-Xdpnp.*XFp_ipj./XDpp_ipj);         
0038 Xdeltap_imj = g_dke_yp(-Xdpnm.*XFp_imj./XDpp_imj);    
0039 %
0040 Xdeltap_imjmm = zeros(np,nmhu);Xdeltap_imjmm(:,2:nmhu) = Xdeltap_imj(:,1:nmhu-1);
0041 Xdeltap_imjmm(:,1) = Xdeltap_imj(:,1);%Symmetry around the pperp = 0 axis
0042 Xdeltap_imjpp = zeros(np,nmhu);Xdeltap_imjpp(:,1:nmhu-1) = Xdeltap_imj(:,2:nmhu);
0043 Xdeltap_imjpp(:,nmhu) = Xdeltap_imj(:,nmhu);%Symmetry around the pperp = 0 axis
0044 %
0045 Xdeltap_ipjmm = zeros(np,nmhu);Xdeltap_ipjmm(:,2:nmhu) = Xdeltap_ipj(:,1:nmhu-1);
0046 Xdeltap_ipjmm(:,1) = Xdeltap_ipj(:,1);%Symmetry around the pperp = 0 axis
0047 Xdeltap_ipjpp = zeros(np,nmhu);Xdeltap_ipjpp(:,1:nmhu-1) = Xdeltap_ipj(:,2:nmhu);
0048 Xdeltap_ipjpp(:,nmhu) = Xdeltap_ipj(:,nmhu);%Symmetry around the pperp = 0 axis
0049 %
0050 %Momentum grid interpolation in p=pmax
0051 %
0052 xdeltap_npj = g_dke_yp(-(Xdpnm(np,:) + Xdpnp(np,:)).*XFp_ij(np,:)./XDpp_ij(np,:));     
0053 xdeltap_npjmm = zeros(1,nmhu);xdeltap_npjmm(2:nmhu) = xdeltap_npj(1:nmhu-1);
0054 xdeltap_npjmm(1) = xdeltap_npj(1);%Symmetry around the pperp = 0 axis
0055 xdeltap_npjpp = zeros(1,nmhu);xdeltap_npjpp(1:nmhu-1) = xdeltap_npj(2:nmhu);
0056 xdeltap_npjpp(nmhu) = xdeltap_npj(nmhu);%Symmetry around the pperp = 0 axis
0057 %
0058 %Pitch-angle grid interpolation
0059 %
0060 Xdeltam_ijp = Xdmhupp./(Xdmhu + Xdmhupp);
0061 Xdeltam_ijm = Xdmhu./(Xdmhu + Xdmhumm);
0062 %
0063 Xdeltam_immjm = zeros(np,nmhu);Xdeltam_immjm(2:np,:) = Xdeltam_ijm(1:np-1,:);
0064 Xdeltam_immjm(1,:) = Xdeltam_ijm(1,:);%Symmetry p -> -p at p =0
0065 Xdeltam_ippjm = zeros(np,nmhu);Xdeltam_ippjm(1:np-1,:) = Xdeltam_ijm(2:np,:);
0066 Xdeltam_ippjm(np,:) = Xdeltam_ijm(np,:);%Symmetry p -> -p at p =0
0067 %
0068 Xdeltam_immjp = zeros(np,nmhu);Xdeltam_immjp(2:np,:) = Xdeltam_ijp(1:np-1,:);
0069 Xdeltam_immjp(1,:) = Xdeltam_ijp(1,:);%Symmetry p -> -p at p =0
0070 Xdeltam_ippjp = zeros(np,nmhu);Xdeltam_ippjp(1:np-1,:) = Xdeltam_ijp(2:np,:);
0071 Xdeltam_ippjp(np,:) = Xdeltam_ijp(np,:);%Symmetry p -> -p at p =0
0072 %

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