62 RP::add(
"Flowthrough.emptyBox",
"Is the simulation domain empty initially?",
false);
63 RP::add(
"Flowthrough.densityModel",
"Plasma density model, 'Maxwellian' or 'SheetMaxwellian'",
string(
"Maxwellian"));
64 RP::add(
"Flowthrough.densityWidth",
"Width of signal around origin",6.e7);
65 RP::add(
"Flowthrough.rescaleDensity",
"Rescale VDF to match spatial ",
false);
66 RP::add(
"Flowthrough.Bx",
"Magnetic field x component (T)", 0.0);
67 RP::add(
"Flowthrough.By",
"Magnetic field y component (T)", 0.0);
68 RP::add(
"Flowthrough.Bz",
"Magnetic field z component (T)", 0.0);
73 RP::add(pop +
"_Flowthrough.rho",
"Number density (m^-3)", 0.0);
74 RP::add(pop +
"_Flowthrough.rhoBase",
"Background number density (m^-3)", 0.0);
75 RP::add(pop +
"_Flowthrough.T",
"Temperature (K)", 0.0);
76 RP::add(pop +
"_Flowthrough.VX0",
"Initial bulk velocity in x-direction", 0.0);
77 RP::add(pop +
"_Flowthrough.VY0",
"Initial bulk velocity in y-direction", 0.0);
78 RP::add(pop +
"_Flowthrough.VZ0",
"Initial bulk velocity in z-direction", 0.0);
85 MPI_Comm_rank(MPI_COMM_WORLD,&
myRank);
88 RP::get(
"Flowthrough.emptyBox",
emptyBox);
89 RP::get(
"Flowthrough.Bx", this->
Bx);
90 RP::get(
"Flowthrough.By", this->
By);
91 RP::get(
"Flowthrough.Bz", this->
Bz);
92 string densityModelString;
93 RP::get(
"Flowthrough.densityModel",densityModelString);
100 if (
myRank ==
MASTER_RANK) cerr << __FILE__ <<
":" << __LINE__ <<
" ERROR: Unknown option value!" << endl;
111 RP::get(pop +
"_Flowthrough.rho", sP.
rho);
112 RP::get(pop +
"_Flowthrough.rhoBase", sP.
rhoBase);
113 RP::get(pop +
"_Flowthrough.T", sP.
T);
114 RP::get(pop +
"_Flowthrough.VX0", sP.
V0[0]);
115 RP::get(pop +
"_Flowthrough.VY0", sP.
V0[1]);
116 RP::get(pop +
"_Flowthrough.VZ0", sP.
V0[2]);
132 rvalue =
sqrt(x*x + y*y + z*z);
174 const uint nRequested
181 const Real initV0X = sP.
V0[0];
182 const Real initV0Y = sP.
V0[1];
183 const Real initV0Z = sP.
V0[2];
195 std::memset(bufferData, 0, nRequested*
WID3*
sizeof(
Realf));
209 vmesh->getBlockInfo(blockGID,&blockCoords[0]);
210 creal vxBlock = blockCoords[0];
211 creal vyBlock = blockCoords[1];
212 creal vzBlock = blockCoords[2];
213 creal dvxCell = blockCoords[3];
214 creal dvyCell = blockCoords[4];
215 creal dvzCell = blockCoords[5];
217 creal vx = vxBlock + (
i+0.5)*dvxCell - initV0X;
218 creal vy = vyBlock + (
j+0.5)*dvyCell - initV0Y;
219 creal vz = vzBlock + (
k+0.5)*dvzCell - initV0Z;
240 const Real initV0X = sP.
V0[0];
241 const Real initV0Y = sP.
V0[1];
242 const Real initV0Z = sP.
V0[2];
247 creal vx = vx_in - initV0X;
248 creal vy = vy_in - initV0Y;
249 creal vz = vz_in - initV0Z;
271 vector<std::array<Real, 3>> centerPoints;
272 std::array<Real, 3> point {{sP.
V0[0], sP.
V0[1], sP.
V0[2]}};
273 centerPoints.push_back(point);
sqrt(1.0+vA *vA/(c *c))) % Ion-acoustic wave cS
static DensityModel densityModel
#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
virtual void getParameters(void) override
virtual std::vector< std::array< Real, 3 > > getV0(creal x, creal y, creal z, const uint popID) const override
Return a vector containing the velocity coordinate of the centre of each ion population in the distri...
virtual Realf probePhaseSpace(spatial_cell::SpatialCell *cell, const uint popID, Real vx_in, Real vy_in, Real vz_in) const override
virtual void setProjectBField(fsgrids::perbspan perb, fsgrids::bgbspan bgb, fsgrids::technicalspan technical, FieldSolverGrid &fsgrid) override
virtual Real getCorrectNumberDensity(spatial_cell::SpatialCell *cell, const uint popID) const override
std::vector< FlowthroughSpeciesParameters > speciesParams
static void addParameters(void)
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
ARCH_HOSTDEV Realf MaxwellianPhaseSpaceDensity(creal &vx, creal &vy, creal &vz, creal &T, creal &rho, creal &mass)
std::vector< species::Species > particleSpecies
static ARCH_HOSTDEV VecSimple< T > abs(const VecSimple< T > &l)