Problem with material pressure and capture cross section

Hi!

I am running a simulation in which I send 10 000 neutrons to a detector filled with nitrogen. @ 4 Bar we should expect to get about 30 interactions per 10 000 neutrons. However, I get about 5. There are several perculiar things about this, first of all, changing the pressure in my volume does not lead to a change in more or less interactions, even when the pressure is at 0 bar. Second is that when my particlegun is randomized along the surface we get 5 interactions per 10000 neutrons, but if I fix it to the middle of the volume I only get 1.

Printing out my pressure in the BeginOfEvent reveals another thing, that the pressure is not at all what I set it to, but actually some sort of multiple of the number 6241.52. If I set the pressure to 0 pascal in my material then GetPressure() returns 0, if I set the pressure to 1 pascal then GetPressure() returns 6245.52 and so on.

My material
auto my_N = new G4Material(“Nitrogen”, z_nbr=7., a=28.01g/mole,density=1.19kg/m3 ,
kStateGas, 273*kelvin, 400000.*pascal);

For the 10 000 runs I use this macrofile

/run/initialize

/control/verbose 0
/run/verbose 0
/event/verbose 0
/tracking/verbose 0

/gun/particle neutron
/gun/energy 0.025 eV

/run/beamOn 10000

//A

This should be an easy fix. You need to divide out the units when you’re printing:

``````G4cout << my_N->GetPressure()/pascal << " Pa" << G4endl;
``````

The material density changes with pressure, which you need to include in your material definition (Geant4 won’t do it for you). At STP (101 kPa) nitrogen has a density of 1.25 g/L (kg/m3), but at 400 kPa that density should be more like 5 g/L, right?

Thank you for a quick response. Yes, the pressure was actually correct. I did not know that, so thank you for pointing it out. I have now corrected it. There is still however a discrepancy between the theoretical value and what I get out. I looked at the verbose output from my simulation and found this

@@@ G4ParticleHPInelastic instantiated for particle neutron data directory variable is G4NEUTRONHPDATA pointing to …/install/share/Geant4/data/G4NDL4.7/Inelastic
@@@ G4ParticleHPInelasticData instantiated for particle neutron data directory variable is G4NEUTRONHPDATA pointing to …/install/share/Geant4/data/G4NDL4.7
NeutronHP: /Capture file for Z = 6, A = 12 is not found and NeutronHP will use …/install/share/Geant4/data/G4NDL4.7/Inelastic/CrossSection/6_nat_Carbon
NeutronHP: /Elastic file for Z = 6, A = 12 is not found and NeutronHP will use …/install/share/Geant4/data/G4NDL4.7/Inelastic/CrossSection/6_nat_Carbon
NeutronHP: /Inelastic file for Z = 6, A = 12 is not found and NeutronHP will use …/install/share/Geant4/data/G4NDL4.7/Inelastic/CrossSection/6_nat_Carbon
NeutronHP: /Capture file for Z = 6, A = 12 is not found and NeutronHP will use …/install/share/Geant4/data/G4NDL4.7/Inelastic/CrossSection/6_nat_Carbon
NeutronHP: /Elastic file for Z = 6, A = 12 is not found and NeutronHP will use …/install/share/Geant4/data/G4NDL4.7/Inelastic/CrossSection/6_nat_Carbon
NeutronHP: /Inelastic file for Z = 6, A = 12 is not found and NeutronHP will use …/install/share/Geant4/data/G4NDL4.7/Inelastic/CrossSection/6_nat_Carbon

Am I correct in believing that it can not find the cross section for Nitrogen and uses Carbon instead?

No. It can’t find a separate capture file for pure C-12 (Z=6, A=12), so it uses the measured data file for natural carbon (i.e., including 1% C-13) instead.