Cannot identify nickel correctly

Issue #236 resolved
Laurie Nevay created an issue

Collimator made of "Nickel" or "Ni" complains no such material "ni" despite being in --materials print out.

Comments (13)

  1. Jochem Snuverink

    I have added Nickel as:

    AddMaterial(name="nickel"        , density=  8.908, kStateSolid, NTP_Temperature, 1, {"Ni"}, singleElement
    
  2. Laurie Nevay reporter

    Thanks for this.

    What I didn't realise was that we only have a subset of elements available. From

    bdsim --materials
    

    We see that a lot of elements are listed. I think it would be better (and simpler in code) if we say that any element by it's 1 or 2 letter name can be constructed. We can search a list of names for validity and ultimately use the G4 NIST material - such as G4_Cu when the user uses "Cu". We could also automatically create a map of the full name of the element to the material.

    I feel this might be a good development to generalise and standardise the materials of elements without us having to manually create all these Geant4 material instances. What do you think @jsnuverink?

    This would also improve the print out for --materials making it clearer to the user.

  3. Jochem Snuverink

    discussed with @nevay, and we decided to:

    1. remove all elements in favour of G4 ones
    2. remove explicit single element materials in favour of G4 ones, and create map for naming.
    3. whenever an element or material with 1 or 2 characters is asked for, add G4_ to its name.
  4. Laurie Nevay reporter

    I agree this is unnecessary for general atoms, however, this may be useful for isotopes, so I think we should keep the atom syntax.

    That being said, when we search for the material components, would the proposed changes allow the finding of simple atoms? Ie if we made a material of Ni and Cu, could we just use "Cu" and "Ni".

  5. Jochem Snuverink

    Aha, yes atoms could be used for that, but it is not the recommended way to build isotopes from what I could find (e.g. http://geant4.slac.stanford.edu/JLAB2012/Materials.pdf). Not sure what the disadvantage would be, but I will keep the current behaviour.

    Yes, you can use the same syntax as before. Elements with the general abundance are available via NIST, e.g.

    NbTi : matdef, density=5.6, T=4.0, components=["Nb","Ti"], componentsWeights={1,1};
    
  6. Jochem Snuverink

    The current behaviour does not generate isotopes as might have been expected (by the way we don't have a single bdsim test that uses the atom syntax):

    niobium :  atom, symbol="myNb", Z=41, A=92.906;
    titanium : atom, symbol="myTi", Z=22, A=47;
    myNbTi : matdef, density=5.6, T=4.0, components=["myNb","myTi"], componentsWeights={1,1};
    

    gives

    443:  Material: mynbti      density: 5.600  g/cm3   RadL: 2.027   cm   Nucl.Int.Length: 26.073  cm 
    443:   Imean:                      340.301 eV 
    443: 
    443:    --->  Element: niobium (myNb)   Z = 41.0   N = 93      A = 92.906 g/mole
    443:          --->  Isotope: myNb93   Z = 41   N = 93    A = 92.91  g/mole   abundance: 100.000 %
    443:           ElmMassFraction: 66.41  %  ElmAbundance 50.00  % 
    443: 
    443:    --->  Element: titanium (myTi)   Z = 22.0   N = 47      A = 47.000 g/mole
    443:          --->  Isotope: myTi46   Z = 22   N = 46    A = 45.95  g/mole   abundance: 8.250  %
    443:          --->  Isotope: myTi47   Z = 22   N = 47    A = 46.95  g/mole   abundance: 7.440  %
    443:          --->  Isotope: myTi48   Z = 22   N = 48    A = 47.95  g/mole   abundance: 73.720 %
    443:          --->  Isotope: myTi49   Z = 22   N = 49    A = 48.95  g/mole   abundance: 5.410  %
    443:          --->  Isotope: myTi50   Z = 22   N = 50    A = 49.94  g/mole   abundance: 5.180  %
    443:           ElmMassFraction: 33.59  %  ElmAbundance 50.00  % 
    
  7. Jochem Snuverink

    We can open a new issue for the isotope generation. This would probably need a new parser element isotope

  8. Log in to comment