Skip to content

Commit b019ff3

Browse files
Jose Ramos MendezJose Ramos Mendez
Jose Ramos Mendez
authored and
Jose Ramos Mendez
committed
Incorporating WG changes commit ee44f34, 577cbdd of dev branch
modified: processes/TsIRT.cc modified: processes/TsIRTConfiguration.cc
1 parent 5d16656 commit b019ff3

File tree

2 files changed

+17
-41
lines changed

2 files changed

+17
-41
lines changed

processes/TsIRT.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ void TsIRT::contactReactions(G4int i,std::unordered_map<G4int, G4bool> used) {
444444
if ( -1 < indexOfReaction ) {
445445
TsIRTConfiguration::TsMolecularReaction binReaction = fReactionConf->GetReaction(indexOfReaction);
446446
if (binReaction.index < 0) {continue;}
447-
G4double r = binReaction.effectiveReactionRadius;
447+
G4double r = binReaction.reactionRadius;
448448

449449
G4double p = binReaction.probabilityOfReaction;
450450
G4double timeJ = fChemicalSpecies[j].time;

processes/TsIRTConfiguration.cc

Lines changed: 16 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,6 @@ void TsIRTConfiguration::ResolveRemainerReactionParameters() {
840840
G4double kact = activationReactionRate/fPm->GetUnitValue("/M/s");
841841
G4double r = reactionRadius/nm;
842842
G4double reff = effectiveReactionRadius/nm;
843-
// G4double v = 0.93*kact/(4 * CLHEP::pi * std::pow(reff,2)*6.022140857e-1);
844843
G4double v = kact * exp(rc/r) / (4 * CLHEP::pi * std::pow(r,2) * 6.022140857e-1);
845844

846845
sumDiffCoeff /= nm*nm/s;
@@ -890,18 +889,20 @@ void TsIRTConfiguration::CalculateContactProbabilities() {
890889
} else if ( reactionType == 2 || reactionType == 4 ){
891890
G4double Rs = 0.29 * nm;
892891
G4double diffusionReactionRate = fReactions[i].kdif;
893-
G4double activationReactionRate = fReactions[i].kact;
892+
G4double observedReactionRate = fReactions[i].kobs;
894893
G4double rc = GetOnsagerRadius(molA, molB);
895894

896-
G4double effectiveReactionRadius = -rc / (1-exp(rc /
897-
(fMoleculesDefinition[molA].radius + fMoleculesDefinition[molB].radius)));
898-
899-
if ( reactionType == 2 )
900-
probability = Rs / (Rs + (diffusionReactionRate / activationReactionRate) *
901-
((fMoleculesDefinition[molA].radius + fMoleculesDefinition[molB].radius) + Rs));
902-
else
903-
probability = Rs / (Rs + (diffusionReactionRate / activationReactionRate) * (effectiveReactionRadius + Rs));
904-
895+
G4double sigmaEff = fMoleculesDefinition[molA].radius + fMoleculesDefinition[molB].radius;
896+
G4double sigmaEffRs = fMoleculesDefinition[molA].radius + fMoleculesDefinition[molB].radius + Rs;
897+
898+
if(reactionType == 4){
899+
sigmaEff = -rc / (1-exp(rc /sigmaEff));
900+
sigmaEffRs = -rc / (1-exp(rc /sigmaEffRs));
901+
}
902+
903+
probability = observedReactionRate / diffusionReactionRate * ((1 - (sigmaEff/sigmaEffRs))
904+
/(1 - observedReactionRate / diffusionReactionRate * sigmaEff/sigmaEffRs));
905+
905906
} else {
906907
continue;
907908
}
@@ -1868,32 +1869,6 @@ G4double TsIRTConfiguration::SampleIRTPartiallyDiffusionControlled(TsMolecule mo
18681869
}
18691870

18701871
return -1;
1871-
/*
1872-
G4double r0 = (molA.position-molB.position).mag();
1873-
1874-
G4double irt, prob = 0.0;
1875-
if ( fReactions[indexOfReaction].reactionType == 2 ) {
1876-
// From paper Plante 2017, Considerations for ...
1877-
G4double alpha = -(fReactions[indexOfReaction]).alpha;
1878-
G4double sigma = (fReactions[indexOfReaction]).effectiveReactionRadius;
1879-
G4double D = fMoleculesDefinition[molA.id].diffusionCoefficient + fMoleculesDefinition[molB.id].diffusionCoefficient;
1880-
irt = fUtils->SampleTypeII(alpha, sigma, r0, D);
1881-
1882-
} else {
1883-
G4double rc = (fReactions[indexOfReaction]).OnsagerRadius;
1884-
G4double reff = -rc/(1 - std::exp(rc/r0));
1885-
G4double sigmaEffEff = (fReactions[indexOfReaction]).effectiveTildeReactionRadius;
1886-
1887-
G4double Winf = sigmaEffEff/reff;
1888-
G4double W = G4UniformRand();
1889-
if ( W < Winf ) {
1890-
irt = brents_fun(molA, molB, indexOfReaction, -W);
1891-
prob = W;
1892-
} else {
1893-
irt = -1.0*ps;
1894-
}
1895-
}
1896-
return irt;*/
18971872
}
18981873

18991874

@@ -1934,15 +1909,16 @@ G4int TsIRTConfiguration::ContactFirstOrderAndBackgroundReactions(TsMolecule mo
19341909
//Pimblott S M, 1991 Stochastic models of spur kinetics in water. International Journal of Radiation Applications and Instrumentation. Part 37 377–88
19351910
for ( size_t v = 0; v < sizeIndex; v++ ) {
19361911
size_t u = index[v];
1937-
G4double R = fMoleculesDefinition[pdgA].radius;
1912+
G4double R = fMoleculesDefinition[pdgA].radius/nm;
19381913
G4double R3 = R*R*R;
19391914
G4double Cs = fReactions[u].concentration/fPm->GetUnitValue("M");
19401915
if (Cs > 50) {continue;} // No Contact Reactions with water molecules
1941-
Cs /= 6.022140857e-1*(nm*nm*nm); // nm3 to M multiply by 10^-24 Nav = 6.02214076×10^23x10^-24 = 0.602214076
1916+
Cs *= 6.022140857e-1; // nm3 to M multiply by 10^-24 Nav = 6.02214076×10^23x10^-24 = 0.602214076
19421917
G4double prob1 = std::exp(-1.33333333*CLHEP::pi*R3*Cs);
1918+
19431919
if ( G4UniformRand() < 1. - prob1 ) {
19441920
return (int)u;
1945-
}
1921+
}
19461922
}
19471923

19481924
return -1;

0 commit comments

Comments
 (0)