Skip to content

Add new tutorial: two-scale-heat-conduction#343

Merged
IshaanDesai merged 36 commits intodevelopfrom
macro-micro-ht
Sep 5, 2023
Merged

Add new tutorial: two-scale-heat-conduction#343
IshaanDesai merged 36 commits intodevelopfrom
macro-micro-ht

Conversation

@IshaanDesai
Copy link
Copy Markdown
Member

This PR adds a new tutorial: two-scale heat conduction. In this tutorial, one macro-scale simulation is coupled to several micro-scale simulations. The macro-micro coupling is done with preCICE and the Micro Manager.
Both the macro and micro side are solved using Nutils. In a separate PR, DuMux will be added as a participant on both scales.

This tutorial was initially developed in https://github.com/IshaanDesai/coupled-heat-conduction and is now being moved into the preCICE project via this PR.

@IshaanDesai IshaanDesai marked this pull request as ready for review July 14, 2023 13:56
@IshaanDesai IshaanDesai requested review from MakisH and uekerman July 14, 2023 13:56
@IshaanDesai IshaanDesai self-assigned this Jul 14, 2023
Copy link
Copy Markdown
Member

@MakisH MakisH left a comment

Choose a reason for hiding this comment

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

Some first comments on general structure- and documentation-related aspects. I have not reviewed or executed the macro.py and micro.py.

@IshaanDesai IshaanDesai removed the request for review from uekerman August 3, 2023 21:35
Copy link
Copy Markdown
Member

@MakisH MakisH left a comment

Choose a reason for hiding this comment

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

I tried running the tutorial, but I faced some issues.

By the way, even if I resolve these issues, I guess it will later on complain about the preCICE v2/v3 config clash. Should I get the micro-manager from develop, or from some other branch?

@IshaanDesai
Copy link
Copy Markdown
Member Author

I guess it will later on complain about the preCICE v2/v3 config clash. Should I get the micro-manager from develop, or from some other branch?

The tutorial in its current form works with the develop branch of the Micro Manager. In the Micro Manager repo, we have precice/micro-manager#51 in which the preCICE v3 modifications are being done. Shall I already modify this tutorial for preCICE v3?

Copy link
Copy Markdown
Member

@MakisH MakisH left a comment

Choose a reason for hiding this comment

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

I now pulled and ran again. The simulation completed! 🚀

The tutorial in its current form works with the develop branch of the Micro Manager. In the Micro Manager repo, we have precice/micro-manager#51 in which the preCICE v3 modifications are being done. Shall I already modify this tutorial for preCICE v3?

Since this is targeting develop, and develop has already been ported, I would say yes: it needs to be ported to v3-format.

@IshaanDesai IshaanDesai requested a review from MakisH August 24, 2023 15:11
@IshaanDesai
Copy link
Copy Markdown
Member Author

@MakisH The file micro-nutils/run.sh now has a default configuration to run, the tutorial is ported to v3, and the README now has snippets of ParaView output and explanation to go along with it. Ready for final review.

Copy link
Copy Markdown
Member

@MakisH MakisH left a comment

Choose a reason for hiding this comment

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

I ran the micro-manager with 4 ranks (partitioning 2x2) and the macro-nutils in serial. After a while, I got both participants crashing, each one complaining about communication / blaming the other:

macro-nutils:

macro-1.vtk
optimize > solve > solving 20 dof system to machine precision using arnoldi solver
optimize > solve > solver returned with residual 2e-16
optimize > constrained 20/20 dofs
optimize > optimum value -1.78e-15
optimize > solve > solving 80 dof system to machine precision using arnoldi solver
optimize > solve > solver returned with residual 5e-16
optimize > constrained 80/80 dofs
optimize > optimum value 4.44e-16
solve > solving 19 dof system to machine precision using arnoldi solver
solve > solver returned with residual 8e-16
(0) 17:27:48 [com::SocketCommunication]:685 in receive: ERROR: Receiving data from another participant (using sockets) failed with a system error: read: Interrupted system call. This often means that the other participant exited with an error (look there).

micro-nutils:

(0) 17:30:11 [cplscheme::BaseCouplingScheme]:680 in measureConvergence: relative convergence measure: relative two-norm diff of data "concentration" = 1.74e-02, limit = 1.00e-03, normalization = 3.41e+00, conv = false
(0) 17:30:11 [com::SocketCommunication]:489 in send: ERROR: Sending data to another participant (using sockets) failed with a system error: write: Broken pipe. This often means that the other participant exited with an error (look there).

micro-manager-config.json.txt
micro-manager.log
precice-Micro-Manager-convergence.log

macro-nutils.log.txt

@IshaanDesai
Copy link
Copy Markdown
Member Author

I ran the micro-manager with 4 ranks (partitioning 2x2) and the macro-nutils in serial. After a while, I got both participants crashing, each one complaining about communication / blaming the other

In the last two weeks, a new version of the Micro Manager was released, and the develop branch is now synced to work with precice:develop. Can you pull micro-manager:develop and try again? I could not replicate the crash.

@MakisH
Copy link
Copy Markdown
Member

MakisH commented Sep 4, 2023

I am already on the latest develop: 593cf5a1ef9178cf7b789c49c79724ec3fbf3614

The default decomposition (2x1) and it works.
The decomposition 2x2 (running with 4 processes) now also worked. I am confused, but I guess everything is alright.

@IshaanDesai IshaanDesai merged commit 847a6f0 into develop Sep 5, 2023
@IshaanDesai IshaanDesai deleted the macro-micro-ht branch September 5, 2023 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants