Skip to content

Is getCurrentForSystem applying the band fraction twice? #84

@jessegreenberg

Description

@jessegreenberg

Noticed during https://github.com/phetsims/totality/pull/161, but I think this has always been present (in the java too?)

At positive or 0 V, all emitted electrons should reach the collector, right? But doesn't this effectively compute photons * bandFraction * bandFraction?

const electronRateAsFractionOfPhotonRate = Math.min(
  photonEnergyBeyondWorkFunction / bandWidth,
  1
);
const electronsPerSecondFromTarget = electronRateAsFractionOfPhotonRate * photonsPerSecond;

Then the band fraction is applied again here:

const fractionMoreEnergeticThanRetardingVoltage = Math.max(
  0,
  Math.min( ( photonEnergyBeyondWorkFunction - retardingVoltage ) /
            bandWidth, 1 )
);

const electronsPerSecondToAnode = electronsPerSecondFromTarget * fractionMoreEnergeticThanRetardingVoltage;

Full code at https://github.com/phetsims/totality/blob/main/photoelectric-effect/js/common/model/PhotoelectricEffectModel.ts#L375.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions