forked from ComputationalRadiationPhysics/picongpu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
14 changed files
with
513 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
examples/LaserWakefield/include/simulation_defines/param/physicalConstants.param
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
/** | ||
* Copyright 2013 Axel Huebl, Heiko Burau, Rene Widera | ||
* | ||
* This file is part of PIConGPU. | ||
* | ||
* PIConGPU is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* PIConGPU is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with PIConGPU. | ||
* If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
|
||
|
||
#pragma once | ||
|
||
namespace picongpu | ||
{ | ||
const float_64 PI = 3.141592653589793238462643383279502884197169399; | ||
|
||
/** Threshold used for calculations that want to separate between | ||
* high-precision formulas for relativistic and non-relativistic | ||
* use-cases, e.g. energy-binning algorithms. */ | ||
const float_X GAMMA_THRESH = float_X(1.005); | ||
|
||
namespace SI | ||
{ | ||
/** unit: m / s */ | ||
const float_64 SPEED_OF_LIGHT_SI = 2.99792458e8; | ||
|
||
/** unit: N / A^2 */ | ||
const float_64 MUE0_SI = PI * 4.e-7; | ||
/** unit: C / (V m) */ | ||
const float_64 EPS0_SI = 1.0 / MUE0_SI / SPEED_OF_LIGHT_SI | ||
/ SPEED_OF_LIGHT_SI; | ||
|
||
// Electron properties | ||
/** unit: kg */ | ||
const float_64 ELECTRON_MASS_SI = 9.109382e-31; | ||
/** unit: C */ | ||
const float_64 ELECTRON_CHARGE_SI = -1.602176e-19; | ||
|
||
// Ion / Proton / Positron properties | ||
/** unit: kg */ | ||
const float_64 ION_MASS_SI = 1.6726217e-27; | ||
|
||
const float_64 ION_MASS_C_SI = 1.660538921-27; | ||
} | ||
|
||
// converts | ||
// | ||
// UNIT_A to UNIT_B | ||
// | ||
// CONVENTION: WE DO NOT CONVERT FROM ANY STRANGE UNIT TO UNITLESS UNITS DIRECTLY! | ||
// convert steps: INPUT -> float_64_convert to SI -> float_64_convert to unitless | ||
// -> cast to float | ||
// WE DO NOT define "UNIT_ENERGY_keV" or something similar! Never! | ||
// Stay SI, stay free ;-) | ||
// | ||
// example: | ||
// // some particle physicist beloved input: | ||
// const float_64 An_Arbitrary_Energy_Input_keV = 30.0; // unit: keV | ||
// | ||
// // first convert to SI (because SI stays our standard Unit System!) | ||
// const float_64 An_Arbitrary_Energy_Input_SI = An_Arbitrary_Energy_Input_keV * UNITCONV_keV_to_Joule // unit: Joule | ||
// | ||
// // now the "real" convert to our internal unitless system | ||
// const float_X An_Arbitrary_Energy_Input = float_X(An_Arbitrary_Energy_Input_SI / UNIT_ENERGY) // unit: none | ||
// | ||
// As a convention, we DO NOT use the short track: | ||
// const float_64 An_Arbitrary_Energy_Input_keV = 30.0; // unit: keV | ||
// const float_X An_Arbitrary_Energy_Input = float_X(An_Arbitrary_Energy_Input_SI * UNITCONV_keV_to_Joule / UNIT_ENERGY) // unit: none | ||
// | ||
const float_64 UNITCONV_keV_to_Joule = 1.60217646e-16; | ||
const float_64 UNITCONV_Joule_to_keV = (1.0 / UNITCONV_keV_to_Joule); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.