master
rifki sadikin 6 years ago
parent e6d751ab7a
commit 8d0f695cc7
  1. BIN
      PoissonSolver3DCylindricalGPUReferenceManual.pdf
  2. 6
      example/PoissonSolver3DGPUTest.h
  3. 12
      interface/PoissonSolver3DCylindricalGPU.cxx
  4. 10
      interface/PoissonSolver3DCylindricalGPU.h

@ -14,12 +14,6 @@
const double fgkTPCZ0 = 249.7; ///< nominal gating grid position const double fgkTPCZ0 = 249.7; ///< nominal gating grid position
const double fgkIFCRadius = 83.5; ///< radius which renders the "18 rod manifold" best -> compare calc. of Jim Thomas const double fgkIFCRadius = 83.5; ///< radius which renders the "18 rod manifold" best -> compare calc. of Jim Thomas
const double fgkOFCRadius = 254.5; ///< Mean Radius of the Outer Field Cage (252.55 min, 256.45 max) (cm) const double fgkOFCRadius = 254.5; ///< Mean Radius of the Outer Field Cage (252.55 min, 256.45 max) (cm)
const double fgkZOffSet = 0.2; ///< Offset from CE: calculate all distortions closer to CE as if at this point
const double fgkCathodeV = -100000.0; ///< Cathode Voltage (volts)
const double fgkGG = -70.0; ///< Gating Grid voltage (volts)
const double fgkdvdE = 0.0024; ///< [cm/V] drift velocity dependency on the E field (from Magboltz for NeCO2N2 at standard environment)
const double fgkEM = -1.602176487e-19 / 9.10938215e-31; ///< charge/mass in [C/kg]
const double fgke0 = 8.854187817e-12; ///< vacuum permittivity [A·s/(V·m)]
const double fgConvergenceError = 1e-6; ///< vacuum permittivity [A·s/(V·m)] const double fgConvergenceError = 1e-6; ///< vacuum permittivity [A·s/(V·m)]
void DoPoissonSolverExperiment(const int kRows, const int kColumns, const int kPhiSlices, const int kIterations, const int kSymmetry); void DoPoissonSolverExperiment(const int kRows, const int kColumns, const int kPhiSlices, const int kIterations, const int kSymmetry);
void InitVoltandCharge3D(float * VPotentialExact,float * VPotential,float * RhoCharge,const int kRows, const int kColumns,const int kPhiSlices,float gridSizeR,float gridSizeZ,float gridSizePhi); void InitVoltandCharge3D(float * VPotentialExact,float * VPotential,float * RhoCharge,const int kRows, const int kColumns,const int kPhiSlices,float gridSizeR,float gridSizeZ,float gridSizePhi);

