How do I specify the number of elements in the material used to create geometry?

Dear all,

I created the geometry of an LED and I know it’s made of epoxy resin which has the chemical formula C21H25ClO5, but I don’t know how to specify each component as a percentage. Does anyone have a way to determine the percentage of each of these elements as a percentage (Or is there another way that doesn’t require a percentage?)?
(Similar to how I made Aerogel as attached below)

Regards,
Coach

   G4NistManager *nist = G4NistManager::Instance();

   SiO2 = new G4Material("SiO2", 2.201*g/cm3, 2);
   SiO2->AddElement(nist->FindOrBuildElement("Si"),1);
   SiO2->AddElement(nist->FindOrBuildElement("O"),2);

   H2O = new G4Material("H2O", 1.000*g/cm3, 2);
   H2O->AddElement(nist->FindOrBuildElement("H"),2);
   H2O->AddElement(nist->FindOrBuildElement("O"),1);
    
   C = nist->FindOrBuildElement("C");
    
   Aerogel = new G4Material("Aerogel", 0.200*g/cm3, 3);
   Aerogel->AddMaterial(SiO2, 62.5*perCent);
   Aerogel->AddMaterial(H2O, 37.4*perCent);
   Aerogel->AddElement(C, 0.1*perCent);

This is my LED

Why don’t you just make the G4Material using the number of atoms, the same way you made the H20 and SiO2? If

If you want weight percent of that chemical formula, that is not a Geant4 specific question but more of a chemistry 101 question.

But also, it probably doesn’t matter too much. If you are concerned about how the photons scatter/refract out of the LED and don’t think they will be generated isotropically, the only part that really matters for optical processes is your absorption length and index of refraction, as well as any surfaces you create. Those are properties that you define and are independent of the elemental make up of your material.

1 Like

Thanks a lot for your information. I’m thinking of doing the same for SiO2 and H20.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.