public override Material WithThickness(Length thickness) { var dielectric = new Dielectric { DielectricConstant = DielectricConstant, BandGap = BandGap, ElectronAffinity = ElectronAffinity, HoleEffectiveMass = HoleEffectiveMass, ElectronEffectiveMass = ElectronEffectiveMass }; InitClone(dielectric, thickness); dielectric.Prepare(); return(dielectric); }
private static List <MaterialParameterViewModel> GetDielectricParameterSection(Dielectric material) { var dielectricSection = new List <MaterialParameterViewModel>(); var bandGapField = new NumericMaterialParameterViewModel(ParameterType.BandGap) { Minimum = 0, Maximum = 10, StepSize = 0.1, Value = material.BandGap?.ElectronVolts ?? 0.0 }; bandGapField.PropertyChanged += (sender, e) => { if (e.PropertyName != "Value") { return; } material.BandGap = Energy.FromElectronVolts(bandGapField.Value); }; var eaField = new NumericMaterialParameterViewModel(ParameterType.ElectronAffinity) { Minimum = 0, Maximum = 5, StepSize = 0.05, Value = material.ElectronAffinity?.ElectronVolts ?? 0.0 }; eaField.PropertyChanged += (sender, e) => { if (e.PropertyName != "Value") { return; } material.ElectronAffinity = Energy.FromElectronVolts(eaField.Value); }; var dcField = new NumericMaterialParameterViewModel(ParameterType.DielectricConstant) { Minimum = .1, Maximum = 30, StepSize = 1, Value = material.DielectricConstant }; dcField.PropertyChanged += (sender, e) => { if (e.PropertyName != "Value") { return; } material.DielectricConstant = dcField.Value; }; dielectricSection.Add(GetThicknessSection(material)); dielectricSection.Add(bandGapField); dielectricSection.Add(eaField); dielectricSection.Add(dcField); return(dielectricSection); }