Skip to content

FXC-1530: add total current normalization to UniformCurrentSource#3236

Open
dmarek-flex wants to merge 1 commit intodevelopfrom
dmarek/FXC-1530-current-source-normalization
Open

FXC-1530: add total current normalization to UniformCurrentSource#3236
dmarek-flex wants to merge 1 commit intodevelopfrom
dmarek/FXC-1530-current-source-normalization

Conversation

@dmarek-flex
Copy link
Contributor

@dmarek-flex dmarek-flex commented Feb 4, 2026

Note

Medium Risk
Changes the semantics and default behavior for lumped-port excitations by altering how source amplitudes are interpreted/scaled, which can shift RF simulation normalization results; overall scope is localized to current sources and port generation.

Overview
Adds a new UniformCurrentSource.define_as_total_current flag so source_time can be treated as an integrated total current (auto-scaled by cross-sectional area) rather than a current density, making injected current mesh/geometry-size independent.

Plumbs the new field through the public JSON schemas (Simulation.json, TerminalComponentModeler.json) and updates rectangular lumped S-matrix ports to enable total-current normalization by default when creating their UniformCurrentSource.

Written by Cursor Bugbot for commit 2348ec5. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

Diff Coverage

Diff: origin/develop...HEAD, staged and unstaged changes

  • tidy3d/components/source/current.py (100%)

Summary

  • Total: 1 line
  • Missing: 0 lines
  • Coverage: 100%

@dmarek-flex dmarek-flex force-pushed the dmarek/FXC-1530-current-source-normalization branch from 3a31f35 to 2348ec5 Compare February 5, 2026 00:48
>>> pt_source = UniformCurrentSource(size=(0,0,0), source_time=pulse, polarization='Ex')
"""

define_as_total_current: bool = pydantic.Field(
Copy link
Collaborator

@weiliangjin2021 weiliangjin2021 Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about current_amplitude_definition: Literal["density", "total"] = "density" to read better?

Copy link
Collaborator

@weiliangjin2021 weiliangjin2021 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small comment on naming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants