u/Duarte_1327

▲ 4 r/CFD

Cyclic fan asymmetry in buoyantSimpleFoam

I am working on an OpenFOAM v2412 simulation using buoyantSimpleFoam for an ODAF transformer cooling setup with porous media radiators and internal radiator fans.

The fans are modeled as internal baffles created with createBaffles and implemented using cyclic + fan boundary conditions.

After a lot of debugging, I found that placing the fan condition in p_rgh instead of p was critical. Before that, the fans produced almost no flow (phi ~1e-4). After moving the fan BC to p_rgh, the flow magnitude became physically reasonable.

Current setup:

In p_rgh:

ventoinhas_master
{
    type            fan;
    patchType       cyclic;
    phi             phi;
    rho             rho;
    uniformJump     false;

    jumpTable       table
    (
        (0.0000 180)
        (0.0833 161)
        (0.1389 144)
        (0.2083 126)
        (0.2778 106)
        (0.3333  92)
        (0.4167  86)
        (0.5000  82)
        (0.5556  70)
        (0.6250  59)
        (0.6944  46)
        (0.7778  32)
        (0.8333  17)
        (0.9167   0)
    );

    value uniform 101325;
}

ventoinhas_slave
{
    type cyclic;
}

The simulation converges correctly and continuity errors remain low.

Boundary file:

ventoinhas_master
{
    type            cyclic;
    nFaces          575;
    startFace       8167426;
    matchTolerance  0.0001;
    transform       unknown;
    neighbourPatch  ventoinhas_slave;
}

ventoinhas_slave
{
    type            cyclic;
    nFaces          575;
    startFace       8168001;
    matchTolerance  0.0001;
    transform       unknown;
    neighbourPatch  ventoinhas_master;
}

The strange part is the fan flow monitoring.

I added:

operation sum;
fields (phi);

and also:

operation sumMag;
fields (phi);

Results near convergence:

surfaceFieldValue flowFanMaster write:
    sum(ventoinhas_master) of phi = 0.747326

surfaceFieldValue flowFanSlave write:
    sum(ventoinhas_slave) of phi = -0.483340

surfaceFieldValue flowFanMasterAbs write:
    sumMag(ventoinhas_master) of phi = 0.747326

surfaceFieldValue flowFanSlaveAbs write:
    sumMag(ventoinhas_slave) of phi = 0.489628

So:

  • the flow is now physically significant
  • but master/slave do not balance
  • and even sumMag(phi) differs considerably between the two sides

Additionally:

  • the velocity field near the fans still looks very tangential/chaotic instead of a clean axial jet
  • glyphs near the fan surfaces do not look strongly normal to the disks
  • Uz shows mixed structures around the fans

What I am trying to understand is:

  1. Is this asymmetry between master/slave expected for fan + cyclic in buoyantSimpleFoam?
  2. Can surfaceFieldValue report misleading values on internal cyclic fan patches?
  3. Could this be related to:
    • transform unknown
    • fan being applied only on one side
    • parallel decomposition
    • or an issue with createBaffles/cyclic implementation?
  4. Has anyone successfully implemented physically realistic internal axial fans using fan + cyclic in buoyantSimpleFoam?

At this point I am considering creating a completely isolated minimal fan test case to determine whether the issue comes from the fan implementation itself or from interaction with the porous radiator domain.

reddit.com
u/Duarte_1327 — 3 days ago
▲ 2 r/CFD

BuoyantSimpleFoam cyclic fan setup: airflow parallel to fan disks instead of normal

Hi everyone,

I'm working on an OpenFOAM v2412 simulation using buoyantSimpleFoam for an ODAF transformer cooling setup using porous media method.

The radiator fans are modeled as internal fan disks created with createBaffles. Initially I used separate patches with a pressure jump / fanPressure type approach, but the airflow became extremely concentrated only near the fans and had almost no effect further downstream. Additionally, the flow was not consistent between the two sides of each fan.

Because of that, I switched to a cyclic fan setup.

Current setup:

  • fan faces created using createBaffles
  • both fan patches set as type cyclic
  • in all fields (U, T, k, epsilon, etc.) the fan patches are also cyclic
  • only the pressure field uses the fan condition

