🔥 Underfloor Heating System

Circular pipe modeling, convective heat transfer, mesh integration.

Overview

ThermX supports modeling of underfloor heating (and cooling) systems using circular pipes embedded in flooring materials. The system calculates convective heat transfer from the fluid to surrounding materials.

Pipe Model

CircularPipe Interface

interface CircularPipe {
  id: string;              // UUID
  centre: [number, number];// Centre coordinates (metres)
  outerDiameter: number;   // Including wall and insulation (metres)
  wallThickness: number;   // Pipe wall thickness (metres)
  wallMaterialId: string;  // Material ID for pipe material
  fluidMaterialId: string; // Material ID for fluid inside
  inletTemp: number;       // Inlet fluid temperature (°C)
  flowRate: number;        // Volumetric flow rate (m³/s)
}

Geometry

Each pipe is represented as two concentric circles:

        Outer circle
            ┌─────┐
            │ ███ │  ← Pipe wall
            │ ███ │
            │ ███ │  ← Fluid core
            │ ███ │
            └─────┘
         Inner circle

Inner diameter = Outer diameter - 2 × Wall thickness

Example: 20mm outer diameter with 2mm wall thickness:

Thermal Analysis

Convective Heat Transfer

Heat transfer from the pipe fluid to surrounding materials is modeled using the convection equation:

Q = h · A · ΔT

Where:

Nusselt Number & Flow Regime

The convective coefficient is determined from:

h = Nu · k / D

Where:

Correlations depend on flow regime:

Mesh Generation

Pipes are meshed into small line segments for integration into the 2D FEM domain:

  1. Calculate pipe circle (outer boundary)
  2. Subdivide circle into mesh edges (typically 16–32 segments)
  3. Create inner fluid region (constrained Delaunay triangulation)
  4. FEM solver treats pipe as boundary condition or volume element

API Reference

CircularPipe Type

Located in src/model/pipes.ts. Create a pipe with the following properties:

const pipe: CircularPipe = {
  id: 'pipe-1',
  centre: [1.5, 0.5],      // 1.5m from left, 0.5m from bottom
  outerDiameter: 0.020,    // 20mm
  wallThickness: 0.002,    // 2mm
  wallMaterialId: 'plastic',
  fluidMaterialId: 'water',
  inletTemp: 40,           // 40°C
  flowRate: 0.0001         // 100 mL/s
};

Convective Heat Transfer Function

Calculate convective coefficient from pipe properties:

export function calculateConvectiveCoefficient(
  flowRate: number,        // m³/s
  innerDiameter: number,   // m
  fluidConductivity: number // W/(m·K)
): number // Returns h in W/(m²·K)

Adding Pipes to Your Model

Steps

  1. Create a CircularPipe object with geometry and thermal properties
  2. Add pipe to project via project.circularPipes.push(pipe)
  3. Ensure wall and fluid materials exist in project.materials
  4. Set boundary conditions on pipe edges if needed
  5. Run FEM solver — pipe convection is automatically integrated

Example Workflow

// Define pipe system parameters
const pipes = [
  { centre: [1.0, 0.5], flowRate: 0.0001 },
  { centre: [2.0, 0.5], flowRate: 0.0001 },
  { centre: [3.0, 0.5], flowRate: 0.0001 }
];

// Create pipe objects
pipes.forEach((spec, idx) => {
  const pipe: CircularPipe = {
    id: `pipe-${idx}`,
    centre: spec.centre,
    outerDiameter: 0.020,
    wallThickness: 0.002,
    wallMaterialId: 'pe-pipe',
    fluidMaterialId: 'water',
    inletTemp: 40,
    flowRate: spec.flowRate
  };
  project.circularPipes.push(pipe);
});

// Solve and visualize results
const solution = await solve(project);
displayResults(solution);

Typical Applications

Limitations

Future Enhancements