.. _python_API_cht:

.. currentmodule:: flow360

********************************************
Conjugate Heat Transfer (CHT) Solver Example
********************************************

This script demonstrates the setup and running of a steady-state Conjugate Heat Transfer (CHT) simulation using the Flow360 Python API.
It illustrates the process of defining coupled fluid and solid domains from a pre-existing volume mesh,
specifying material properties and thermal boundary conditions within the SI unit system,
configuring appropriate solver models for both fluid dynamics and heat conduction in a solid,
and submitting the simulation case for computation.

.. literalinclude:: ../../../../../Flow360/examples/advanced_simulations/heat_transfer/cht_solver.py
  :language: python
  :linenos:

Notes
=====

- This example showcases a CHT simulation, coupling fluid flow (Navier-Stokes) and solid heat conduction (Heat Equation) solvers.
- The ``fl.Solid`` model is employed to define the solid domain, its material properties (``fl.SolidMaterial``), and internal heat generation (``volumetric_heat_source``).
- Thermal boundary conditions are specified, including an adiabatic wall condition using ``fl.HeatFlux(0)``.
