XGCa
Public Member Functions | Public Attributes | List of all members
CurrentDrive Class Reference

#include <current_drive.hpp>

Inheritance diagram for CurrentDrive:
Inheritance graph
[legend]
Collaboration diagram for CurrentDrive:
Collaboration graph
[legend]

Public Member Functions

 CurrentDrive ()
 
 CurrentDrive (NLReader::NamelistReader &nlr, const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field)
 
void apply (const Grid< DeviceType > &grid, Plasma &plasma, Smoothing &smoothing, const Moments &f0_moments, const DomainDecomposition< DeviceType > &pol_decomp, const MagneticField< DeviceType > &magnetic_field, const GridField< HostType, VarType::Scalar, PhiInterpType::None, TorType::OnePlane, KinType::DriftKin > &loop_voltage_h, LoopVolDiagnostics &loop_vol_diag, int gstep, double time)
 
- Public Member Functions inherited from Source
bool is_triggered (int step)
 

Public Attributes

GridField< HostType, VarType::Scalar, PhiInterpType::None, TorType::OnePlane, KinType::DriftKinjpara_diff_previous_h
 
GridField< HostType, VarType::Scalar, PhiInterpType::None, TorType::OnePlane, KinType::DriftKinjpara_diff_integral_h
 
View< double *, CLayout, HostTypejpar0_h
 
double loop_voltage_psimax
 Inductive current drive: outer boundary (in pol. flux) of the loop voltage. More...
 
bool loop_voltage_fsa
 Make loop voltage and current drive flux-functions if true (default: true) More...
 
double current_drive_p
 Current drive PID controller: factor for proportional controller ( \(P\)) More...
 
double current_drive_i
 Current drive PID controller: factor for integral controller ( \(I\)) More...
 
double current_drive_d
 Current drive PID controller: factor for derivative controller ( \(D\)) More...
 
- Public Attributes inherited from Source
StepTrigger step_trigger
 

Constructor & Destructor Documentation

◆ CurrentDrive() [1/2]

CurrentDrive::CurrentDrive ( )
inline

◆ CurrentDrive() [2/2]

CurrentDrive::CurrentDrive ( NLReader::NamelistReader nlr,
const Grid< DeviceType > &  grid,
const MagneticField< DeviceType > &  magnetic_field 
)
Here is the call graph for this function:

Member Function Documentation

◆ apply()

void CurrentDrive::apply ( const Grid< DeviceType > &  grid,
Plasma plasma,
Smoothing smoothing,
const Moments f0_moments,
const DomainDecomposition< DeviceType > &  pol_decomp,
const MagneticField< DeviceType > &  magnetic_field,
const GridField< HostType, VarType::Scalar, PhiInterpType::None, TorType::OnePlane, KinType::DriftKin > &  loop_voltage_h,
LoopVolDiagnostics loop_vol_diag,
int  gstep,
double  time 
)

Drives electron current such that the plasma current required by the Grad-Shafranov equilibrium magnetic field is maintained. The plasma current is \(j_{\parallel,0} = \hat{\boldsymbol{b}}\cdot\left(\nabla\times\boldsymbol{B}_0\right)/\mu_0 \), or \(j_{\parallel,0} = \sum_s (q_s n_s u_{\parallel,s}) \). Therefore, \(u_{\parallel,e}=j_{\parallel,0}-\sum_{ions}(q_s n_s u_{\parallel,s}) \). The actual electron flow is stored in f0_moments.u_local). Any difference between the targeted and actual flow is damped away with an exponential damping \(\partial u/\partial t = \gamma (u_{target}-u_{actual}) \).

Parameters
[in]smlSimulation object (runtime parameters), class Simulation
[in]gridGrid object, class Grid
[in,out]plasmaXGC plasma object; class plasma
[in]f0_momentsCurrent low-order plasma moments, struct Moments
[in]pol_decompDomain decomposition object (patch boundaries, etc.), class DomainDecomposition
[in]loop_vol_diagDiagnostic ouput object for the loop voltage, class LoopVolDiagnostics
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ current_drive_d

double CurrentDrive::current_drive_d

Current drive PID controller: factor for derivative controller ( \(D\))

◆ current_drive_i

double CurrentDrive::current_drive_i

Current drive PID controller: factor for integral controller ( \(I\))

◆ current_drive_p

double CurrentDrive::current_drive_p

Current drive PID controller: factor for proportional controller ( \(P\))

◆ jpar0_h

View<double*,CLayout,HostType> CurrentDrive::jpar0_h

◆ jpara_diff_integral_h

◆ jpara_diff_previous_h

◆ loop_voltage_fsa

bool CurrentDrive::loop_voltage_fsa

Make loop voltage and current drive flux-functions if true (default: true)

◆ loop_voltage_psimax

double CurrentDrive::loop_voltage_psimax

Inductive current drive: outer boundary (in pol. flux) of the loop voltage.


The documentation for this class was generated from the following files: