forked from ComputationalRadiationPhysics/picongpu
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add new example 2 Ions #8
Open
psychocoderHPC
wants to merge
1
commit into
dev
Choose a base branch
from
topic-gasFunctorsMultiSpecies-rb3-example
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be Deuterium
I think you wanted a hydrogen gas molecule, having 2 protons and no neutron.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's intended. deuterium has the same charge/mass ratio as carbon, helium, oxygen, ... in their natural isotopes. protons not. but one would call this 'D' not 'H'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah sure but why not just add a
struct Deuterium
?At some point we need a list of the most common elements anyway.
@psychocoderHPC you can also create a new file for only the structs of these elements.
Anyway IMO you should create a new struct and give it a suitable name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are commenting on an outdated, offline example for me. don't worry ;)