idealprof_yp

PURPOSE ^

SYNOPSIS ^

function [prho,pTe,pne,pzTi,pzni,zZi,zmi,fi,pkin] = idealprof_yp(Zi,mi,fi,Te0,Tea,eTe1,eTe2,ne0,nea,ene1,ene2,Ti0,Tia,eTi1,eTi2,Zeff0,Zeffa,eZeff,xZeff,prho)

DESCRIPTION ^

 Create profiles from parametric description

 by Y.Peysson (CEA/DSM/IRFM, yves.peysson@cea.fr) and J. Decker (CEA/DSM/IRFM, joan.decker@cea.fr)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [prho,pTe,pne,pzTi,pzni,zZi,zmi,fi,pkin] = idealprof_yp(Zi,mi,fi,Te0,Tea,eTe1,eTe2,ne0,nea,ene1,ene2,Ti0,Tia,eTi1,eTi2,Zeff0,Zeffa,eZeff,xZeff,prho)
0002 %
0003 % Create profiles from parametric description
0004 %
0005 % by Y.Peysson (CEA/DSM/IRFM, yves.peysson@cea.fr) and J. Decker (CEA/DSM/IRFM, joan.decker@cea.fr)
0006 %
0007 if nargin < 20,
0008     prho = 101;
0009 end
0010 if nargin < 19,
0011     error('Not enough input arguments in idealprof_yp');
0012 end
0013 %
0014 if length(prho) == 1,
0015     prho = linspace(0,1,prho);%Uniform rho grid
0016 end
0017 %
0018 zZi = Zi;%[1,ni]
0019 zmi = mi;%[1,ni]
0020 %
0021 %
0022 % Plasma parameters
0023 %
0024 if ~isnan(eTe2) && ~isempty (eTe2),
0025     if imag(Tea) > 0,
0026         pTe = Te0*((1 - imag(Tea))*(1 - prho.^eTe1).^eTe2 + imag(Tea));%Electron temperature (keV)
0027     else
0028         pTe = (Te0 - Tea)*(1 - prho.^eTe1).^eTe2 + Tea;%Electron temperature (keV)
0029     end
0030     %
0031     if imag(nea) > 0,
0032         pne = ne0*((1 - imag(nea))*(1 - prho.^ene1).^ene2 + imag(nea));%Electron density (m-3)
0033     else
0034         pne = (ne0 - nea)*(1 - prho.^ene1).^ene2 + nea;%Electron density (m-3)
0035     end
0036     %
0037     if imag(Tia) > 0,
0038         pTi = Ti0*((1 - imag(Tia))*(1 - prho.^eTi1).^eTi2 + imag(Tia));%Ion temperatures (keV)
0039     else
0040         pTi = (Ti0 - Tia)*(1 - prho.^eTi1).^eTi2 + Tia;%Ion temperatures (keV)
0041     end
0042 else,% Bonoli's paper notation, IEEE Transactions on plasma science Vol. PS-12, No 2, june 1984, p100
0043     pTe = (Te0 - Tea)*(exp(-eTe1*prho.^2) - exp(-eTe1))/(1 - exp(-eTe1)) + Tea;% Electron temperature (keV)
0044     pne = (ne0 - nea)*(exp(ene1) - exp(ene1*prho.^2))/(exp(ene1) - 1) + nea;% Electron density (m-3)
0045     pTi = (Ti0 - Tia)*(exp(-eTi1*prho.^2) - exp(-eTi1))/(1 - exp(-eTi1)) + Tia;% Ion temperatures (keV)
0046 end
0047 %
0048 if isnan(xZeff) || isempty(xZeff),
0049     pZeff = (Zeff0 - Zeffa)*(1 - prho.^2).^eZeff + Zeffa;% Effective charge (a.u.)
0050 else
0051     pZeff = 0.5*(Zeffa - Zeff0)*tanh(eZeff*(prho - xZeff)) + 0.5*(Zeffa + Zeff0);% Effective charge (a.u.)
0052 end
0053 %
0054 % Ion parameters
0055 %
0056 nz = length(zZi);
0057 pzTi = repmat(pTi,[nz,1]);% Same temperature for all ion species
0058 pzni = species_dke_yp(pne,pZeff,zZi,fi);
0059 %
0060 pkin = pTe.*pne + sum(pzni.*pzTi);%Total plasma pressure profile (special units for helmex77 in keV.m-3)
0061 %
0062 
0063

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