Bug fixes.
This commit is contained in:
@@ -24,6 +24,33 @@ blitz::TinyVector<double,3> Katrin::getElField(blitz::TinyVector<double,3> loc_m
|
||||
}
|
||||
|
||||
double Katrin::getTritiumDensity(blitz::TinyVector<double,3> loc_m) {
|
||||
return(wgtsTritiumDensity_m3);
|
||||
return(wgtsT2Density_m3);
|
||||
}
|
||||
|
||||
Particle Katrin::getT2AverScatPart(blitz::TinyVector<double,3> loc_m, ranlib::Uniform<double> *rngUni, ranlib::NormalUnit<double> *rngNormal) {
|
||||
blitz::TinyVector<double,3> speed_ms;
|
||||
// Get Linear Flow
|
||||
double sign = (loc_m[2] < wgtsLength_m/2.) ? -1 : 1;
|
||||
double flow_ms = sign*wgtsT2FlowSpeed_ms;
|
||||
speed_ms = 0,0,flow_ms;
|
||||
Particle ScatPart;
|
||||
ScatPart = Particle(mT2_eV, ZT2, speed_ms);
|
||||
ScatPart.setLoc_m(loc_m);
|
||||
return (ScatPart);
|
||||
}
|
||||
|
||||
Particle Katrin::getT2ScatPart(blitz::TinyVector<double,3> loc_m, ranlib::Uniform<double> *rngUni, ranlib::NormalUnit<double> *rngNormal) {
|
||||
Particle ScatPart = getT2AverScatPart(loc_m, rngUni, rngNormal);
|
||||
blitz::TinyVector<double,3> speed_ms, flowOffset_ms, tempOffset_ms;
|
||||
// Get Linear Flow
|
||||
flowOffset_ms = ScatPart.getSpeed_ms();
|
||||
|
||||
// Get Temperature Motion
|
||||
double tempOffsetABS_ms = rngNormal->random()*sqrt(kb_eVK*wgtsTemp_K/mT2_eV)*c_ms;
|
||||
tempOffset_ms = getRandDir(rngUni)*tempOffsetABS_ms;
|
||||
|
||||
speed_ms = flowOffset_ms + tempOffset_ms;
|
||||
ScatPart.setSpeed_ms(speed_ms);
|
||||
return (ScatPart);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user