|
TRUST 1.9.8
HPC thermohydraulic platform
|
This exercise builds on the single-problem workflow established in the previous tutorial and addresses the core use case of ICoCo: coupling two physically distinct problems that exchange field data at runtime. The test case used is docond_VEF_3D, a conjugate heat transfer problem in which a solid domain and a fluid domain are thermally coupled through a shared interface.
The exercise is structured in four steps:
Copy the coupled reference case from the TRUST test database and run it both sequentially and in parallel:
Verify that the sequential and parallel results are consistent:
Differences between sequential and parallel results should be well below the tolerance threshold of 10⁻⁵, as expected for a correctly partitioned computation.
The monolithic docond_VEF_3D data file must be decomposed into separate files: one defining the mesh geometry and partitioning, and two independent problem files (one per domain) that will be driven by the ICoCo supervisor.
Create a mesh data file for the solid domain by copying the full data file and retaining only the geometry and partitioning blocks up to (and including) the End instruction. Remove the time scheme, the problem definitions, and any post-processing blocks. Uncomment the partition block:
Edit docond_VEF_3D_mesh1.data so that it contains only the geometry, mesh, and partitioning information for the solid domain (DOM1). Similarly, create a mesh file for the fluid domain:
Edit docond_VEF_3D_mesh2.data so that it retains only the fluid domain (DOM2) information. Run both mesh files to generate the partitioned zone files:
This produces four .Zones files that describe the domain decomposition:
Create a data file for the solid domain's problem:
In docond_VEF_3D_dom1.data:
Create the fluid domain's problem file analogously:
In docond_VEF_3D_dom2.data, retain only the fluid domain information (pb2, dom_fluide) and substitute pb2 → pb throughout.
The two domains exchange heat through their shared interface: the Paroi_echange1 boundary in the solid domain and Paroi_echange2 in the fluid domain. For this uncoupled baseline step, replace the contact boundary conditions with a simple fixed-temperature condition on both sides:
In docond_VEF_3D_dom1.data:
In docond_VEF_3D_dom2.data:
Before activating ICoCo, verify that each problem file runs correctly in isolation:
Both problems should complete successfully. At this stage there is no coupling: each problem applies its own fixed boundary temperature independently.
Produce per-problem result files that will be used later for comparison. In the Post_processing block of each problem, specify distinct output file names:
Rerun the coupled TRUST case to regenerate these labelled output files:
Add the ICoCo problem registration line immediately after dimension 3 in both docond_VEF_3D_dom1.data and docond_VEF_3D_dom2.data:
Remove the Solve pb instruction from both files; the time advancement is now delegated to the ICoCo supervisor.
Copy the provided supervisor for this step:
Open main.cpp and identify:
Build and run on four MPI processes:
Compare the ICoCo results with the independent TRUST runs:
One-way coupling means that one problem (here the fluid) runs independently, and the field it produces at the coupling interface is imposed as a boundary condition on the other problem (here the solid) at each time step. The fluid field drives the solid, but not vice versa.
In docond_VEF_3D_dom2.data, add the following field definition inside the Definition_champs block of the post-processing section. This field extracts the temperature at the fluid side of the coupling interface and makes it available for export via ICoCo:
The domain name dom_fluide_boundaries_Paroi_echange2 is an automatically constructed name identifying the boundary Paroi_echange2 of the fluid domain.
In docond_VEF_3D_dom1.data, replace the fixed boundary condition on Paroi_echange1 with an ICoCo input field:
The field name TEMPERATURE_IN_DOM1 must match the name used in the supervisor when writing the interpolated fluid temperature into the solid boundary.
Copy the one-way coupling supervisor:
Compare this supervisor against the no-exchange version to understand the additions:
The key additions are a TrioDEC object that handles MPI data redistribution between the processor subsets of the two problems, and a TrioField object that carries the field values. The coupling sequence within the time loop is:
Compare results with the uncoupled ICoCo run:
The fluid domain (dom2) results are unchanged, since the fluid problem runs independently. The solid domain (dom1) results differ, confirming that the coupling is active and that the solid boundary condition is now driven by the fluid temperature.
Two-way coupling for conjugate heat transfer requires using complementary boundary condition types on each side of the interface: a Dirichlet condition (imposed temperature) on one side and a Neumann condition (imposed heat flux) on the other. Imposing Dirichlet conditions on both sides simultaneously is mathematically ill-posed and must be avoided.
In this step, the solid problem continues to receive the fluid temperature as a Dirichlet condition (as in Step 3), while the fluid problem now receives the surface heat flux from the solid as a Neumann condition.
In docond_VEF_3D_dom1.data, add the following field definition in the Definition_champs block of the post-processing section. It extracts the surface heat flux at Paroi_echange1 and exposes it via ICoCo:
The domain name dom_solide_boundaries_Paroi_echange1 is the automatically constructed name for the boundary Paroi_echange1 of the solid domain.
In docond_VEF_3D_dom2.data, replace the fixed boundary condition on Paroi_echange2 with an ICoCo Neumann input field:
Copy the two-way coupling supervisor or start from the one-way version and add the reverse exchange:
Compare against the one-way supervisor to identify the additions:
The additions are a second TrioDEC object (dec_flux) handling data transfer from the solid processor subset to the fluid subset, and a corresponding TrioField (field_flux). The time loop now implements the following exchange sequence:
Compare the two-way coupling results against the reference TRUST coupled run:
Transient differences are expected. The TRUST internal coupling uses an implicit treatment of the interface condition, whereas the ICoCo-based coupling applies an explicit staggered scheme: values exchanged at time step n are used to compute the solution at time step n+1. As the simulation progresses toward a steady state, the two approaches converge toward the same solution.