ASCOT5
Loading...
Searching...
No Matches
simulate.h
Go to the documentation of this file.
1
8
#ifndef SIMULATE_H
9
#define SIMULATE_H
10
11
#include "
ascot5.h
"
12
#include "
B_field.h
"
13
#include "
E_field.h
"
14
#include "
plasma.h
"
15
#include "
neutral.h
"
16
#include "
wall.h
"
17
#include "
boozer.h
"
18
#include "
mhd.h
"
19
#include "
asigma.h
"
20
#include "
nbi.h
"
21
#include "
diag.h
"
22
#include "
random.h
"
23
#include "
simulate/mccc/mccc.h
"
24
30
enum
SIMULATION_MODE
{
33
simulate_mode_fo
= 1,
36
simulate_mode_gc
= 2,
41
simulate_mode_hybrid
= 3,
44
simulate_mode_ml
= 4
45
};
46
57
typedef
struct
{
58
/* Input and diagnostic interfaces */
59
B_field_data
B_data
;
60
E_field_data
E_data
;
61
plasma_data
plasma_data
;
62
neutral_data
neutral_data
;
63
wall_data
wall_data
;
64
boozer_data
boozer_data
;
65
mhd_data
mhd_data
;
66
asigma_data
asigma_data
;
67
nbi_data
nbi_data
;
68
diag_data
diag_data
;
70
/* Metadata */
71
random_data
random_data
;
72
mccc_data
mccc_data
;
75
/* Options - general */
76
int
sim_mode
;
77
int
enable_ada
;
78
int
record_mode
;
80
/* Options - fixed time-step */
81
int
fix_usrdef_use
;
82
real
fix_usrdef_val
;
83
int
fix_gyrodef_nstep
;
86
/* Options - adaptive time-step */
87
real
ada_tol_orbfol
;
89
real
ada_tol_clmbcol
;
91
real
ada_max_drho
;
93
real
ada_max_dphi
;
96
/* Options - physics */
97
int
enable_orbfol
;
98
int
enable_clmbcol
;
99
int
enable_mhd
;
100
int
enable_atomic
;
101
int
disable_gctransform
;
103
int
disable_energyccoll
;
105
int
disable_pitchccoll
;
107
int
disable_gcdiffccoll
;
109
int
reverse_time
;
111
/* Options - end conditions */
112
int
endcond_active
;
113
real
endcond_lim_simtime
;
114
real
endcond_max_mileage
;
115
real
endcond_max_cputime
;
116
real
endcond_min_rho
;
117
real
endcond_max_rho
;
118
real
endcond_min_ekin
;
119
real
endcond_min_thermal
;
121
real
endcond_max_tororb
;
122
real
endcond_max_polorb
;
123
int
endcond_torandpol
;
125
/* Metadata */
126
char
hdf5_in[256];
127
char
hdf5_out[256];
128
char
qid[256];
129
char
description[256];
131
int
mpi_root
;
132
int
mpi_rank
;
133
int
mpi_size
;
135
/* QIDs for inputs if the active inputs are not used */
136
char
qid_options[256];
137
char
qid_bfield[256];
138
char
qid_efield[256];
139
char
qid_marker[256];
140
char
qid_wall[256];
141
char
qid_plasma[256];
142
char
qid_neutral[256];
143
char
qid_boozer[256];
144
char
qid_mhd[256];
145
char
qid_asigma[256];
146
char
qid_nbi[256];
148
}
sim_data
;
149
150
void
simulate_init
(
sim_data
* sim);
151
152
void
simulate
(
int
n_particles,
particle_state
* p,
sim_data
* sim);
153
154
#endif
B_field.h
Header file for B_field.c.
E_field.h
Header file for E_field.c.
ascot5.h
Main header file for ASCOT5.
real
double real
Definition
ascot5.h:85
asigma.h
Header file for asigma.c.
boozer.h
Header file for boozer.c.
diag.h
Header file for diag.c.
mccc.h
Header file for mccc package.
mhd.h
Header file for mhd.c.
nbi.h
Header file for nbi.c.
neutral.h
Header file for neutral.c.
plasma.h
Header file for plasma.c.
random.h
Header file for random.c.
random_data
void * random_data
Definition
random.h:87
SIMULATION_MODE
SIMULATION_MODE
Simulaton modes.
Definition
simulate.h:30
simulate_mode_fo
@ simulate_mode_fo
Definition
simulate.h:33
simulate_mode_ml
@ simulate_mode_ml
Definition
simulate.h:44
simulate_mode_gc
@ simulate_mode_gc
Definition
simulate.h:36
simulate_mode_hybrid
@ simulate_mode_hybrid
Definition
simulate.h:41
simulate
void simulate(int n_particles, particle_state *p, sim_data *sim)
Execute marker simulation.
Definition
simulate.c:83
simulate_init
void simulate_init(sim_data *sim)
Initialize simulation data struct.
Definition
simulate.c:306
B_field_data
Magnetic field simulation data.
Definition
B_field.h:41
E_field_data
Electric field simulation data.
Definition
E_field.h:36
asigma_data
Atomic reaction simulation data.
Definition
asigma.h:53
boozer_data
Data for mapping between the cylindrical and Boozer coordinates.
Definition
boozer.h:16
diag_data
Diagnostics data struct.
Definition
diag.h:21
mccc_data
Parameters and data required to evaluate Coulomb collisions.
Definition
mccc.h:27
mhd_data
MHD simulation data.
Definition
mhd.h:35
nbi_data
NBI data consisting of ninj injectors.
Definition
nbi.h:40
neutral_data
Neutral simulation data.
Definition
neutral.h:30
particle_state
General representation of a marker.
Definition
particle.h:40
plasma_data
Plasma simulation data.
Definition
plasma.h:32
sim_data
Simulation data struct.
Definition
simulate.h:57
sim_data::mpi_size
int mpi_size
Definition
simulate.h:133
sim_data::enable_orbfol
int enable_orbfol
Definition
simulate.h:97
sim_data::endcond_min_ekin
real endcond_min_ekin
Definition
simulate.h:118
sim_data::endcond_torandpol
int endcond_torandpol
Definition
simulate.h:123
sim_data::endcond_max_rho
real endcond_max_rho
Definition
simulate.h:117
sim_data::record_mode
int record_mode
Definition
simulate.h:78
sim_data::sim_mode
int sim_mode
Definition
simulate.h:76
sim_data::disable_energyccoll
int disable_energyccoll
Definition
simulate.h:103
sim_data::ada_max_drho
real ada_max_drho
Definition
simulate.h:91
sim_data::ada_tol_clmbcol
real ada_tol_clmbcol
Definition
simulate.h:89
sim_data::plasma_data
plasma_data plasma_data
Definition
simulate.h:61
sim_data::mhd_data
mhd_data mhd_data
Definition
simulate.h:65
sim_data::endcond_max_tororb
real endcond_max_tororb
Definition
simulate.h:121
sim_data::enable_atomic
int enable_atomic
Definition
simulate.h:100
sim_data::disable_gcdiffccoll
int disable_gcdiffccoll
Definition
simulate.h:107
sim_data::endcond_min_thermal
real endcond_min_thermal
Definition
simulate.h:119
sim_data::endcond_max_mileage
real endcond_max_mileage
Definition
simulate.h:114
sim_data::fix_usrdef_val
real fix_usrdef_val
Definition
simulate.h:82
sim_data::E_data
E_field_data E_data
Definition
simulate.h:60
sim_data::mpi_rank
int mpi_rank
Definition
simulate.h:132
sim_data::disable_pitchccoll
int disable_pitchccoll
Definition
simulate.h:105
sim_data::enable_mhd
int enable_mhd
Definition
simulate.h:99
sim_data::endcond_active
int endcond_active
Definition
simulate.h:112
sim_data::fix_usrdef_use
int fix_usrdef_use
Definition
simulate.h:81
sim_data::mccc_data
mccc_data mccc_data
Definition
simulate.h:72
sim_data::endcond_max_polorb
real endcond_max_polorb
Definition
simulate.h:122
sim_data::random_data
random_data random_data
Definition
simulate.h:71
sim_data::neutral_data
neutral_data neutral_data
Definition
simulate.h:62
sim_data::fix_gyrodef_nstep
int fix_gyrodef_nstep
Definition
simulate.h:83
sim_data::endcond_max_cputime
real endcond_max_cputime
Definition
simulate.h:115
sim_data::boozer_data
boozer_data boozer_data
Definition
simulate.h:64
sim_data::endcond_min_rho
real endcond_min_rho
Definition
simulate.h:116
sim_data::endcond_lim_simtime
real endcond_lim_simtime
Definition
simulate.h:113
sim_data::enable_ada
int enable_ada
Definition
simulate.h:77
sim_data::B_data
B_field_data B_data
Definition
simulate.h:59
sim_data::wall_data
wall_data wall_data
Definition
simulate.h:63
sim_data::reverse_time
int reverse_time
Definition
simulate.h:109
sim_data::mpi_root
int mpi_root
Definition
simulate.h:131
sim_data::ada_max_dphi
real ada_max_dphi
Definition
simulate.h:93
sim_data::asigma_data
asigma_data asigma_data
Definition
simulate.h:66
sim_data::enable_clmbcol
int enable_clmbcol
Definition
simulate.h:98
sim_data::disable_gctransform
int disable_gctransform
Definition
simulate.h:101
sim_data::ada_tol_orbfol
real ada_tol_orbfol
Definition
simulate.h:87
sim_data::diag_data
diag_data diag_data
Definition
simulate.h:68
sim_data::nbi_data
nbi_data nbi_data
Definition
simulate.h:67
wall_data
Wall model simulation data.
Definition
wall.h:31
wall.h
Header file for wall.c.
Generated on Tue Dec 3 2024 11:57:29 for ASCOT5 by
1.11.0