FoamFile
{
    format      ascii;
    class       dictionary;
    object      topoSetDict;
}

actions
(
    // Heater Zone (c0)
    {
        action  new;
        type    cellSet;
        name    c0;
        source  boxToCell;
        sourceInfo
        {
            box (-0.01 -0.01 0) (0.01 0.01 0.01);
        }
    }
    {
        action  new;
        type    cellZoneSet;
        name    heater;
        source  setToCellZone;
        sourceInfo
        { set c0; }
    }

    // Metal Zone (c1)
    {
        action  new;
        type    cellSet;
        name    c1;
        source  boxToCell;
        sourceInfo
        {
            box (-0.025 -0.015 0) (0.025 0.015 0.01);
        }
    }
    // Create a temporary set for heater region to exclude
    {
        action  new;
        type    cellSet;
        name    tempHeater;
        source  boxToCell;
        sourceInfo
        {
            box (-0.01 -0.01 0) (0.01 0.01 0.01);
        }
    }
    // Invert tempHeater (select all cells NOT in heater)
    {
        action  invert;
        type    cellSet;
        name    tempHeater;
    }
    // Intersect c1 with inverted tempHeater (c1 AND NOT tempHeater)
    {
        action  subset;
        type    cellSet;
        name    c1;
        source  cellToCell;
        sourceInfo
        { set tempHeater; }
    }
    {
        action  new;
        type    cellZoneSet;
        name    metal;
        source  setToCellZone;
        sourceInfo
        { set c1; }
    }

    // Fluid Zone (c2)
    {
        action  new;
        type    cellSet;
        name    c2;
        source  boxToCell;
        sourceInfo
        {
            box (-0.1 -0.1 0) (0.1 0.1 0.01);
        }
    }
    // Create a temporary set for metal region to exclude
    {
        action  new;
        type    cellSet;
        name    tempMetal;
        source  boxToCell;
        sourceInfo
        {
            box (-0.025 -0.015 0) (0.025 0.015 0.01);
        }
    }
    // Invert tempMetal (select all cells NOT in metal)
    {
        action  invert;
        type    cellSet;
        name    tempMetal;
    }
    // Intersect c2 with inverted tempMetal (c2 AND NOT tempMetal)
    {
        action  subset;
        type    cellSet;
        name    c2;
        source  cellToCell;
        sourceInfo
        { set tempMetal; }
    }
    {
        action  new;
        type    cellZoneSet;
        name    fluid;
        source  setToCellZone;
        sourceInfo
        { set c2; }
    }
);