Skip to content
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

Point Detector Tally #3109

Open
wants to merge 79 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
21efc8d
changed output, now printing xs in every collision
Itay-max Oct 25, 2022
8269657
created get pdf value and didnt use it
Itay-max Oct 25, 2022
9d1f196
implemented u_com and tried making a ghost particle for each collisio…
Itay-max Oct 25, 2022
64f1d40
succefuly calculated mean free path using a ghost parrticle. memory p…
Itay-max Oct 25, 2022
22a54ca
cant kill particles
Itay-max Oct 25, 2022
4e3ab1d
finally fixed the problem of generating the gost particle and trackin…
Itay-max Oct 25, 2022
f48ef19
added a new estimtor named point - works
Itay-max Oct 25, 2022
c2dfc90
tried adding Mu lab calcs but coulndt compile
Itay-max Oct 25, 2022
23a7d14
added arik function but only took one solution for mu com
Itay-max Oct 25, 2022
6ac128f
implementd two solution for comCM
Itay-max Oct 25, 2022
913273d
getting similar results to mcnp but assuming target is in rest
Itay-max Oct 25, 2022
65f3033
added v_t = velcity of target particle as a property of particle data
Itay-max Oct 25, 2022
52d337e
using v_t for calcualtion of p2 , no longer assuming target in rest
Itay-max Oct 25, 2022
bff894c
changed p2 calc and verified it by maxwell boltzman distirbution
Itay-max Oct 25, 2022
eb3fcb8
printing temprature
Itay-max Oct 25, 2022
bcae8f7
Merge branch 'Ecalc' of https://github.com/itayhorin/openmc into Ecalc
Itay-max Oct 25, 2022
d860ce7
Merge pull request #1 from itayhorin/Ecalc
Itay-max Oct 25, 2022
8b70afb
Merge branch 'develop' of https://github.com/Itay-max/openmc into dev…
Jul 27, 2023
be52bad
working point tally for elastic scattering
Nov 13, 2023
ab940cf
Merge branch 'develop' of https://github.com/itay-space/openmc into d…
Nov 13, 2023
ad47f6b
trying to add contribution from source
Nov 16, 2023
bf1f515
flux from source is calcualted in tally scoring
Nov 18, 2023
bcab472
added get_MFP function and trying to read inelastic angle energy dist…
Nov 19, 2023
4b0b402
energy filter works for point det
Nov 23, 2023
60df643
trying to get pdf from inelastic disrtibutions
Nov 28, 2023
ca6f94c
calculating pdfs in a diffenent function
Nov 28, 2023
cf30f45
doing kinemtics and calcuating pdf for elastic scattering in a new fu…
Nov 28, 2023
f96377e
get the positin of the detector in a new function
Nov 28, 2023
6c90155
detector position in a new function
Nov 28, 2023
e44d140
working on detector positin function
Nov 28, 2023
666bf5e
looping on the ghost particles and calcuting their flux contibution a…
Nov 28, 2023
f8de667
Made sure the target veloity is initialzied to zero in inelastic scat…
Nov 28, 2023
a969cd4
Added mu_cm calcuation for KalbachMann distrubition.
Nov 29, 2023
310e660
calculating pdf_lab using derivative and chagning function to void so…
Nov 29, 2023
42b87c6
Now filling ghost particles and getting pdfs from Uncorrelated angle …
Nov 29, 2023
a6c51f9
Now creating also ghost particle from nbodyphase space distribution
Nov 30, 2023
1439772
fixed all calcualtions in inelastic, accidently took mu_cm from sampling
Nov 30, 2023
e7aae35
only taking solutions that conserve energy.
Nov 30, 2023
db48c1c
multiply the weight with yield for example n,2n is 2
Dec 3, 2023
8a3e48e
calculating pdf and generating ghost particles in Correlated distribu…
Dec 3, 2023
1c519fc
trying to creat ghost particles from fission
Dec 5, 2023
77ffc54
scoring ghost particles from fission is working now
Dec 5, 2023
690c705
added tools to make discrete mu distrubtion to pdf values
Dec 6, 2023
7b8135d
added pdfs calculations for IncoherentElastic and CoherentElasticAE +…
Dec 6, 2023
023baab
added pdf calculations for Discrete Incohernet both for elastic and i…
Dec 6, 2023
daf65f3
added pdf for incohernet inelastic
Dec 6, 2023
c33df5a
printing the thermal distribution used.
Dec 6, 2023
e86efdd
distinguish from non s(a,b) elastic scattering to prevent double scoring
Dec 6, 2023
bd53fb7
creating the ghost particle from s(a,b) and getting pdf in physics.cpp
Dec 6, 2023
f5fde24
scoring the ghost particle in a designated function
Dec 10, 2023
cb09cb7
scoring the ghost paritcles in S(a,b)
Dec 10, 2023
56698e6
added pdf contribution from coherentleastic. and can print to file pd…
Dec 13, 2023
16db49e
initialized p.event._index_mt every collision to distinguish between …
Dec 23, 2023
93dfd87
fixed coherentElastic
Dec 26, 2023
2a37ce7
trying arik's function
Dec 28, 2023
a8124ef
added inelastic function
Dec 28, 2023
13801e1
also included fission to be in the new scoring method
Dec 29, 2023
809769b
Had a bug in the formula for cond and insq. wasa using p1_cm instaed …
Jan 2, 2024
090a111
merged elastic and inelatic by repalcing m4
Jan 2, 2024
5f21e9f
added option to add point detector via python api
Jan 2, 2024
549c66e
same q for both sols and also using approx more often
Jan 2, 2024
4848fb7
modified tolernace param to use approx
Jan 7, 2024
e14851b
implemented multiple detectors
Jan 7, 2024
4e58b2c
trying to add exclusion sphere and also no need for score fission net…
Jan 16, 2024
612ff60
fixed the MFP function so now the exculsion sphere works
Jan 18, 2024
f05488f
contibution is now only from external source
Jan 30, 2024
41221f6
User now have to specify R0 (dor the exclusion sphere radius) and als…
May 13, 2024
075b87c
We Fixed cohernetElastic!
Jun 6, 2024
b3cb01a
discrete distribution was not implemented
Aug 4, 2024
9881ab0
Point tally detector development
Aug 6, 2024
26f4fd1
fixed: Expected function implmention (virtual)
Aug 13, 2024
aa1e4e6
Merge branch 'deploy' of https://github.com/itay-space/openmc into de…
Aug 13, 2024
f0480c4
Fixed H1 2 soultions and not scoring while particle is outside of geo…
Nov 5, 2024
5a57f2e
Merge branch 'exclusion_sphere' into HEAD
Nov 10, 2024
132be34
applied clang-format-15
Nov 10, 2024
e5ac4d4
Applied PEP8
Nov 10, 2024
b0e4073
Merge branch 'develop' of https://github.com/itay-space/openmc into d…
Nov 14, 2024
77b53dc
Merge branch 'develop' into deploy
Nov 14, 2024
6975156
Implementd contribution from muitlpe sources, and verified al working…
Nov 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
discrete distribution was not implemented
  • Loading branch information