In p the fan patches are defined like this:

ventoinhas_master
{
    type            fan;
    patchType       cyclic;
    jumpTable       table
    (
        (0.0000 180)
        (0.0833 161)
        (0.1389 144)
        (0.2083 126)
        (0.2778 106)
        (0.3333  92)
        (0.4167  86)
        (0.5000  81)
        (0.5556  70)
        (0.6250  58)
        (0.6944  46)
        (0.7778  32)
        (0.8333  17)
        (0.9167   0)
    );
    value           uniform 0;
}

ventoinhas_slave
{
    type            cyclic;
}

The simulation converges correctly and continuity errors are low, but physically the airflow through the fan disks looks wrong.

The fan disks are approximately in the XY plane, so I expect the airflow to be mostly normal to the disks (mainly Z direction).
However, in ParaView the velocity vectors near the fans are mostly tangential/parallel to the fan surfaces instead of axial.

I attached:

  • velocity magnitude
  • U_z field
  • velocity glyphs near the fan disks

Another thing that confuses me is the fan flow values.

The values are equal and opposite between master/slave, which seems correct from a continuity perspective:

Time = 1324

DILUPBiCGStab:  Solving for h, Initial residual = 0.000102319, Final residual = 1.00094e-06, No Iterations 2
GAMG:  Solving for p_rgh, Initial residual = 0.000843768, Final residual = 3.45797e-06, No Iterations 3
time step continuity errors : sum local = 3.8296e-07, global = 1.55057e-07, cumulative = 0.00194364
rho min/max : 1.11913 1.17641
DILUPBiCGStab:  Solving for epsilon, Initial residual = 9.63583e-05, Final residual = 8.84674e-08, No Iterations 1
DILUPBiCGStab:  Solving for k, Initial residual = 0.000517782, Final residual = 9.87591e-07, No Iterations 1
ExecutionTime = 5651.71 s  ClockTime = 5652 s

surfaceFieldValue flowFanMaster write:
    sum(ventoinhas_master) of phi = -9.96072e-05

surfaceFieldValue flowFanSlave write:
    sum(ventoinhas_slave) of phi = 9.96072e-05

Time = 1325

DILUPBiCGStab:  Solving for h, Initial residual = 0.000102407, Final residual = 5.94605e-07, No Iterations 2
GAMG:  Solving for p_rgh, Initial residual = 0.000833613, Final residual = 6.23754e-06, No Iterations 2
time step continuity errors : sum local = 6.91063e-07, global = 3.53538e-07, cumulative = 0.00194399
rho min/max : 1.11914 1.17641
DILUPBiCGStab:  Solving for epsilon, Initial residual = 9.63716e-05, Final residual = 8.83657e-08, No Iterations 1
DILUPBiCGStab:  Solving for k, Initial residual = 0.000517957, Final residual = 9.84893e-07, No Iterations 1
ExecutionTime = 5655.93 s  ClockTime = 5656 s

surfaceFieldValue flowFanMaster write:
    sum(ventoinhas_master) of phi = -9.98109e-05

surfaceFieldValue flowFanSlave write:
    sum(ventoinhas_slave) of phi = 9.98109e-05

Time = 1326

DILUPBiCGStab:  Solving for h, Initial residual = 0.000102319, Final residual = 6.31418e-07, No Iterations 2
GAMG:  Solving for p_rgh, Initial residual = 0.000853322, Final residual = 7.16942e-06, No Iterations 2
time step continuity errors : sum local = 7.94499e-07, global = 3.13998e-07, cumulative = 0.00194431
rho min/max : 1.11915 1.17641
DILUPBiCGStab:  Solving for epsilon, Initial residual = 9.63763e-05, Final residual = 8.8294e-08, No Iterations 1
DILUPBiCGStab:  Solving for k, Initial residual = 0.000518071, Final residual = 9.86749e-07, No Iterations 1
ExecutionTime = 5660.16 s  ClockTime = 5660 s

surfaceFieldValue flowFanMaster write:
    sum(ventoinhas_master) of phi = -0.000100015

