Allow multiple lumped ports on the same boundary attribute (for co- and cross-polar analysis)
- Dominant language
- C++
- Stars
- 562
- Forks
- 121
- Avg merge
- 5d 3h
- Merged PRs (30d)
- 26
Description
## 🪪 Title
**Allow multiple lumped ports on the same boundary attribute (for co- and cross-polar analysis)**
---
## 📝 Description
Currently, **Palace** does not allow assigning more than one *LumpedPort* to the same boundary attribute.
This limitation triggers the following verification error:
~~~text
Verification failed: (!data.active || !port_marker[attr - 1]) is false:
--> Boundary attribute is assigned to more than one lumped port!
... in function: void palace::LumpedPortOperator::SetUpBoundaryProperties(const palace::IoData&, const palace::MaterialOperator&, const mfem::ParMesh&)
... in file: /tmp/krono/spack-stage/spack-stage-palace-develop-uv64y6xpn4v5w6kqisdxkgm7pzwxjeot/spack-src/palace/models/lumpedportoperator.cpp:343
~~~
This behavior prevents users from modeling configurations where **two ports share the same physical surface** but differ in excitation direction — for instance, when evaluating **co-polar and cross-polar reflected components** (only one port would be excited at a time).
---
## 🧩 Minimal JSON Example
~~~json
{
"Boundaries": {
"LumpedPort": [
{
"Index": 1,
"Attributes": [7],
"Direction": [0.0, 1.0, 0.0],
"Excitation": true,
"R": 50
},
{
"Index": 2,
"Attributes": [7],
"Direction": [-0.7071, 0.0, 0.7071],
"Excitation": false,
"R": 50
}
]
}
}
~~~
---
## ⚙️ Expected Behavior
It should be possible to define multiple *LumpedPort* objects on the same boundary attribute, provided that:
- only one is active (`"Excitation": true`), or
- all are passive (for reciprocity or scattering analysis).
This would allow users to:
- define co- and cross-polar ports on the same surface,
- avoid duplicating geometry or mesh elements just to represent different port directions.
---
## 💡 Proposed Enhancement
- Allow multiple lumped ports to share a boundary attribute if only one is active.
- Relax validation so it only fails when **multiple excited** ports are assigned to the same attribute.
- Optionally, support a compound port definition for **multi-polarization** setups.
---
## 🧪 Steps to Reproduce
1. Define two lumped ports using the same attribute in the JSON input.
2. Run `palace -i example.json`.
3. The verification step fails with the error above.
---
## 🖇️ Environment
- **Palace version:** `develop` branch
- **OS:** Linux (Spack environment)
- **Problem type:** Driven (Lumped Port)
---
## 🙏 Suggested Priority
**Medium** — this improvement would simplify polarization and scattering studies without geometry duplication.
Contributor guide
Research direction
Start in models/lumpedportoperator.cpp at LumpedPortOperator::SetUpBoundaryProperties and reproduce the failure with the minimal JSON input using palace -i example.json. Trace the boundary-attribute validation and define behavior for one active or all passive ports; done means the example passes while multiple excited ports on one attribute are still rejected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100