fix(thermal): correct semicon κ, add temp-dependent σ, fix RMS→peak current scaling#34
Merged
amaurigmartins merged 3 commits intoElecta-Git:dev/thermalfrom Mar 20, 2026
Conversation
…IEC 60287) from 148 W/(m·K) which was incorrect. Updated in materials library and all test files. Also added earth-air interface as physical group for thermal Dirichlet BC in space.jl.
…d register earth-air interface for thermal Dirichlet BC
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev/thermal #34 +/- ##
=============================================
Coverage ? 0.47%
=============================================
Files ? 100
Lines ? 7935
Branches ? 0
=============================================
Hits ? 38
Misses ? 7897
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes three interconnected bugs in the magneto-thermal FEM formulation that together were producing incorrect steady-state temperature and loss results.
Bug fixes
Semicon thermal conductivity:
semicon1/semicon2had κ = 148 W/(m·K) (silicon's value), corrected to 0.4 W/(m·K) per IEC 60287. Updated materials library and all test fixtures.RMS → peak current conversion: GetDP's frequency-domain formulation uses peak amplitudes (A(t) = Re[·exp(jωt)]), so time-averaged Joule losses are P = ½σ|E|². User-supplied RMS currents are now scaled by √2 before being passed to the
Current_2Dconstraint, ensuring losses match I_rms²·R.Temperature-dependent conductivity σ(T):
DefineMaterialPropsnow accepts atemp_dependent_sigmaflag. When enabled (MagnetoThermal path), σ is emitted as the GetDP expressionσ₀ / (1 + α·(T − T₀))evaluated at the local temperature field, enabling true electro-thermal coupling.Improvements
Earth-air Dirichlet BC: The earth-air interface is now registered as a physical group in
space.jland added toSur_Dirichlet_The, correctly fixing ambient temperature at the top soil boundary instead of leaving it unconstrained.Picard iteration for Mag↔The coupling: The MagnetoThermal resolution now uses a 10-step Picard loop (Mag → The → repeat), preceded by a zero-source thermal solve to initialize T = T_ambient everywhere and avoid σ(0 K) singularities.