Navigation

Main Page
Download
Support
Installation
Tutorial
Examples
Reference Manual
   Version 1.0.6dev
      Class Index
      File List
   Version 1.0.6
   Version 1.0.5new_solver
   Version 1.0.5dev
   Version 1.0.5b
   Version 1.0.4dev
   Version 1.0.4
Publications


Hosted by Get Ion Beam Simulator at SourceForge.net. Fast, secure and Free Open Source software downloads
scharge.hpp File Reference

Space charge deposition functions. More...

#include <pthread.h>
#include "scalarfield.hpp"
#include "particles.hpp"
#include "cfifo.hpp"

Go to the source code of this file.

Functions

void scharge_finalize_pic (MeshScalarField &scharge)
 Finalize space charge calculation. More...
 
void scharge_add_from_trajectory_pic (MeshScalarField &scharge, pthread_mutex_t *mutex, double I, const ParticleP2D &x1, const ParticleP2D &x2)
 Function for adding charge to space charge density map from particle trajectory in 2d simulation. More...
 
void scharge_add_from_trajectory_pic (MeshScalarField &scharge, pthread_mutex_t *mutex, double I, const ParticlePCyl &x1, const ParticlePCyl &x2)
 Function for adding charge to space charge density map from particle trajectory in cylindrically symmetric simulation. More...
 
void scharge_add_from_trajectory_pic (MeshScalarField &scharge, pthread_mutex_t *mutex, double I, const ParticleP3D &x1, const ParticleP3D &x2)
 Function for adding charge to space charge density map from particle trajectory in 3d simulation. More...
 
void scharge_finalize_linear (MeshScalarField &scharge)
 
void scharge_add_from_trajectory_linear (MeshScalarField &scharge, pthread_mutex_t *mutex, double I, int dir, const CFiFo< ParticleP2D, 4 > &cdpast, const int i[3])
 
void scharge_add_from_trajectory_linear (MeshScalarField &scharge, pthread_mutex_t *mutex, double I, int dir, const CFiFo< ParticleP3D, 4 > &cdpast, const int i[3])
 
void scharge_add_from_trajectory_linear (MeshScalarField &scharge, pthread_mutex_t *mutex, double I, int dir, const CFiFo< ParticlePCyl, 4 > &cdpast, const int i[3])
 
void scharge_finalize_step_pic (MeshScalarField &scharge)
 
void scharge_add_step_pic (MeshScalarField &scharge, double Q, const Vec3D &x)
 

Detailed Description

Space charge deposition functions.

Function Documentation

◆ scharge_add_from_trajectory_pic() [1/3]

void scharge_add_from_trajectory_pic ( MeshScalarField scharge,
pthread_mutex_t *  mutex,
double  I,
const ParticleP2D x1,
const ParticleP2D x2 
)

Function for adding charge to space charge density map from particle trajectory in 2d simulation.

Adds contribution to space charge density map scharge from a particle carrying current per length I travelling from x1 to x2. Charge density is added to the mesh assuming that it is localized at the point where particle was at time 0.5*(t1+t2). This function is supposed to be used so that x1 and x2 are at the mesh intersection points, through which particle trajectory has passed.

◆ scharge_add_from_trajectory_pic() [2/3]

void scharge_add_from_trajectory_pic ( MeshScalarField scharge,
pthread_mutex_t *  mutex,
double  I,
const ParticleP3D x1,
const ParticleP3D x2 
)

Function for adding charge to space charge density map from particle trajectory in 3d simulation.

Same as for scharge_add_from_trajectory(). Now I is real current (A).

◆ scharge_add_from_trajectory_pic() [3/3]

void scharge_add_from_trajectory_pic ( MeshScalarField scharge,
pthread_mutex_t *  mutex,
double  I,
const ParticlePCyl x1,
const ParticlePCyl x2 
)

Function for adding charge to space charge density map from particle trajectory in cylindrically symmetric simulation.

Same as for scharge_add_from_trajectory(). Now I is real current (A).

◆ scharge_finalize_pic()

void scharge_finalize_pic ( MeshScalarField scharge)

Finalize space charge calculation.

Converts charge map built by calls to scharge_add_from_trajectory() to space charge density map suitable for potential solvers. Also corrects boundary space charge values.


Reference manual for Ion Beam Simulator 1.0.6dev
Generated by Doxygen 1.9.1 on Thu Sep 11 2025 09:37:24.