bripfield_yp

PURPOSE ^

SYNOPSIS ^

function [aBx,aBy,aBz,delta_rho,delta_theta,delta_phi] = bripfield_yp(ripple,equilDKE,mode)

DESCRIPTION ^

    Calculation of the toroidal magnetic field ripple

    (1): windings with circular cross-section: approximate perturbative calculation, rot(B) = 0, div(B) <> 0, see thesis work of Grua
    (2): windings with circular cross-section: exact calculation with N filiform coils
    (3): windings with circular cross-section: exact perturbative calculation laplacian(F) = 0 and B = rot(F)(see ref yus90)
   (4): windings with arbitrary cross-section.

    Input:

       - ripple: magnetic ripple parameters structure
       - equilDKE: axisymmetric magnetic equilibrium structure (equil.id must be consistent with ripple.equil_id)
        - mode: mode of calculation (see above) [1,1]

    Output:

       - aBx: amplitude of the horizontal magnetic ripple field (T) [nrho,ntheta]
       - aBy: amplitude of the vertical magnetic ripple field (T) [nrho,ntheta]
       - aBz: amplitude of the toroidal magnetic ripple field (T) [nrho,ntheta] 

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [aBx,aBy,aBz,delta_rho,delta_theta,delta_phi] = bripfield_yp(ripple,equilDKE,mode)
0002 %
0003 %    Calculation of the toroidal magnetic field ripple
0004 %
0005 %    (1): windings with circular cross-section: approximate perturbative calculation, rot(B) = 0, div(B) <> 0, see thesis work of Grua
0006 %    (2): windings with circular cross-section: exact calculation with N filiform coils
0007 %    (3): windings with circular cross-section: exact perturbative calculation laplacian(F) = 0 and B = rot(F)(see ref yus90)
0008 %   (4): windings with arbitrary cross-section.
0009 %
0010 %    Input:
0011 %
0012 %       - ripple: magnetic ripple parameters structure
0013 %       - equilDKE: axisymmetric magnetic equilibrium structure (equil.id must be consistent with ripple.equil_id)
0014 %        - mode: mode of calculation (see above) [1,1]
0015 %
0016 %    Output:
0017 %
0018 %       - aBx: amplitude of the horizontal magnetic ripple field (T) [nrho,ntheta]
0019 %       - aBy: amplitude of the vertical magnetic ripple field (T) [nrho,ntheta]
0020 %       - aBz: amplitude of the toroidal magnetic ripple field (T) [nrho,ntheta]
0021 %
0022 % By Yves Peysson (CEA-DRFC, yves.peysson@cea.fr) and Joan Decker (CEA-DRFC, joan.decker@cea.fr)
0023 %
0024 if nargin < 4,
0025     dopt = 0;
0026 end
0027 %
0028 if nargin < 3,
0029     error(2,'Wrong number of input arguments in bripfield_yp.m');
0030 end
0031 %
0032 if strcmp(equilDKE.tokname,ripple.equil_id),
0033     if mode == 1,
0034         error('Not yet implemented');
0035     elseif mode == 2,
0036         error('Not yet implemented');
0037     elseif mode == 3,
0038         [aBx,aBy,aBz,delta_rho,delta_theta,delta_phi] = bripfield_circ3_yp(equilDKE.Xx + equilDKE.Rp,equilDKE.Xy + equilDKE.Zp,ripple.N,ripple.B0,ripple.R0,ripple.rn,ripple.rx);
0039     elseif mode >= 4,
0040         error('Not yet implemented');
0041     end   
0042 else
0043     error('ID of the magnetic field ripple and the magnetic field equilibrium are inconsistent.');
0044 end
0045 %

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