Skip to content

Functionality for volumetric coupling on quadrature points of a mesh - #146

Merged
MakisH merged 12 commits into
developfrom
volumetric-coupling
Aug 3, 2026
Merged

Functionality for volumetric coupling on quadrature points of a mesh#146
MakisH merged 12 commits into
developfrom
volumetric-coupling

Conversation

@IshaanDesai

@IshaanDesai IshaanDesai commented Sep 29, 2025

Copy link
Copy Markdown
Member

This PR adds preliminary functionality to extract integration points from a provided mesh and use them as coupling vertices. The functionality is extracted from #135 because it is deemed to be sufficient as a standalone feature. Integration points of a mesh having C3D8 (Hex) or C3D4 (Tet) elements can be extracted.

@IshaanDesai

Copy link
Copy Markdown
Member Author

The tutorial cases to be added via precice/tutorials#653 tests this functionality.

@IshaanDesai
IshaanDesai requested a review from MakisH September 29, 2025 19:23

@MakisH MakisH left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Some first comments, I have not yet checked if it works with the given tutorial.

If #135 is needed for precice/tutorials#653, how can precice/tutorials#653 be a test case for this reduced version? How would the behavior change?

How easy would it be to implement another, simpler tutorial, such as https://precice.org/tutorials-volume-coupled-diffusion.html?

Comment thread getc3d4elementgausspointcoords.f Outdated
@IshaanDesai

Copy link
Copy Markdown
Member Author

I think I did not frame my initial comment correctly. This PR contains a part of the functionality which together with the contents of #135 can be used to run the two-scale notch tutorial case. Standalone this PR cannot be tested, because we do not have a volumetric coupling case with CalculiX.

We can either decide to merge this PR based on a code review, or think about adding a simple volumetric coupling tutorial case. I can look up the CalculiX tutorials to try to find a case which we can easily modify.

@MakisH

MakisH commented Oct 8, 2025

Copy link
Copy Markdown
Member

In principle, we could merge this without a test case, hoping that someone (else?) in the future might pick into that again. But I foresee a lot of "theoretically, it supports volume coupling, but we have no example / do not really know".

I would suggest to think a bit more of a simple tutorial case, ideally reusing one of the current ones, even if it does not have physical motivation.

@IshaanDesai

Copy link
Copy Markdown
Member Author

In principle, we could merge this without a test case, hoping that someone (else?) in the future might pick into that again. But I foresee a lot of "theoretically, it supports volume coupling, but we have no example / do not really know".

Actually the follow-up PR to this would be #135 which uses the functionality. I simply extracted the functionality from that PR to keep features separate and have a better git history.

I would suggest to think a bit more of a simple tutorial case, ideally reusing one of the current ones, even if it does not have physical motivation.

Let me think a bit more about this.

@MakisH

MakisH commented Oct 8, 2025

Copy link
Copy Markdown
Member

By the way, we should also extend the documentation of the adapter to mention the exact capabilities and limitations of this.

@IshaanDesai

Copy link
Copy Markdown
Member Author

By the way, we should also extend the documentation of the adapter to mention the exact capabilities and limitations of this.

Yes. Right now the documentation is in precice/precice.github.io#530. I can extract the parts relevant for this PR and prepare a new PR for the website.

@MakisH

MakisH commented Oct 8, 2025

Copy link
Copy Markdown
Member

By the way, we should also extend the documentation of the adapter to mention the exact capabilities and limitations of this.

Yes. Right now the documentation is in precice/precice.github.io#530. I can extract the parts relevant for this PR and prepare a new PR for the website.

It actually looks like that PR would be ready to merge if only it shifted a bit from the multiscale to the general volume coupling perspective, showing multiscale as one example.

@IshaanDesai

Copy link
Copy Markdown
Member Author

It actually looks like that PR would be ready to merge if only it shifted a bit from the multiscale to the general volume coupling perspective, showing multiscale as one example.

I will change the language in that PR then, so we can proceed to merging it. I would also recommend merging this PR then.

@precice-bot

Copy link
Copy Markdown

This pull request has been mentioned on preCICE Forum on Discourse. There might be relevant details there:

https://precice.discourse.group/t/coupling-fenics-and-calculix-via-precice-for-electro-thermo-mechanical-simulation/2920/2

Comment thread docs/configure.md Outdated
@IshaanDesai

Copy link
Copy Markdown
Member Author

I cleaned up the code and also removed the incorrect documentation. The functionality for extracting integration points from a provided element mesh works for C3D4 and C3D8 elements. However, this functionality is currently unusable because the data entities that the adapter can read and write are either face-based or node-based. Integration point-based data would be stresses, strains, and material stiffness. Therefore, if we merge this, we would be adding functionality that would become usable in the future.

! along with this program; if not, write to the Free Software
! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
!
! This function is a copy of the function for calculation and printout of the lift and drag forces

@MakisH MakisH Aug 3, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@IshaanDesai What function does this refer to? A link to the source code of CalculiX would make it easier to port this function to a newer version of CalculiX.

@MakisH MakisH Aug 3, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since I have a few other PRs depending on this one, let's add the comment as soon as possible after merging.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This function is kind of a patchwork of loops from the CalculiX source code. Previously, it was more of a direct copy, but I later removed unnecessary parts to shorten the file. I think updating this function for newer versions of CalculiX should be fairly straightforward.

@MakisH MakisH mentioned this pull request Aug 3, 2026
@MakisH
MakisH merged commit 6a5263e into develop Aug 3, 2026
4 checks passed
@MakisH
MakisH deleted the volumetric-coupling branch August 3, 2026 13:09
@MakisH MakisH added this to the v2.20.2 milestone Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants