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

Avoid an NaN in collision module #2225

Merged
merged 33 commits into from
Aug 24, 2021
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
882a3c6
Update inputs_3d
Yin-YinjianZhao Aug 17, 2020
585fb3e
Update inputs_2d
Yin-YinjianZhao Aug 17, 2020
2a8f886
Update inputs_2d
Yin-YinjianZhao Aug 19, 2020
389dd4c
Update inputs_3d
Yin-YinjianZhao Aug 19, 2020
4d092bb
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX
Yin-YinjianZhao Aug 19, 2020
1514ca2
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX
Yin-YinjianZhao Aug 24, 2020
28c44a1
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX
Yin-YinjianZhao Sep 3, 2020
7d4cb81
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX
Yin-YinjianZhao Sep 8, 2020
705246c
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX
Yin-YinjianZhao Sep 10, 2020
a83bdb5
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX
Yin-YinjianZhao Sep 14, 2020
2004311
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX
Yin-YinjianZhao Sep 24, 2020
e00eb47
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX
Yin-YinjianZhao Sep 30, 2020
855462d
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX
Yin-YinjianZhao Oct 1, 2020
cba87b4
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX
Yin-YinjianZhao Oct 6, 2020
333aa64
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX
Yin-YinjianZhao Oct 12, 2020
9f10bcd
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX
Yin-YinjianZhao Oct 13, 2020
95d3c0c
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX
Yin-YinjianZhao Oct 14, 2020
4d420b1
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX
Yin-YinjianZhao Oct 18, 2020
5c93474
Merge branch 'master' of https://github.com/Yin-YinjianZhao/WarpX
Yin-YinjianZhao Oct 18, 2020
ec57630
merge
Yin-YinjianZhao Oct 19, 2020
55f4056
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX into…
Yin-YinjianZhao Oct 21, 2020
c741e49
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX into…
Yin-YinjianZhao Oct 26, 2020
a78c339
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX into…
Yin-YinjianZhao Oct 26, 2020
b0b86aa
merge
Yin-YinjianZhao Nov 16, 2020
7e8c35a
merge
Yin-YinjianZhao Nov 16, 2020
3bdc49b
merge
Yin-YinjianZhao Dec 1, 2020
8902ef5
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX into…
Yin-YinjianZhao Dec 7, 2020
a3151d9
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX into…
Yin-YinjianZhao Dec 21, 2020
0e0e768
merge
Yin-YinjianZhao Jan 7, 2021
adc868e
merge
Yin-YinjianZhao Feb 9, 2021
84bd846
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX into…
Yin-YinjianZhao May 19, 2021
b2f6769
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX into…
Yin-YinjianZhao Aug 23, 2021
8853aa2
fix nan
Yin-YinjianZhao Aug 23, 2021
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
9 changes: 7 additions & 2 deletions Source/Particles/Collision/ElasticCollisionPerez.H
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,13 @@ void ElasticCollisionPerez (

// compute Debye length lmdD
T_R lmdD;
lmdD = T_R(1.0)/std::sqrt( n1*q1*q1/(T1t*PhysConst::ep0) +
n2*q2*q2/(T2t*PhysConst::ep0) );
if ( T1t < T_R(0.0) || T2t < T_R(0.0) ) {
lmdD = T_R(0.0);
}
else {
lmdD = T_R(1.0)/std::sqrt( n1*q1*q1/(T1t*PhysConst::ep0) +
n2*q2*q2/(T2t*PhysConst::ep0) );
}
T_R rmin = std::pow( T_R(4.0) * MathConst::pi / T_R(3.0) *
amrex::max(n1,n2), T_R(-1.0/3.0) );
lmdD = amrex::max(lmdD, rmin);
Expand Down