1
0
Fork 0
mirror of https://github.com/gwm17/catima.git synced 2024-11-23 02:38:51 -05:00
catima/reactions.cpp

34 lines
946 B
C++
Raw Normal View History

2018-04-29 18:16:45 -04:00
#include "catima/reactions.h"
#ifdef NUREX
2018-05-02 19:23:47 -04:00
#include "catima/catima.h"
#include "catima/abundance_database.h"
2018-04-29 18:16:45 -04:00
#include <cmath>
2018-05-02 19:23:47 -04:00
#include <iostream>
2018-04-29 18:16:45 -04:00
namespace catima{
2018-05-02 19:23:47 -04:00
double reaction_rate1(Projectile &projectile, const Material &target, const Config &c){
2018-04-29 18:16:45 -04:00
int num_elements = target.ncomponents();
int ap = lround(projectile.A);
int zp = lround(projectile.Z);
2018-05-02 19:23:47 -04:00
nurex::Nucleus nurex_projectile = nurex::get_default_nucleus(ap,zp);
2018-04-29 18:16:45 -04:00
2018-05-02 19:23:47 -04:00
int zt = target.get_element(0).Z;
2018-04-29 18:16:45 -04:00
int at = abundance::get_isotope_a(zt,0);
2018-05-02 19:23:47 -04:00
nurex::Nucleus nurex_target = nurex::get_default_nucleus(at,zt);
double eout = energy_out(projectile,projectile.T, target,c);
std::cout<<eout<<"\n";
2018-04-29 18:16:45 -04:00
nurex::GlauberModelOLA_ZeroRange gm(nurex_projectile, nurex_target);
double cs = nurex::SigmaR(gm, projectile.T);
2018-05-02 19:23:47 -04:00
double rr = reaction_rate(cs,target.number_density_cm2(0));
std::cout<<rr<<"\n";
2018-04-29 18:16:45 -04:00
return 1.0;
}
}
#endif