void SetUpMathExpressions() { if (BandGap != null) { BandGap.CustomConstructor = Energy.FromElectronVolts; if (Temperature != null) { BandGap.SetVariable("T", Temperature.Kelvin); } } if (IntrinsicCarrierConcentration != null) { IntrinsicCarrierConcentration.CustomConstructor = Concentration.FromPerCubicCentimeter; if (Temperature != null) { IntrinsicCarrierConcentration.SetVariable("T", Temperature.Kelvin); } } if (DopantConcentration != null) { DopantConcentration.CustomConstructor = Concentration.FromPerCubicCentimeter; } }