Initial implementation of chtMultiRegionSimpleFoam, conjugate heat transfer support#265
Draft
kevinsmia1939 wants to merge 11 commits into
Draft
Initial implementation of chtMultiRegionSimpleFoam, conjugate heat transfer support#265kevinsmia1939 wants to merge 11 commits into
kevinsmia1939 wants to merge 11 commits into
Conversation
d8b5fe8 to
1a90271
Compare
Collaborator
|
Thanks for taking this on. One comment you could perhaps consider: My plan for this is to allow multiple mesh objects which would be connected via the non-conformal region-coupled boundaries in a similar way to how the periodic master/slave boundaries are currently implemented. This would be fairly general and not require us to implement a specialised method for each different mesher. |
Two bugs caused user values to be silently discarded: 1. InputField unit property was set to the full quantity string (e.g. "1000 kg/m^3") instead of the unit alone. FreeCAD interpreted the numeric coefficient as a scale factor, so Density and SpecificHeat displayed and stored values scaled by 1000x and 500x respectively. ThermalConductivity happened to work because its default value starts with coefficient 1. 2. populateMaterialsList resets all widgets to the AluminiumSolid defaults. The subsequent restore loop fires manualEdit (via valueChanged) as soon as the first field (ThermalConductivity) changes — at which point the remaining widgets are still at the stale AluminiumSolid values. manualEdit reads all widgets eagerly and overwrites self.material with the wrong Density and SpecificHeat before the restore loop can set them. Wrapping the restore loop in selecting_predefined = True suppresses manualEdit during restore.
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.
Add chtMultiRegionSimpleFoam solver to CfdOF with multi-region CHT support
There are several limitations at the moment.
FreeCAD version 1.1.1 and openfoam2512 was tested.
Open the example I gave, write mesh case, run mesh, write case, and run case should start simulation without issue.
To view your result, open ParaView and add extractor block to see fluid or solid part, see screenshot.
Most of the codes are written with Claude code.
The next steps after this to put CHT in usable state includes,
Test different combinations and conditions
Test different cases with different wall boundary types, cyclic, symmetry, etc.
Add demo
Test with meanflowvelocity
Test different Turbulent model. A case without stability issues. Then add support for different Turbulent model.
Test different meshing.
Add more solid properties.
This PR still need much more testing until it is ready to merge. Will continue to update status.
All test pass except #262 which will need to merge first.
The example shown below is a heat sink with constant temperature on the bottom. Inlet and outlet flow over at 500mm/s.



cht_heatsink_test.FCStd.txt