Message: Re: Inconsistent mass and density of volume. Not Logged In (login)

## Re: Inconsistent mass and density of volume.

Forum: Geometry
Re: Inconsistent mass and density of volume. (Joel Klinger)
Date: 08 May, 2014
From: Michael H. Kelsey <Michael H. Kelsey>

 On Thu, 08 May 2014 20:38:24 GMT, Joel Klinger wrote: ```> [...] > I would like to check that the LiquidArgon volume has an associated mass > of 20kT. I set the density of LiqArgon like this (1.39 g/cm^3): > > G4Material* LiqArgon = new G4Material("LiqArgon", z=18., a=39.948*g/mole, > density=1.3928*g/cm3, kStateLiquid, temperature=87.25*kelvin, > pressure=1.0*atmosphere); > > I set the Liquid Argon volume like this: > > //---- Place LAr target G4ThreeVector positionTarget = > G4ThreeVector(0,0,0); G4double targetInnerRad = 0.0; G4double > targetOuterRad = 15*m; G4double targetHalfLength = 10*m; G4double > targetMinAngle = 0.*deg; G4double targetAngularExtent = 360.*deg; > G4String targetName = "target"; > > solidVolume = new G4Tubs(targetName, targetInnerRad, targetOuterRad, > targetHalfLength,targetMinAngle,targetAngularExtent); > > If I calculate this volume manually I get 1.41372e+13 mm^3, and if I > call solidVolume->GetCubicVolume() I also get 1.41372e+13 mm^3, so this > is good. Furthermore (1.39 g/cm^3)*(.41372e+13 mm^3) = 20kT - which is > great. > > From now on I run into trouble. If I do > logicVolume->GetMaterial()->GetDensity() I get "8.69317e+18", which > looks wrong in any system of units. ``` You shouldn't make assumptions about Geant4's internal units. They are extremely non-intuitive :-/ Mass is MeV (= 1.), for example; kg = joule*s*s/(m*m), where joule = eV/e_SI, and e_SI=1.602e-19. So g/cm3 = 6.24e+18, which gives a density for LAr of 1.39*6.24e+18 = 8.66e+18 (accounting for my own rounding off). Could you please try the following? ``` G4cout << "LAr density from volume " << logicVolume->GetMaterial()->GetDensity() / (g/cm3) << " g/cm3" << G4endl;``` and similarly ` G4cout << "LAr mass " << logicVolume->GetMass()/kg << " kg" << G4endl;` I think you'll get the results you expect. ``` -- Michael Kelsey ```

1 Re: Inconsistent mass and density of volume.   (Joel Klinger - 09 May, 2014)
 to: "Re: Inconsistent mass and density of volume."
This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]