48 RP::add(
"Diffusion.B0",
"Background field value (T)", 1.0e-9);
54 RP::add(pop +
"_Diffusion.rho",
"Number density (m^-3)", 1.0e7);
55 RP::add(pop +
"_Diffusion.Temperature",
"Temperature (K)", 2.0e6);
56 RP::add(pop +
"_Diffusion.Scale_x",
"Scale length in x (m)", 100000.0);
57 RP::add(pop +
"_Diffusion.Scale_y",
"Scale length in y (m)", 100000.0);
65 RP::get(
"Diffusion.B0", this->
B0);
72 RP::get(pop +
"_Diffusion.rho", sP.
DENSITY);
73 RP::get(pop +
"_Diffusion.Temperature", sP.
TEMPERATURE);
74 RP::get(pop +
"_Diffusion.Scale_x", sP.
SCA_X);
75 RP::get(pop +
"_Diffusion.Scale_y", sP.
SCA_Y);
91 const Real initV0X = 0;
92 const Real initV0Y = 0;
93 const Real initV0Z = 0;
117 vmesh->getBlockInfo(blockGID,&blockCoords[0]);
118 creal vxBlock = blockCoords[0];
119 creal vyBlock = blockCoords[1];
120 creal vzBlock = blockCoords[2];
121 creal dvxCell = blockCoords[3];
122 creal dvyCell = blockCoords[4];
123 creal dvzCell = blockCoords[5];
125 creal vx = vxBlock + (
i+0.5)*dvxCell - initV0X;
126 creal vy = vyBlock + (
j+0.5)*dvyCell - initV0Y;
127 creal vz = vzBlock + (
k+0.5)*dvzCell - initV0Z;
128 const Realf value = initRho * pow(mass / (2.0 * M_PI *
kb * initT), 1.5) * (
129 5.0 * exp(- (pow(x, 2.0) / pow(initScaX, 2.0) + pow(y, 2.0) / pow(initScaY, 2.0))) *
130 exp(- mass * (pow(vx, 2.0) + pow(vy, 2.0) + pow(vz, 2.0)) / (2.0 *
kb * initT))
131 + exp(- mass * (pow(vx, 2.0) + pow(vy, 2.0) + pow(vz, 2.0)) / (2.0 *
kb * initT)));
#define ARCH_INNER_BODY(...)
void setBackgroundField(const FieldFunction &bgFunction, fsgrids::bgbspan bgb, fsgrids::technicalspan technical, FieldSolverGrid &fsgrid, bool append)
void initialize(const double Bx, const double By, const double Bz)
virtual Realf fillPhaseSpace(spatial_cell::SpatialCell *cell, const uint popID, const uint nRequested) const override
std::vector< DiffusionSpeciesParameters > speciesParams
virtual void setProjectBField(fsgrids::perbspan perb, fsgrids::bgbspan bgb, fsgrids::technicalspan technical, FieldSolverGrid &fsgrid) override
static void addParameters(void)
virtual void getParameters(void) override
virtual bool initialize(void) override
virtual void calcCellParameters(spatial_cell::SpatialCell *cell, creal &t) override
virtual bool initialize()
virtual void getParameters()
vmesh::VelocityMesh * get_velocity_mesh(const size_t &popID)
vmesh::VelocityBlockContainer * get_velocity_blocks(const size_t &popID)
std::array< Real, CellParams::N_SPATIAL_CELL_PARAMS > parameters
vmesh::VelocityBlockContainer * dev_get_velocity_blocks(const size_t &popID)
vmesh::VelocityMesh * dev_get_velocity_mesh(const size_t &popID)
ARCH_HOSTDEV Realf * getData()
fsgrid::FsGrid< FS_STENCIL_WIDTH > FieldSolverGrid
ObjectWrapper & getObjectWrapper()
static void parallel_reduce(const uint(&limits)[NDim], Lambda loop_body, T &sum)
std::span< std::array< Real, fsgrids::bfield::N_BFIELD > > perbspan
std::span< technical > technicalspan
std::span< std::array< Real, bgbfield::N_BGB > > bgbspan
std::vector< species::Species > particleSpecies