2022-05-09 00:31:02 +08:00
|
|
|
|
#include "Material.h"
|
|
|
|
|
|
|
|
|
|
#include "G4Element.hh"
|
|
|
|
|
#include "G4NistManager.hh"
|
|
|
|
|
#include "G4PhysicalConstants.hh"
|
|
|
|
|
#include "G4SystemOfUnits.hh"
|
|
|
|
|
|
|
|
|
|
void DefineMaterials() {
|
2022-05-09 17:26:35 +08:00
|
|
|
|
G4double a, z; // 摩尔质量, 原子序数
|
|
|
|
|
G4int ncomponents, fractionmass, natoms; // 组分数, 质量分数, 原子数
|
2022-05-09 00:31:02 +08:00
|
|
|
|
G4double density, pressure, temperature;
|
|
|
|
|
|
|
|
|
|
G4NistManager* nist = G4NistManager::Instance();
|
|
|
|
|
|
2022-05-09 17:26:35 +08:00
|
|
|
|
// 已有
|
|
|
|
|
nist->FindOrBuildMaterial("G4_AIR");
|
|
|
|
|
nist->FindOrBuildMaterial("G4_Al");
|
|
|
|
|
|
2022-05-09 00:31:02 +08:00
|
|
|
|
// 真空
|
|
|
|
|
density = universe_mean_density;
|
|
|
|
|
pressure = 3.e-18 * pascal;
|
|
|
|
|
temperature = 2.73 * kelvin;
|
|
|
|
|
new G4Material("Vacuum", z = 1., a = 1.01 * g / mole, density, kStateGas, temperature, pressure);
|
|
|
|
|
|
|
|
|
|
// 5系铝合金 0.4 Si + 0.35 Fe + 0.1 Cu + 0.7 Mn + 4.5 Mg + 0.15 Cr + 0.25 Zn + 0.15 Ti + 93.4 Al
|
|
|
|
|
density = 2.68 * g / cm3;
|
2022-05-09 17:26:35 +08:00
|
|
|
|
G4Material* AlAlloyS5 = new G4Material("AluminumAlloySeries5", density, ncomponents = 9);
|
|
|
|
|
AlAlloyS5->AddElement(nist->FindOrBuildElement("Si"), fractionmass = .4 * perCent);
|
|
|
|
|
AlAlloyS5->AddElement(nist->FindOrBuildElement("Fe"), fractionmass = .35 * perCent);
|
|
|
|
|
AlAlloyS5->AddElement(nist->FindOrBuildElement("Cu"), fractionmass = .1 * perCent);
|
|
|
|
|
AlAlloyS5->AddElement(nist->FindOrBuildElement("Mn"), fractionmass = .7 * perCent);
|
|
|
|
|
AlAlloyS5->AddElement(nist->FindOrBuildElement("Mg"), fractionmass = 4.5 * perCent);
|
|
|
|
|
AlAlloyS5->AddElement(nist->FindOrBuildElement("Cr"), fractionmass = .15 * perCent);
|
|
|
|
|
AlAlloyS5->AddElement(nist->FindOrBuildElement("Zn"), fractionmass = .25 * perCent);
|
|
|
|
|
AlAlloyS5->AddElement(nist->FindOrBuildElement("Ti"), fractionmass = .15 * perCent);
|
|
|
|
|
AlAlloyS5->AddElement(nist->FindOrBuildElement("Al"), fractionmass = 93.4 * perCent);
|
|
|
|
|
|
|
|
|
|
// 泰普龙 Taparan
|
|
|
|
|
density = 1.44 * g / cm3;
|
|
|
|
|
G4Material* Taparan = new G4Material("Taparan", density, ncomponents = 4);
|
|
|
|
|
Taparan->AddElement(nist->FindOrBuildElement("C"), natoms = 14);
|
|
|
|
|
Taparan->AddElement(nist->FindOrBuildElement("H"), natoms = 10);
|
|
|
|
|
Taparan->AddElement(nist->FindOrBuildElement("N"), natoms = 2);
|
|
|
|
|
Taparan->AddElement(nist->FindOrBuildElement("O"), natoms = 2);
|
2022-05-09 00:31:02 +08:00
|
|
|
|
|
|
|
|
|
std::cout << *(G4Material::GetMaterialTable()) << std::endl;
|
2022-05-09 17:26:35 +08:00
|
|
|
|
}
|