.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/00-systemcoupling/cht_pipe.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_00-systemcoupling_cht_pipe.py: .. _ref_cht_pipe_example: Conjugate Heat Transfer- Pipe Flow ----------------------------------- Conjugate heat transfer (CHT) simulations often exhibit numerical sensitivity at the fluid-solid interface. This example demonstrates how users can appropriately select interface conditions and stabilization schemes for a typical pipe-flow configuration. It highlights best practices for setting up a robust CHT workflow in System Coupling, including managing temperature and heat-flux exchange, controlling relaxation, ensuring consistent mesh-to-mesh interpolation. - Ansys Fluent is used to model the thermal fluid flow in the pipe. - Ansys Mechanical APDL (MAPDL) is used to model thermal transfer in the pipe wall. - System Coupling coordinates the coupled solution to the conjugate heat transfer problem, including numerical stabilization if needed. **Problem description** A fluid at a certain temperature flows into a pipe of known diameter and length. As it flows, the heated outer wall of the pipe conducts heat to the inner wall, which in turn heats the fluid and cools down the walls of the pipe. .. image:: /_static/pipe_schematic.png :width: 400pt :align: center The flow is smooth inside the pipe and the outer wall of the pipe is adiabatic. Fluid enters at an initial temperature of 300K while the outer wall of the pipe is at 350K. .. GENERATED FROM PYTHON SOURCE LINES 56-64 Import modules, download files, launch products ----------------------------------------------- Setting up this example consists of performing imports, downloading the input file, and launching the required products. Perform required imports ~~~~~~~~~~~~~~~~~~~~~~~~ Import ``ansys-systemcoupling-core``, ``ansys-fluent-core``, ``ansys-mapdl-core`` .. GENERATED FROM PYTHON SOURCE LINES 64-72 .. code-block:: Python import ansys.fluent.core as pyfluent import ansys.mapdl.core as pymapdl import ansys.systemcoupling.core as pysyc from ansys.systemcoupling.core import examples .. GENERATED FROM PYTHON SOURCE LINES 74-75 Download the Fluent mesh file. .. GENERATED FROM PYTHON SOURCE LINES 75-79 .. code-block:: Python fluent_msh_file = examples.download_file( "fluid_domain.msh", "pysystem-coupling/cht_pipe" ) .. GENERATED FROM PYTHON SOURCE LINES 80-82 Launch MAPDL to create the solid domain. ---------------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 82-88 .. code-block:: Python # Launch MAPDL. mapdl = pymapdl.launch_mapdl(version=252) mapdl.clear() mapdl.prep7() .. rst-class:: sphx-glr-script-out .. code-block:: none *****MAPDL VERIFICATION RUN ONLY***** DO NOT USE RESULTS FOR PRODUCTION ***** MAPDL ANALYSIS DEFINITION (PREP7) ***** .. GENERATED FROM PYTHON SOURCE LINES 89-90 Set material properties of the pipe. .. GENERATED FROM PYTHON SOURCE LINES 90-97 .. code-block:: Python mapdl.mp("EX", 1, 69e9) mapdl.mp("NUXY", 1, 0.33) mapdl.mp("DENS", 1, 2700) mapdl.mp("ALPX", 1, 23.6e-6) mapdl.mp("KXX", 1, 237) mapdl.mp("C", 1, 900) .. rst-class:: sphx-glr-script-out .. code-block:: none MATERIAL 1 C = 900.0000 .. GENERATED FROM PYTHON SOURCE LINES 98-99 Set element type to SOLID279. .. GENERATED FROM PYTHON SOURCE LINES 99-104 .. code-block:: Python mapdl.et(1, 279) mapdl.keyopt(1, 2, 1) print(mapdl) .. rst-class:: sphx-glr-script-out .. code-block:: none Mapdl ----- PyMAPDL Version: 0.71.3 Interface: grpc Product: Ansys Mechanical Enterprise MAPDL Version: 25.2 Running on: localhost (127.0.0.1) .. GENERATED FROM PYTHON SOURCE LINES 105-106 Set the pipe inner and outer diameter and length. .. GENERATED FROM PYTHON SOURCE LINES 106-110 .. code-block:: Python d_in = 0.025 d_out = 0.035 l = 0.2 .. GENERATED FROM PYTHON SOURCE LINES 111-112 Create a simple hollow pipe .. GENERATED FROM PYTHON SOURCE LINES 112-116 .. code-block:: Python mapdl.cyl4(0, 0, rad1=d_in, rad2=d_out, depth=l) mapdl.esize(0.002) mapdl.vsweep(1) .. rst-class:: sphx-glr-script-out .. code-block:: none GENERATE NODES AND ELEMENTS IN VOLUME 1 SWEEPING VOLUME 1 FROM AREA 1 TO AREA 2 VOLUME 1 MESHED WITH 63200 HEXAHEDRA AND 0 WEDGES Volume Sweeping Complete The Following Volumes Were Successfully Swept 1 MAXIMUM NODE NUMBER = 283688 MAXIMUM ELEMENT NUMBER = 63200 .. GENERATED FROM PYTHON SOURCE LINES 117-120 .. image:: /_static/pipe_elements.png :width: 700pt :align: center .. GENERATED FROM PYTHON SOURCE LINES 122-124 Creating the regions from the geometry for named selections ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. GENERATED FROM PYTHON SOURCE LINES 124-146 .. code-block:: Python # Creating a named selection for Inner wall. mapdl.asel("S", "AREA", "", 5, 6) mapdl.nsla("S", 1) mapdl.cm("FSIN_1", "NODE") mapdl.allsel() # Creating a named selection for Outer wall. mapdl.asel("S", "AREA", "", 3, 4) mapdl.cm("Outer_wall", "AREA") mapdl.allsel() # Creating a named selection for Outlet. mapdl.asel("S", "AREA", "", 2) mapdl.cm("Outlet", "AREA") mapdl.allsel() # Creating a named selection for Inlet. mapdl.asel("S", "AREA", "", 1) mapdl.cm("Inlet", "AREA") mapdl.allsel() .. rst-class:: sphx-glr-script-out .. code-block:: none SELECT ALL ENTITIES OF TYPE= ALL AND BELOW .. GENERATED FROM PYTHON SOURCE LINES 147-148 Set the boundary conditions for the structure. Temperature is in degrees Celsius. .. GENERATED FROM PYTHON SOURCE LINES 148-164 .. code-block:: Python mapdl.cmsel("S", "Outer_wall") mapdl.d("Outer_wall", "TEMP", 77) mapdl.allsel() mapdl.cmsel("S", "Inlet") mapdl.sf("ALL", "HFLUX", 0) mapdl.allsel() mapdl.cmsel("S", "Outlet") mapdl.sf("ALL", "HFLUX", 0) mapdl.allsel() mapdl.cmsel("S", "FSIN_1") mapdl.sf("FSIN_1", "FSIN", 1) mapdl.allsel() .. rst-class:: sphx-glr-script-out .. code-block:: none SELECT ALL ENTITIES OF TYPE= ALL AND BELOW .. GENERATED FROM PYTHON SOURCE LINES 165-166 Setup the rest of the analysis. .. GENERATED FROM PYTHON SOURCE LINES 166-170 .. code-block:: Python mapdl.run("/SOLU") mapdl.antype(0) .. rst-class:: sphx-glr-script-out .. code-block:: none PERFORM A STATIC ANALYSIS THIS WILL BE A NEW ANALYSIS .. GENERATED FROM PYTHON SOURCE LINES 171-173 Set up the fluid analysis and read the pre-created mesh file ------------------------------------------------------------ .. GENERATED FROM PYTHON SOURCE LINES 173-177 .. code-block:: Python fluent = pyfluent.launch_fluent(start_transcript=False, product_version=252) fluent.file.read(file_type="mesh", file_name=fluent_msh_file) .. rst-class:: sphx-glr-script-out .. code-block:: none pyfluent.launcher WARNING: Configuring Fluent container to mount to /home/runner/work/pysystem-coupling/pysystem-coupling/examples/00-systemcoupling, with this path available as /home/container/workdir for the Fluent session running inside the container. .. GENERATED FROM PYTHON SOURCE LINES 178-179 Define the fluid solver settings. .. GENERATED FROM PYTHON SOURCE LINES 179-181 .. code-block:: Python fluent.setup.models.energy.enabled = True .. GENERATED FROM PYTHON SOURCE LINES 182-183 Add the material. .. GENERATED FROM PYTHON SOURCE LINES 183-187 .. code-block:: Python fluent.setup.materials.database.copy_by_name(type="fluid", name="water-liquid") fluent.setup.cell_zone_conditions.fluid["fff_fluiddomain"].material = "water-liquid" .. GENERATED FROM PYTHON SOURCE LINES 188-189 Define boundary conditions. .. GENERATED FROM PYTHON SOURCE LINES 189-201 .. code-block:: Python fluent.setup.boundary_conditions.velocity_inlet["inlet"].momentum.velocity = ( 0.1 # units: m/s ) fluent.setup.boundary_conditions.velocity_inlet["inlet"].thermal.temperature = ( 300 # Units: Kelvin ) fluent.setup.boundary_conditions.wall["inner_wall"].thermal.thermal_bc = ( "via System Coupling" ) fluent.solution.run_calculation.iter_count = 20 .. GENERATED FROM PYTHON SOURCE LINES 202-207 Set up the coupled analysis --------------------------- System Coupling setup involves adding the structural and fluid participants, adding coupled interfaces and data transfers, and setting other coupled analysis settings. .. GENERATED FROM PYTHON SOURCE LINES 207-209 .. code-block:: Python syc = pysyc.launch(start_output=True) .. rst-class:: sphx-glr-script-out .. code-block:: none /opt/hostedtoolcache/Python/3.13.12/x64/lib/python3.13/site-packages/ansys/tools/common/cyberchannel.py:188: UserWarning: Starting gRPC client without TLS on 127.0.0.1:46309. This is INSECURE. Consider using a secure connection. warn(f"Starting gRPC client without TLS on {target}. This is INSECURE. Consider using a secure connection.") .. GENERATED FROM PYTHON SOURCE LINES 210-211 Add participants by passing session handles to System Coupling. .. GENERATED FROM PYTHON SOURCE LINES 211-217 .. code-block:: Python fluid_name = syc.setup.add_participant(participant_session=fluent) solid_name = syc.setup.add_participant(participant_session=mapdl) syc.setup.coupling_participant[fluid_name].display_name = "Fluid" syc.setup.coupling_participant[solid_name].display_name = "Solid" .. GENERATED FROM PYTHON SOURCE LINES 218-219 Add coupling interface. .. GENERATED FROM PYTHON SOURCE LINES 219-226 .. code-block:: Python interface_name = syc.setup.add_interface( side_one_participant=fluid_name, side_one_regions=["inner_wall"], side_two_participant=solid_name, side_two_regions=["FSIN_1"], ) .. GENERATED FROM PYTHON SOURCE LINES 227-228 Set up 2-way thermal FSI coupling. .. GENERATED FROM PYTHON SOURCE LINES 228-245 .. code-block:: Python # Temperature from solid to fluid temp_transfer = syc.setup.add_data_transfer( interface=interface_name, target_side="One", source_variable="TEMP", target_variable="temperature", ) # Heat flux from fluid to solid hf_transfer = syc.setup.add_data_transfer( interface=interface_name, target_side="Two", source_variable="heatflow", target_variable="HFLW", ) .. GENERATED FROM PYTHON SOURCE LINES 246-248 Define constants and calculate Biot number ------------------------------------------ .. GENERATED FROM PYTHON SOURCE LINES 248-298 .. code-block:: Python L_c = (d_out - d_in) / 2 # Characteristic length of the pipe (thickness) U = 0.1 fluid_rho = 998.3 # Density of fluid mu_fluid = 0.001 # Dynamic viscosity of fluid cp_fluid = 4182 # Specific heat capacity of fluid k_fluid = 0.6 # Thermal conductivity of fluid k_solid = 237 # Thermal conductivity of solid def nusselt_number(Re, Pr, d_in, L): # From: Bergman, T. L., Lavine, A. S., Incropera, F. P., & DeWitt, D. P. (2017). # Fundamentals of Heat and Mass transfer (8th ed.). Wiley. if Re >= 6000: Nu = 0.023 * Re**0.8 * Pr ** (1 / 3) method = "Colburn" else: Nu = 3.66 + (0.068 * (Re * Pr * d_in / L)) / ( 1 + 0.04 * (Re * Pr * d_in / L) ** (2 / 3) ) method = "Hausen" return Nu, method def compute_thermo_numbers(rho, mu, cp, k_fluid, k_solid, velocity, d_in, L, L_c): Pr = cp * mu / k_fluid Re = rho * velocity * d_in / mu # Nusselt number Nu, correlation = nusselt_number(Re, Pr, d_in, L) # Convective heat transfer coefficient h = Nu * k_fluid / d_in # Biot number Bi = h * L_c / k_solid return Re, Pr, h, Bi, correlation Re, Nu, h, Bi, corr = compute_thermo_numbers( fluid_rho, mu_fluid, cp_fluid, k_fluid, k_solid, U, d_in, l, L_c ) print(f"Reynolds number = {Re}") print(f"Nusselt number = {Nu}") print(f"Heat transfer coefficient h = {h} W/(m^2·K)") print(f"Biot number = {Bi}") print(f"Nusselt correlation used = {corr}") .. rst-class:: sphx-glr-script-out .. code-block:: none Reynolds number = 2495.75 Nusselt number = 6.970000000000001 Heat transfer coefficient h = 547.8915788905118 W/(m^2·K) Biot number = 0.011558894069420084 Nusselt correlation used = Hausen .. GENERATED FROM PYTHON SOURCE LINES 299-300 Apply stabilization if Biot number exceeds 10. .. GENERATED FROM PYTHON SOURCE LINES 300-309 .. code-block:: Python if Bi > 10: syc.setup.analysis_control.global_stabilization.option = "Quasi-Newton" syc.setup.solution_control.time_step_size = "0.1 [s]" # time step is 0.1 [s] syc.setup.solution_control.end_time = 10 # end time is 10.0 [s] syc.setup.output_control.option = "EveryStep" syc.setup.output_control.generate_csv_chart_output = True .. GENERATED FROM PYTHON SOURCE LINES 310-312 Solution -------- .. GENERATED FROM PYTHON SOURCE LINES 312-314 .. code-block:: Python syc.solution.solve() .. rst-class:: sphx-glr-script-out .. code-block:: none +=============================================================================+ | Coupling Participants (2) | +=============================================================================+ | Fluid | +-----------------------------------------------------------------------------+ | Internal Name : FLUENT-1 | | Participant Type : FLUENT | | Participant Display Name : FLUENT-1 | | Dimension : 3D | | Input Parameters : [] | | Output Parameters : [] | | Participant Analysis Type : Steady | | Use New APIs : True | | Restarts Supported : True | | Variables (21) | | Variable : backflow_specific_dissipation_rate | | Internal Name : backflow-specific-dissipation-rate | | Quantity Type : Unspecified | | Participant Display Name : backflow specific dissipation rate | | Data Type : Real | | Tensor Type : Scalar | | Is Extensive : False | | | | Variable : backflow_total_temperature | | Internal Name : backflow-total-temperature | | Quantity Type : Unspecified | | Participant Display Name : backflow total temperature | | Data Type : Real | | Tensor Type : Scalar | | Is Extensive : False | | | | Variable : backflow_turbulent_dissipation_rate | | Internal Name : backflow-turbulent-dissipation-rate | | Quantity Type : Unspecified | | Participant Display Name : backflow turbulent dissipation rate | | Data Type : Real | | Tensor Type : Scalar | | Is Extensive : False | | | | Variable : backflow_turbulent_kinetic_energy | | Internal Name : backflow-turbulent-kinetic-energy | | Quantity Type : Unspecified | | Participant Display Name : backflow turbulent kinetic energy | | Data Type : Real | | Tensor Type : Scalar | | Is Extensive : False | | | | Variable : components_of_flow_direction | | Internal Name : components-of-flow-direction | | Quantity Type : Unspecified | | Participant Display Name : components of flow direction | | Data Type : Real | | Tensor Type : Vector | | Is Extensive : False | | | | Variable : electrical_conductivity | | Internal Name : electrical-conductivity | | Quantity Type : Electrical Conductivity | | Participant Display Name : electrical conductivity | | Data Type : Real | | Tensor Type : Scalar | | Is Extensive : False | | | | Variable : force | | Internal Name : force | | Quantity Type : Force | | Participant Display Name : force | | Data Type : Real | | Tensor Type : Vector | | Is Extensive : True | | | | Variable : heat_transfer_coefficient | | Internal Name : heat-transfer-coefficient | | Quantity Type : Heat Transfer Coefficient | | Participant Display Name : heat transfer coefficient | | Data Type : Real | | Tensor Type : Scalar | | Is Extensive : False | | | | Variable : heatflow | | Internal Name : heatflow | | Quantity Type : Heat Rate | | Participant Display Name : heatflow | | Data Type : Real | | Tensor Type : Scalar | | Is Extensive : True | | | | Variable : heatrate | | Internal Name : heatrate | | Quantity Type : Heat Rate | | Participant Display Name : heatrate | | Data Type : Real | | Tensor Type : Scalar | | Is Extensive : True | | | | Variable : lorentz_force | | Internal Name : lorentz-force | | Quantity Type : Force | | Participant Display Name : lorentz force | | Data Type : Real | | Tensor Type : Vector | | Is Extensive : True | | | | Variable : mass_flow_rate | | Internal Name : mass-flow-rate | | Quantity Type : Unspecified | | Participant Display Name : mass flow rate | | Data Type : Real | | Tensor Type : Scalar | | Is Extensive : True | | | | Variable : near_wall_temperature | | Internal Name : near-wall-temperature | | Quantity Type : Convection Reference Temperature | | Participant Display Name : near wall temperature | | Data Type : Real | | Tensor Type : Scalar | | Is Extensive : False | | | | Variable : pressure | | Internal Name : pressure | | Quantity Type : Unspecified | | Participant Display Name : pressure | | Data Type : Real | | Tensor Type : Scalar | | Is Extensive : False | | | | Variable : specific_dissipation_rate | | Internal Name : specific-dissipation-rate | | Quantity Type : Unspecified | | Participant Display Name : specific dissipation rate | | Data Type : Real | | Tensor Type : Scalar | | Is Extensive : False | | | | Variable : static_temperature | | Internal Name : static-temperature | | Quantity Type : Unspecified | | Participant Display Name : static temperature | | Data Type : Real | | Tensor Type : Scalar | | Is Extensive : False | | | | Variable : temperature | | Internal Name : temperature | | Quantity Type : Temperature | | Participant Display Name : temperature | | Data Type : Real | | Tensor Type : Scalar | | Is Extensive : False | | | | Variable : total_temperature | | Internal Name : total-temperature | | Quantity Type : Unspecified | | Participant Display Name : total temperature | | Data Type : Real | | Tensor Type : Scalar | | Is Extensive : False | | | | Variable : turbulent_dissipation_rate | | Internal Name : turbulent-dissipation-rate | | Quantity Type : Unspecified | | Participant Display Name : turbulent dissipation rate | | Data Type : Real | | Tensor Type : Scalar | | Is Extensive : False | | | | Variable : turbulent_kinetic_energy | | Internal Name : turbulent-kinetic-energy | | Quantity Type : Unspecified | | Participant Display Name : turbulent kinetic energy | | Data Type : Real | | Tensor Type : Scalar | | Is Extensive : False | | | | Variable : velocity | | Internal Name : velocity | | Quantity Type : Unspecified | | Participant Display Name : velocity | | Data Type : Real | | Tensor Type : Vector | | Is Extensive : False | | Regions (4) | | Region : fff_fluiddomain | | Internal Name : fff_fluiddomain | | Topology : Volume | | Input Variables : [heatrate, lorentz-force] | | Output Variables : [temperature, electrical-conductivity] | | Region Discretization Type : Mesh Region | | | | Region : inlet | | Internal Name : inlet | | Topology : Surface | | Input Variables : [turbulent-kinetic-energy, specific- | | dissipation-rate, static-temperature, | | velocity] | | Output Variables : [pressure, backflow-total-temperature, | | backflow-turbulent-kinetic-energy, backflow- | | specific-dissipation-rate, backflow- | | turbulent-dissipation-rate] | | Region Discretization Type : Mesh Region | | | | Region : inner_wall | | Internal Name : inner_wall | | Topology : Surface | | Input Variables : [temperature, heatflow] | | Output Variables : [force, temperature, heat-transfer- | | coefficient, heatflow, near-wall- | | temperature] | | Region Discretization Type : Mesh Region | | | | Region : outlet | | Internal Name : outlet | | Topology : Surface | | Input Variables : [pressure, backflow-total-temperature, | | backflow-turbulent-kinetic-energy, backflow- | | specific-dissipation-rate] | | Output Variables : [turbulent-kinetic-energy, specific- | | dissipation-rate, turbulent-dissipation- | | rate, total-temperature, static-temperature, | | velocity, mass-flow-rate, components-of- | | flow-direction] | | Region Discretization Type : Mesh Region | | Properties | | Accepts New Inputs : False | | Update Control | | Option : ProgramControlled | | Execution Control | | Option : ExternallyManaged | +-----------------------------------------------------------------------------+ | Solid | +-----------------------------------------------------------------------------+ | Internal Name : MAPDL-2 | | Participant Type : MAPDL | | Participant Display Name : MAPDL-2 | | Dimension : 3D | | Input Parameters : [] | | Output Parameters : [] | | Participant Analysis Type : Steady | | Restarts Supported : True | | Variables (6) | | Variable : Bulk_Temperature | | Internal Name : TBULK | | Quantity Type : Convection Reference Temperature | | Location : Node | | Participant Display Name : Bulk Temperature | | Data Type : Real | | Tensor Type : Scalar | | Is Extensive : False | | | | Variable : Heat_Flow | | Internal Name : HFLW | | Quantity Type : Heat Rate | | Location : Node | | Participant Display Name : Heat Flow | | Data Type : Real | | Tensor Type : Scalar | | Is Extensive : True | | | | Variable : Heat_Generation | | Internal Name : HGEN | | Quantity Type : Heat Rate | | Location : Node | | Participant Display Name : Heat Generation | | Data Type : Real | | Tensor Type : Scalar | | Is Extensive : False | | | | Variable : Heat_Transfer_Coefficient | | Internal Name : HCOEF | | Quantity Type : Heat Transfer Coefficient | | Location : Node | | Participant Display Name : Heat Transfer Coefficient | | Data Type : Real | | Tensor Type : Scalar | | Is Extensive : False | | | | Variable : Temperature | | Internal Name : TEMP | | Quantity Type : Temperature | | Location : Node | | Participant Display Name : Temperature | | Data Type : Real | | Tensor Type : Scalar | | Is Extensive : False | | | | Variable : Temperature_Load | | Internal Name : TPLD | | Quantity Type : Temperature | | Location : Node | | Participant Display Name : Temperature Load | | Data Type : Real | | Tensor Type : Scalar | | Is Extensive : False | | Regions (1) | | Region : System Coupling (Surface) Region 0 | | Internal Name : FSIN_1 | | Topology : Surface | | Input Variables : [TEMP, TBULK, HCOEF, HFLW] | | Output Variables : [TEMP, TBULK, HCOEF, HFLW] | | Region Discretization Type : Mesh Region | | Properties | | Accepts New Inputs : False | | Update Control | | Option : ProgramControlled | | Execution Control | | Option : ExternallyManaged | +=============================================================================+ | Analysis Control | +=============================================================================+ | Analysis Type : Steady | | Optimize If One Way : True | | Allow Simultaneous Update : False | | Partitioning Algorithm : SharedAllocateMachines | | Global Stabilization | | Option : None | +=============================================================================+ | Coupling Interfaces (1) | +=============================================================================+ | Interface-1 | +-----------------------------------------------------------------------------+ | Internal Name : Interface-1 | | Side | | Side: One | | Coupling Participant : FLUENT-1 | | Region List : [inner_wall] | | Reference Frame : GlobalReferenceFrame | | Instancing : None | | Side: Two | | Coupling Participant : MAPDL-2 | | Region List : [FSIN_1] | | Reference Frame : GlobalReferenceFrame | | Instancing : None | | Data Transfers (2) | | DataTransfer : Heat_Flow | | Internal Name : HFLW | | Suppress : False | | Target Side : Two | | Option : UsingVariable | | Source Variable : heatflow | | Target Variable : HFLW | | Ramping Option : None | | Relaxation Factor : 1.00e+00 | | Convergence Target : 1.00e-02 | | Mapping Type : Conservative | | DataTransfer : temperature | | Internal Name : temperature | | Suppress : False | | Target Side : One | | Option : UsingVariable | | Source Variable : TEMP | | Target Variable : temperature | | Ramping Option : None | | Relaxation Factor : 1.00e+00 | | Convergence Target : 1.00e-02 | | Mapping Type : ProfilePreserving | | Unmapped Value Option : ProgramControlled | | Mapping Control | | Stop If Poor Intersection : True | | Poor Intersection Threshold : 5.00e-01 | | Face Alignment : ProgramControlled | | Absolute Gap Tolerance : 0.0 [m] | | Relative Gap Tolerance : 1.00e+00 | +=============================================================================+ | Solution Control | +=============================================================================+ | Duration Option : NumberOfSteps | | Number Of Steps : 1 | | Minimum Iterations : 1 | | Maximum Iterations : 5 | | Use IP Address When Possible : ProgramControlled | | Use Local Host When Possible : ProgramControlled | +=============================================================================+ | Output Control | +=============================================================================+ | Option : EveryStep | | Generate CSV Chart Output : True | | Write Initial Snapshot : True | | Results | | Option : ProgramControlled | | Include Instances : ProgramControlled | | Type | | Option : EnsightGold | +=============================================================================+ +-----------------------------------------------------------------------------+ | Warnings were found during data model validation. | +-----------------------------------------------------------------------------+ | Warning: Participant Solid (MAPDL-2) has the ExecutionControl 'Option' set | | to 'ExternallyManaged'. System Coupling will not control the | | startup/shutdown behavior of this participant. | | Warning: Participant Fluid (FLUENT-1) has the ExecutionControl 'Option' set | | to 'ExternallyManaged'. System Coupling will not control the | | startup/shutdown behavior of this participant. | | Warning: Unused input variables ['Bulk_Temperature', 'Temperature', | | 'Heat_Transfer_Coefficient'] (TBULK, TEMP, HCOEF) on region FSIN_1 for | | Solid (CouplingParticipant:MAPDL-2). | | Warning: Unused input variables ['backflow_turbulent_kinetic_energy', | | 'pressure', 'backflow_specific_dissipation_rate', | | 'backflow_total_temperature'] (backflow-turbulent-kinetic-energy, | | pressure, backflow-specific-dissipation-rate, backflow-total- | | temperature) on region outlet for Fluid (CouplingParticipant:FLUENT-1). | | Warning: Unused input variables ['heatflow'] (heatflow) on region | | inner_wall for Fluid (CouplingParticipant:FLUENT-1). | | Warning: Unused input variables ['heatrate', 'lorentz_force'] (heatrate, | | lorentz-force) on region fff_fluiddomain for Fluid | | (CouplingParticipant:FLUENT-1). | | Warning: Unused input variables ['specific_dissipation_rate', | | 'static_temperature', 'velocity', 'turbulent_kinetic_energy'] | | (specific-dissipation-rate, static-temperature, velocity, turbulent- | | kinetic-energy) on region inlet for Fluid | | (CouplingParticipant:FLUENT-1). | +-----------------------------------------------------------------------------+ +=============================================================================+ | Execution Information | +=============================================================================+ | | | System Coupling | | Command Line Arguments: | | -m cosimgui --grpc --host=0.0.0.0 --port=46309 --transport-mode=insecur | | e --allow-remote --ptrace | | Working Directory: | | /working | | | | Fluid | | Not started by System Coupling | | | | Solid | | Not started by System Coupling | | | +=============================================================================+ Awaiting connections from coupling participants... done. +=============================================================================+ | Build Information | +-----------------------------------------------------------------------------+ | System Coupling | | 2025 R2: Build ID: 45b89b3 Build Date: 2025-09-24T09:46 | | Fluid | | ANSYS Fluent 25.0 2.0 0.0 Build Time: May 16 2025 12:49:54 EDT Build Id: | | 203 | | Solid | | Mechanical APDL Release Build 25.2 UP20251010 | | DISTRIBUTED LINUX x64 Version | +=============================================================================+ +-----------------------------------------------------------------------------+ | MESH STATISTICS | +-----------------------------------------------------------------------------+ | Participant: FLUENT-1 | | Number of face regions 1 | | Number of faces 8 408 | | Triangular 8 408 | | Area (m2) 3.140e-02 | | Bounding Box (m) | | Minimum [-2.500e-02 -2.500e-02 0.000e+00] | | Maximum [ 2.500e-02 2.500e-02 2.000e-01] | | | | Participant: MAPDL-2 | | Number of face regions 1 | | Number of faces 8 000 | | Quadrilateral8 8 000 | | Area (m2) 3.141e-02 | | Bounding Box (m) | | Minimum [-2.500e-02 -2.500e-02 0.000e+00] | | Maximum [ 2.500e-02 2.500e-02 2.000e-01] | | | | Total | | Number of cells 0 | | Number of faces 16 408 | | Number of nodes 28 416 | +-----------------------------------------------------------------------------+ +-----------------------------------------------------------------------------+ | MAPPING SUMMARY | +-----------------------------------------------------------------------------+ | | Source Target | +-----------------------------------------------------------------------------+ | Interface-1 | | | Heat_Flow | | | Mapped Area [%] | 100 100 | | Mapped Elements [%] | 100 100 | | Mapped Nodes [%] | 100 100 | | temperature | | | Mapped Area [%] | 100 100 | | Mapped Elements [%] | 100 100 | | Mapped Nodes [%] | 100 100 | +-----------------------------------------------------------------------------+ +-----------------------------------------------------------------------------+ | Transfer Diagnostics | +-----------------------------------------------------------------------------+ | | Source Target | +-----------------------------------------------------------------------------+ | Fluid | | | Interface: Interface-1 | | | temperature | | | Weighted Average | 2.73E+02 2.73E+02 | +-----------------------------------------------------------------------------+ | Solid | | | Interface: Interface-1 | | | Heat_Flow | | | Sum | 0.00E+00 0.00E+00 | +-----------------------------------------------------------------------------+ =============================================================================== +=============================================================================+ | | | Analysis Initialization | | | +=============================================================================+ =============================================================================== =============================================================================== +=============================================================================+ | | | Coupled Solution | | | +=============================================================================+ =============================================================================== +=============================================================================+ | COUPLING STEP = 1 | +=============================================================================+ +=============================================================================+ | COUPLING ITERATIONS | +-----------------------------------------------------------------------------+ | | Source Target | +-----------------------------------------------------------------------------+ | COUPLING ITERATION = 1 | +-----------------------------------------------------------------------------+ | Fluid | | | Interface: Interface-1 | | | temperature | Not yet converged | | RMS Change | 1.00E+00 1.00E+00 | | Weighted Average | 2.73E+02 2.73E+02 | +-----------------------------------------------------------------------------+ | Solid | | | Interface: Interface-1 | | | Heat_Flow | Not yet converged | | RMS Change | 1.00E+00 1.00E+00 | | Sum | 6.12E+02 6.12E+02 | +-----------------------------------------------------------------------------+ | Participant solution status | | | Fluid | Not yet converged | | Solid | Converged | +-----------------------------------------------------------------------------+ | COUPLING ITERATION = 2 | +-----------------------------------------------------------------------------+ | Fluid | | | Interface: Interface-1 | | | temperature | Not yet converged | | RMS Change | 3.79E-01 3.97E-01 | | Weighted Average | 3.51E+02 3.51E+02 | +-----------------------------------------------------------------------------+ | Solid | | | Interface: Interface-1 | | | Heat_Flow | Not yet converged | | RMS Change | 6.02E-01 3.73E-01 | | Sum | -1.19E+03 -1.19E+03 | +-----------------------------------------------------------------------------+ | Participant solution status | | | Fluid | Not yet converged | | Solid | Converged | +-----------------------------------------------------------------------------+ | COUPLING ITERATION = 3 | +-----------------------------------------------------------------------------+ | Fluid | | | Interface: Interface-1 | | | temperature | Not yet converged | | RMS Change | 1.36E-02 1.34E-02 | | Weighted Average | 3.49E+02 3.49E+02 | +-----------------------------------------------------------------------------+ | Solid | | | Interface: Interface-1 | | | Heat_Flow | Not yet converged | | RMS Change | 6.23E-02 4.02E-02 | | Sum | -1.08E+03 -1.08E+03 | +-----------------------------------------------------------------------------+ | Participant solution status | | | Fluid | Not yet converged | | Solid | Converged | +-----------------------------------------------------------------------------+ | COUPLING ITERATION = 4 | +-----------------------------------------------------------------------------+ | Fluid | | | Interface: Interface-1 | | | temperature | Converged | | RMS Change | 1.01E-03 9.90E-04 | | Weighted Average | 3.49E+02 3.49E+02 | +-----------------------------------------------------------------------------+ | Solid | | | Interface: Interface-1 | | | Heat_Flow | Converged | | RMS Change | 4.39E-03 3.22E-03 | | Sum | -1.09E+03 -1.09E+03 | +-----------------------------------------------------------------------------+ | Participant solution status | | | Fluid | Converged | | Solid | Converged | +=============================================================================+ =============================================================================== +=============================================================================+ | | | Shut Down | | | +=============================================================================+ =============================================================================== +=============================================================================+ | Available Restart Points | +=============================================================================+ | Restart Point | File Name | +-----------------------------------------------------------------------------+ | Coupling Step 1 | Restart_step1.h5 | +=============================================================================+ +=============================================================================+ | Timing Summary [s] | +=============================================================================+ | Total Time : 9.41059E+01 | | Coupling Participant Time | | Fluid : 6.81553E+01 | | Solid : 2.38959E+01 | .. GENERATED FROM PYTHON SOURCE LINES 315-318 Post processing --------------- Post process the fluid results in Fluent. .. GENERATED FROM PYTHON SOURCE LINES 318-338 .. code-block:: Python if fluent.settings.results.graphics.picture.use_window_resolution.is_active(): fluent.settings.results.graphics.picture.use_window_resolution = False fluent.settings.results.graphics.picture.x_resolution = 1920 fluent.settings.results.graphics.picture.y_resolution = 1440 fluent.settings.results.surfaces.plane_surface.create(name="mid_plane") fluent.settings.results.surfaces.plane_surface["mid_plane"].method = "zx-plane" fluent.settings.results.graphics.contour.create(name="contour_temperature") fluent.settings.results.graphics.contour["contour_temperature"] = { "field": "temperature", "surfaces_list": ["mid_plane"], } fluent.settings.results.graphics.contour.display(object_name="contour_temperature") fluent.settings.results.graphics.views.restore_view(view_name="top") fluent.settings.results.graphics.views.auto_scale() fluent.settings.results.graphics.picture.save_picture(file_name="cht_temp_contour.png") .. rst-class:: sphx-glr-script-out .. code-block:: none | Total : 9.20512E+01 | | Coupling Engine Time | | Solution Control : 1.25783E+00 | | Mesh Import : 5.71668E-02 | | Mapping Setup : 4.05256E-01 | | Mapping : 1.15395E-03 | | Numerics : 3.73507E-03 | | Misc. : 3.29594E-01 | | Total : 2.05473E+00 | +=============================================================================+ +=============================================================================+ | System coupling run completed successfully. | +=============================================================================+ .. GENERATED FROM PYTHON SOURCE LINES 339-342 .. image:: /_static/cht_temp_contour.png :width: 800pt :align: center .. GENERATED FROM PYTHON SOURCE LINES 344-345 Post-process the system coupling results - display the charts showing the convergence plot. .. GENERATED FROM PYTHON SOURCE LINES 345-347 .. code-block:: Python syc.solution.show_plot(show_convergence=True) .. image-sg:: /examples/00-systemcoupling/images/sphx_glr_cht_pipe_001.png :alt: Interface: Interface-1, Data transfer convergence on Interface-1, Interface-1 - temperature (Weighted Average), Interface-1 - Heat_Flow (Sum) :srcset: /examples/00-systemcoupling/images/sphx_glr_cht_pipe_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 348-350 Exit ---- .. GENERATED FROM PYTHON SOURCE LINES 350-353 .. code-block:: Python syc.exit() fluent.exit() mapdl.exit() .. rst-class:: sphx-glr-timing **Total running time of the script:** (3 minutes 27.374 seconds) .. _sphx_glr_download_examples_00-systemcoupling_cht_pipe.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: cht_pipe.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: cht_pipe.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: cht_pipe.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_