ASCOT5
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
mccc.h File Reference

Header file for mccc package. More...

#include "../../ascot5.h"
#include "../../B_field.h"
#include "../../plasma.h"
#include "../../particle.h"
#include "../../random.h"
#include "mccc_wiener.h"

Go to the source code of this file.

Data Structures

struct  mccc_data
 Parameters and data required to evaluate Coulomb collisions. More...
 

Macros

#define MCCC_CUTOFF   0.1
 Defines minimum energy boundary condition.
 

Functions

void mccc_init (mccc_data *mdata, int include_energy, int include_pitch, int include_gcdiff)
 Set collision operator data.
 
void mccc_fo_euler (particle_simd_fo *p, real *h, plasma_data *pdata, mccc_data *mdata, real *rnd)
 Integrate collisions for one time-step.
 
void mccc_gc_euler (particle_simd_gc *p, real *h, B_field_data *Bdata, plasma_data *pdata, mccc_data *mdata, real *rnd)
 Integrate collisions for one time-step.
 
void mccc_gc_milstein (particle_simd_gc *p, real *hin, real *hout, real tol, mccc_wienarr *w, B_field_data *Bdata, plasma_data *pdata, mccc_data *mdata, real *rnd)
 Integrate collisions for one time-step.
 

Detailed Description

Header file for mccc package.

Definition in file mccc.h.

Macro Definition Documentation

◆ MCCC_CUTOFF

#define MCCC_CUTOFF   0.1

Defines minimum energy boundary condition.

This times local electron temperature is minimum energy boundary. If guiding center energy goes below this, it is mirrored to prevent collision coefficients from diverging.

Definition at line 22 of file mccc.h.

Function Documentation

◆ mccc_init()

void mccc_init ( mccc_data * mdata,
int include_energy,
int include_pitch,
int include_gcdiff )

Set collision operator data.

Parameters
mdatapointer to collision operator data struct
include_energycan collisions change marker energy, either 0 or 1
include_pitchcan collisions change marker pitch, either 0 or 1
include_gcdiffcan collisions change GC position, either 0 or 1

Definition at line 17 of file mccc.c.

◆ mccc_fo_euler()

void mccc_fo_euler ( particle_simd_fo * p,
real * h,
plasma_data * pdata,
mccc_data * mdata,
real * rnd )

Integrate collisions for one time-step.

Parameters
pfo struct
htime-steps for NSIMD markers
pdatapointer to plasma data
mdatapointer collision data struct
rndarray of normally distributed random numbers used to resolve collisions. Values for marker i are rnd[i*NSIMD + j]

Definition at line 27 of file mccc_fo_euler.c.

◆ mccc_gc_euler()

void mccc_gc_euler ( particle_simd_gc * p,
real * h,
B_field_data * Bdata,
plasma_data * pdata,
mccc_data * mdata,
real * rnd )

Integrate collisions for one time-step.

Parameters
pgc struct
htime-steps for NSIMD markers
Bdatapointer to magnetic field
pdatapointer to plasma data
mdatapointer to collision data struct
rndarray of normally distributed random numbers used to resolve collisions. Values for marker i are rnd[i*NSIMD + j]

Definition at line 29 of file mccc_gc_euler.c.

◆ mccc_gc_milstein()

void mccc_gc_milstein ( particle_simd_gc * p,
real * hin,
real * hout,
real tol,
mccc_wienarr * w,
B_field_data * Bdata,
plasma_data * pdata,
mccc_data * mdata,
real * rnd )

Integrate collisions for one time-step.

Parameters
ppointer to gc simd struct
hintime-steps for NSIMD markers
houtsuggestions for the next timesteps for NSIMD markers
tolrelative error tolerance
warray holding wiener structs for NSIMD markers
Bdatapointer to magnetic field data
pdatapointer to plasma data
mdatapointer to collision data struct
rndarray of normally distributed random numbers used to resolve collisions. Values for marker i are rnd[i*NSIMD + j]

Definition at line 34 of file mccc_gc_milstein.c.