@ -24,21 +24,15 @@
/// ///
/// ///
/// ///
/// \author Rifki Sadikin <rifki.sadikin@cern.ch>, Indonesian Institute of Sciences /// \author Rifki Sadikin <rifki.sadikin@lipi.go.id>, Indonesian Institute of Sciences
/// \date Nov 8, 2018 /// \date Nov 8, 2018
#include <math.h> #include <math.h>
#include "PoissonSolver3DCylindricalGPU.h" #include "PoissonSolver3DCylindricalGPU.h"
const float PoissonSolver3DCylindricalGPU::fgkTPCZ0 = 249.7; ///< nominal gating grid position const float PoissonSolver3DCylindricalGPU::fgkZ0 = 249.7; ///< nominal gating grid position
const float PoissonSolver3DCylindricalGPU::fgkIFCRadius = 83.5; ///< radius which renders the "18 rod manifold" best -> compare calc. of Jim Thomas const float PoissonSolver3DCylindricalGPU::fgkIFCRadius = 83.5; ///< radius which renders the "18 rod manifold" best -> compare calc. of Jim Thomas
const float PoissonSolver3DCylindricalGPU::fgkOFCRadius = 254.5; ///< Mean Radius of the Outer Field Cage (252.55 min, 256.45 max) (cm) const float PoissonSolver3DCylindricalGPU::fgkOFCRadius = 254.5; ///< Mean Radius of the Outer Field Cage (252.55 min, 256.45 max) (cm)
const float PoissonSolver3DCylindricalGPU::fgkZOffSet = 0.2; ///< Offset from CE: calculate all distortions closer to CE as if at this point
const float PoissonSolver3DCylindricalGPU::fgkCathodeV = -100000.0; ///< Cathode Voltage (volts)
const float PoissonSolver3DCylindricalGPU::fgkGG = -70.0; ///< Gating Grid voltage (volts)
const float PoissonSolver3DCylindricalGPU::fgkdvdE = 0.0024; ///< [cm/V] drift velocity dependency on the E field (from Magboltz for NeCO2N2 at standard environment)
const float PoissonSolver3DCylindricalGPU::fgkEM = -1.602176487e-19 / 9.10938215e-31; ///< charge/mass in [C/kg]
const float PoissonSolver3DCylindricalGPU::fgke0 = 8.854187817e-12; ///< vacuum permittivity [A·s/(V·m)]
float PoissonSolver3DCylindricalGPU::fgExactErr = 1e-4; float PoissonSolver3DCylindricalGPU::fgExactErr = 1e-4;
float PoissonSolver3DCylindricalGPU::fgConvergenceError = 1e-3; float PoissonSolver3DCylindricalGPU::fgConvergenceError = 1e-3;
@ -118,7 +112,7 @@ void PoissonSolver3DCylindricalGPU::PoissonMultiGrid3D2D(float *VPotential, floa
const float gridSizeR = (PoissonSolver3DCylindricalGPU::fgkOFCRadius-PoissonSolver3DCylindricalGPU::fgkIFCRadius) / (nRRow-1); // h_{r} const float gridSizeR = (PoissonSolver3DCylindricalGPU::fgkOFCRadius-PoissonSolver3DCylindricalGPU::fgkIFCRadius) / (nRRow-1); // h_{r}
const float gridSizePhi = M_PI/phiSlice; // h_{phi} const float gridSizePhi = M_PI/phiSlice; // h_{phi}
const float gridSizeZ = PoissonSolver3DCylindricalGPU::fgkTPCZ0 / (nZColumn-1) ; // h_{z} const float gridSizeZ = PoissonSolver3DCylindricalGPU::fgkZ0 / (nZColumn-1) ; // h_{z}
const float ratioPhi = gridSizeR*gridSizeR / (gridSizePhi*gridSizePhi) ; // ratio_{phi} = gridsize_{r} / gridsize_{phi} const float ratioPhi = gridSizeR*gridSizeR / (gridSizePhi*gridSizePhi) ; // ratio_{phi} = gridsize_{r} / gridsize_{phi}
const float ratioZ = gridSizeR*gridSizeR / (gridSizeZ*gridSizeZ) ; // ratio_{Z} = gridsize_{r} / gridsize_{z} const float ratioZ = gridSizeR*gridSizeR / (gridSizeZ*gridSizeZ) ; // ratio_{Z} = gridsize_{r} / gridsize_{z}
const float convErr = PoissonSolver3DCylindricalGPU::fgConvergenceError; const float convErr = PoissonSolver3DCylindricalGPU::fgConvergenceError;

@ -6,7 +6,7 @@
/// \brief Kelas ini merupakan interface PoissonSolver 3D dalam koordinat silindrikal /// \brief Kelas ini merupakan interface PoissonSolver 3D dalam koordinat silindrikal
/// yang diterapkan pada NVDIA Cuda /// yang diterapkan pada NVDIA Cuda
/// ///
/// \author Rifki Sadikin <rifki.sadikin@cern.ch>, Indonesian Institute of Sciences /// \author Rifki Sadikin <rifki.sadikin@lipi.go.id>, Indonesian Institute of Sciences
/// \date Nov 20, 2017 /// \date Nov 20, 2017
#include "PoissonSolver3DGPU.h" #include "PoissonSolver3DGPU.h"
@ -76,15 +76,9 @@ public:
static const float fgkTPCZ0; ///< nominal gating grid position static const float fgkZ0; ///< nominal gating grid position
static const float fgkIFCRadius; ///< Mean Radius of the Inner Field Cage ( 82.43 min, 83.70 max) (cm) static const float fgkIFCRadius; ///< Mean Radius of the Inner Field Cage ( 82.43 min, 83.70 max) (cm)
static const float fgkOFCRadius; ///< Mean Radius of the Outer Field Cage (252.55 min, 256.45 max) (cm) static const float fgkOFCRadius; ///< Mean Radius of the Outer Field Cage (252.55 min, 256.45 max) (cm)
static const float fgkZOffSet; ///< Offset from CE: calculate all distortions closer to CE as if at this point
static const float fgkCathodeV; ///< Cathode Voltage (volts)
static const float fgkGG; ///< Gating Grid voltage (volts)
static const float fgkdvdE; ///< [cm/V] drift velocity dependency on the E field (from Magboltz for NeCO2N2 at standard environment)
static const float fgkEM; ///< charge/mass in [C/kg]
static const float fgke0; ///< vacuum permittivity [A·s/(V·m)]
static float fgExactErr; ///< Error tolerated static float fgExactErr; ///< Error tolerated
static float fgConvergenceError; ///< Error tolerated static float fgConvergenceError; ///< Error tolerated

Loading…
Cancel
Save