Your Name committed Aug 4, 2024
commit b3cb01aab43f90904d8865d813dc3868936eda3b
34 changes: 17 additions & 17 deletions src/distribution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,27 +141,27 @@ double Discrete::sample(uint64_t* seed) const
return x_[di_.sample(seed)];
}

double Discrete::get_pdf(double x) const {
// Check if x is outside the range of possible outcomes
if (x < x_.front() || x > x_.back()) {
return 0.0; // x is outside the valid range
}
// double Discrete::get_pdf(double x) const {
// // Check if x is outside the range of possible outcomes
// if (x < x_.front() || x > x_.back()) {
// return 0.0; // x is outside the valid range
// }

auto it = std::find(x_.begin(), x_.end(), x);

// Check if x is a valid outcome
if (it != x_.end()) {
// Calculate the probability associated with the outcome using DiscreteIndex
size_t index = std::distance(x_.begin(), it);
double probability = di_.prob()[index];
return probability;
} else {
return 0.0; // x is not a valid outcome
}
// auto it = std::find(x_.begin(), x_.end(), x);

// // Check if x is a valid outcome
// if (it != x_.end()) {
// // Calculate the probability associated with the outcome using DiscreteIndex
// size_t index = std::distance(x_.begin(), it);
// double probability = di_.prob()[index];
// return probability;
// } else {
// return 0.0; // x is not a valid outcome
// }


}

// }

//==============================================================================
// Uniform implementation
Expand Down