GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — adding a constant to convert between power units · walshjon/pyne@10ffe0d

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • pyne
    • cpp_data.pxd
    • data.pyx
  • src
    • data.cpp
    • data.h
    • material.cpp
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎pyne/cpp_data.pxd‎

Copy file name to clipboardExpand all lines: pyne/cpp_data.pxd
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ cdef extern from "data.h" namespace "pyne":
1616
double cm2_per_barn
1717
double sec_per_day
1818
double MeV_per_K
19+
double MeV_per_MW_s
1920

2021
# hash map and initialization function
2122
map[std_string, std_string] data_checksums
Collapse file

‎pyne/data.pyx‎

Copy file name to clipboardExpand all lines: pyne/data.pyx
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ sec_per_day = cpp_data.sec_per_day
5555
MeV_per_K = cpp_data.MeV_per_K
5656
"""Megaelectronvolts per Kelvin."""
5757

58+
MeV_per_MW_s = cpp_data.MeV_per_MW_s
59+
"""Megaelectronvolts per megawatt-second."""
5860

5961
#
6062
# hash map and initialization
Collapse file

‎src/data.cpp‎

Copy file name to clipboardExpand all lines: src/data.cpp
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const double pyne::barns_per_cm2 = 1e24;
1313
const double pyne::cm2_per_barn = 1e-24;
1414
const double pyne::sec_per_day = 24.0 * 3600.0;
1515
const double pyne::MeV_per_K = 8.617343e-11;
16+
const double pyne::MeV_per_MW_s = 1.60217657e-19;
1617

1718
/********************************/
1819
/*** data_checksums Functions ***/
Collapse file

‎src/data.h‎

Copy file name to clipboardExpand all lines: src/data.h
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ namespace pyne
3838
extern const double cm2_per_barn; ///< cm^2 per barn
3939
extern const double sec_per_day; ///< seconds per day
4040
extern const double MeV_per_K; ///< MeV per Kelvin
41+
extern const double MeV_per_MW_s; ///< MeV/s per MW
4142
/// \}
4243

4344
extern std::string NUC_DATA_PATH; ///< Path to the nuc_data.h5 file.
Collapse file

‎src/material.cpp‎

Copy file name to clipboardExpand all lines: src/material.cpp
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,10 +1097,8 @@ pyne::comp_map pyne::Material::decay_heat() {
10971097
using pyne::q_val;
10981098
pyne::comp_map dh;
10991099
double masspermole = mass * pyne::N_A;
1100-
// converts MeV/s to MW
1101-
double qconv = 1.602e-19;
11021100
for (pyne::comp_iter i = comp.begin(); i != comp.end(); ++i) {
1103-
dh[i->first] = qconv * masspermole * (i->second) * \
1101+
dh[i->first] = pyne::MeV_per_MW_s * masspermole * (i->second) * \
11041102
decay_const(i->first) * q_val(i->first) / \
11051103
atomic_mass(i->first);
11061104
}

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.