surfaceFieldValue flowFanSlave write:
    sum(ventoinhas_slave) of phi = 0.000100015

but the actual flow magnitude through the fans is extremely small, and visually the airflow does not resemble a fan jet at all.

I also noticed that in the generated boundary file the cyclic patches show:

transform unknown;

Could this indicate a wrong cyclic orientation or pairing?

At this point I'm mainly trying to understand:

  • why the airflow is not normal to the fan disks
  • whether the cyclic/fan setup is fundamentally wrong
  • whether I may have incorrect face normals or cyclic transforms
  • or if I am missing some important step when implementing internal fans in OpenFOAM

Any suggestions would be greatly appreciated.

reddit.com
u/Duarte_1327 — 7 days ago
▲ 5 r/CFD

Help with fanPressure and createBaffles fan modelling in OpenFOAM

Hi everyone,

I am working on an OpenFOAM v2412 simulation using buoyantSimpleFoam for an ODAF transformer radiator cooling system. The radiators are modeled as porous media using Darcy–Forchheimer (fvOptions), and the fans are represented using fanPressure on internal baffles.

The geometry and mesh were created in Salome and imported with ideasUnvToFoam. The fan surfaces were originally internal disk faces, grouped into a faceZone, and then converted into baffles using createBaffles.

My createBafflesDict is:

FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      createBafflesDict;
}

internalFacesOnly true;

baffles
{
    ventoinhas
    {
        type        faceZone;
        zoneName    ventoinhas;

        patches
        {
            master
            {
                name    ventoinhas_side1;
                type    patch;
            }

            slave
            {
                name    ventoinhas_side2;
                type    patch;
            }
        }
    }
}

The simulation is now stable and converging, but I still have doubts about whether the fans are being modeled correctly physically.

Current setup:

  • Internal fan disks converted into baffles
  • fanPressure applied only on one side of the baffle
  • zeroGradient on the opposite side
  • pressureInletOutletVelocity for U on both fan patches

Example:

ventoinhas_side1
{
    type        fanPressure;
    direction   out;
    p0          uniform 101325;
    value       uniform 101325;

    fanCurve    table
    (
        (0.0000 180)
        (0.0833 161)
        (0.1389 144)
        (0.2083 126)
        (0.2778 106)
        (0.3333  92)
        (0.4167  86)
        (0.5000  81)
        (0.5556  70)
        (0.6250  58)
        (0.6944  46)
        (0.7778  32)
        (0.8333  17)
        (0.9167   0)
    );
}

ventoinhas_side2
{
    type zeroGradient;
}

The fan curve was converted from a manufacturer curve in m³/h to m³/s.

The confusing part is:

  • The flow direction now looks mostly correct visually
  • But contours of U_z and mag(U) still look strange near the fans
  • The velocity field becomes almost homogeneous far from the fans
  • Some glyph vectors still point locally in the opposite direction

I also measured phi on both fan patches using surfaceFieldValue:

sum(ventoinhas_side1) of phi ≈ 0.95
sum(ventoinhas_side2) of phi ≈ 0.64

which seems suspicious to me because both sides of the same baffle do not match closely.

So my main questions are:

  1. What is the physically correct/recommended way to model axial fans in OpenFOAM using fanPressure?
  2. Should fanPressure be applied only on one side of the baffle or both?
  3. Is using createBaffles + fanPressure still considered a valid approach, or are there better alternatives in OpenFOAM?
  4. Should the flow rates through both sides of the baffle match exactly?
  5. Could this issue instead be caused by my boundary conditions or some other configuration files?

Any advice or examples from similar HVAC / electronics cooling / radiator cooling simulations would help a lot.

Thanks!

reddit.com
u/Duarte_1327 — 8 days ago
▲ 4 r/CFD

Mass and energy conservation analysis

Hi, I am working with OpenFOAM v2412 using buoyantSimpleFoam. I am simulating the cooling of radiators with fans using a porous media approach. The simulation is converging, but I would like to verify whether the solution is reaching a proper mass and energy balance.

What would be the recommended way to check mass conservation and energy conservation in this type of steady-state thermal simulation, am I missing something?

reddit.com
u/Duarte_1327 — 11 days ago