Repository navigation
Conversation
…objective Thermoelastic2D and Thermoelastic3D reported the volume-fraction error as a third objective. It is a feasibility check, so it now lives in the constraint API, as it does in Beams2D and HeatConduction. - Drop the volume error from objectives, simulate() and every OptiStep. - Add volume_fraction_bound (warning, tolerance 0.01) to Thermoelastic2D, Thermoelastic3D and Beams3D, copied from Beams2D. - Rename the Thermoelastic2D condition volume_fraction_target to volfrac, the name the other volume-constrained problems use. - Point at thermoelastic_2d_v2 and thermoelastic_3d_v1. These are clerical copies of the current datasets with the volume columns renamed or dropped. - Remove the unused volume error from the Beams3D solver. BREAKING CHANGE: simulate() returns two values for the thermoelastic problems, and the Thermoelastic2D condition is now volfrac. Refs #256 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mkeeler43
marked this pull request as ready for review
September 30, 2026 09:16
This was referenced Sep 30, 2026
This branch has not been deployed
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.
Implements the follow-up agreed in the 22.07 discussion on #256.
Why
The thermoelastic problems reported the volume-fraction error as a third objective. It is not something to minimize. It is a feasibility check. Beams2D and HeatConduction already handle it through the constraint API, and this PR brings Thermoelastic2D and Thermoelastic3D in line.
The two problems also disagreed with each other. Thermoelastic2D called the target
volume_fraction_target, while every other volume-constrained problem calls itvolfrac. Thermoelastic3D stored the actual volume fraction in its dataset column but returned the error fromsimulate()under the same name.What changes
objectives, from thesimulate()output and from eachOptiStep.volume_fraction_bound, copied from Beams2D. It raises a warning when the design's mean density misses the target by more than 0.01.volfrac.thermoelastic_2d_v2andthermoelastic_3d_v1. These are clerical copies of the current datasets. Nothing is recomputed. Thermoelastic2D renames one column and dropsvolume_fraction_error. Thermoelastic3D dropsvolume_fraction.Versioning
The meeting decided not to bump versions. I changed that after checking how datasets load. Renaming a condition column in place would break every released EngiBench, because datasets load at their latest revision. So this PR uses new dataset repos and keeps the problem version at 0. This follows the Thermoelastic2D precedent, where problem v0 already points at dataset v1.
Breaking
simulate()returns two values instead of three for both thermoelastic problems.OptiStep.obj_valueshas two entries instead of three.volume_fraction_targetmust passvolfrac.Checks
Every stored design in both thermoelastic datasets meets its target. The worst miss is 8e-5, so the new warning does not fire on dataset designs. The Beams3D test and validation splits were checked the same way, with a worst miss of 5e-5.
The two
simulatereference files keep their first two values unchanged. The code that computes them did not change.Pre-commit passes. The constraint, problem, Beams3D and Thermoelastic3D unit tests pass: 29 passed, 12 deselected. The deselected tests run the solver or load datasets.
Blocked on
The two new dataset repos do not exist yet. The dataset tests and the full
test_python_problem_implrun will fail until they are pushed. The relabel job is written and verifies every kept column against the pinned source before uploading.🤖 Generated with Claude Code