interTempFoam#

Description#

interTempFoam is a transient WashOpenFOAM solver designed for two incompressible, immiscible fluids with heat transfer. It combines the Volume of Fluid (VOF) method for phase fraction tracking with an energy equation to model temperature distribution across liquid-liquid or liquid-gas interfaces.

The solver supports temperature-dependent viscosity models such as powerLawTemperature to capture temperature-dependent fluid rheology and heat transfer dynamics. It is particularly suited for thermal multiphase applications such as boiling, condensation, multiphase heat exchange, and thermal capillary flows where surface tension and temperature-dependent viscosity changes occur simultaneously.

Mathematical Formulation#

The solver tracks the time evolution of the fluid velocity field U, pressure p, phase fraction alpha (e.g., alpha.water), and temperature T.

Continuity Equation:

\[\nabla \cdot \mathbf{U} = 0\]

Phase Fraction Equation (VOF Method):

The interface tracking relies on the standard Volume of Fluid (VOF) formulation with an artificial compression term:

\[\frac{\partial \alpha}{\partial t} + \nabla \cdot (\mathbf{U} \alpha) + \nabla \cdot (\mathbf{U}_r \alpha (1 - \alpha)) = 0\]

where:

  • \(\alpha\) is the volume fraction of Phase 1 (0 to 1).

  • \(\mathbf{U}\) is the mixture velocity vector.

  • \(\mathbf{U}_r = \mathbf{U}_1 - \mathbf{U}_2\) is the relative compression velocity vector.

Momentum Equation:

\[\frac{\partial (\rho \mathbf{U})}{\partial t} + \nabla \cdot (\rho \mathbf{U} \mathbf{U}) = -\nabla p + \nabla \cdot (\mu (\nabla \mathbf{U} + (\nabla \mathbf{U})^T)) + \mathbf{f}_\sigma + \rho \mathbf{g}\]

where:

  • \(\mathbf{f}_\sigma = \sigma \kappa \nabla \alpha\) is the surface tension force per unit volume evaluated using the Continuum Surface Force (CSF) model (\(\kappa\) is the interface curvature).

  • \(\rho\) and \(\mu\) are the mixture density and dynamic viscosity:

\[\rho = \alpha \rho_1 + (1 - \alpha) \rho_2, \quad \mu = \alpha \mu_1 + (1 - \alpha) \mu_2\]

Energy (Temperature) Equation:

\[\frac{\partial (\rho C_p T)}{\partial t} + \nabla \cdot (\rho C_p \mathbf{U} T) = \nabla \cdot (\kappa \nabla T)\]

where:

  • \(T\) is the temperature field.

  • \(C_p = \frac{\alpha \rho_1 C_{p,1} + (1 - \alpha) \rho_2 C_{p,2}}{\rho}\) is the effective specific heat capacity.

  • \(\kappa = \alpha \kappa_1 + (1 - \alpha) \kappa_2\) is the effective thermal conductivity.

Power-Law Temperature Viscosity Model:

When using the powerLawTemperature transport model, the kinematic viscosity \(\nu\) is calculated as a function of temperature \(T\) and strain rate \(\dot{\gamma}\):

\[\nu = \max \left( \nu_{\min}, \, \min \left( \nu_{\max}, \, k \exp \left( \frac{B}{T} \right) \dot{\gamma}^{\,n - 1} \right) \right)\]

where:

  • \(k\) is the consistency index (k).

  • \(B\) is the temperature activation coefficient (B).

  • \(T\) is the fluid temperature (T).

  • \(\dot{\gamma}\) is the strain rate magnitude.

  • \(n\) is the power-law index (n).

  • \(\nu_{\min}\) and \(\nu_{\max}\) are the minimum and maximum viscosity bounds (nuMin, nuMax).

Usage#

To configure interTempFoam, you must define the velocity, pressure, phase fraction, temperature, and associated transport and thermal properties.

1. Required Fields (0/ directory)

  • U: The fluid mixture velocity field.

  • p_rgh: The pseudo-hydrostatic pressure field.

  • alpha.water: The phase fraction field for Phase 1.

  • T: The temperature field.

2. Transport & Thermal Properties (constant/transportProperties)

To accurately account for thermal effects on fluid viscosity, the powerLawTemperature viscosity model should be specified under transportModel for temperature-dependent fluid phases. You must also specify physical properties such as density (rho), specific heat capacity (cp), thermal conductivity (kappa), and surface tension (sigma).

// constant/transportProperties

phases (water air);

water
{
    transportModel  powerLawTemperature;
    powerLawTemperatureCoeffs
    {
        nuMax           nuMax [0 2 -1 0 0 0 0] 5e-01;
        nuMin           nuMin [0 2 -1 0 0 0 0] 3e-04;
        k               k [0 2 -1 0 0 0 0] 2.82e-06;
        B               B [0 0 0 1 0 0 0] 2845;
        n               n [0 0 0 0 0 0 0] 0.45;
    }
    rho             rho [1 -3 0 0 0 0 0] 1460;
    cp              cp [0 2 -2 -1 0 0 0] 4180;
    kappa           kappa [1 1 -3 -1 0 0 0] 0.6;
}

air
{
    transportModel  Newtonian;
    nu              nu [0 2 -1 0 0 0 0] 1.48e-05;
    rho             rho [1 -3 0 0 0 0 0] 1;
    cp              cp [0 2 -2 -1 0 0 0] 1005;
    kappa           kappa [1 1 -3 -1 0 0 0] 0.026;
}

sigma           sigma [1 0 -2 0 0 0 0] 0.07;

3. Solver Configuration (system/controlDict)

// system/controlDict
application     interTempFoam;
startFrom       startTime;
startTime       0;
stopAt          endTime;
endTime         10;
deltaT          0.0001;
writeControl    timeStep;
writeInterval   100;

4. Discretisation Schemes (system/fvSchemes)

Appropriate numerical schemes must be specified for div(phi,alpha), div(phir,alpha), and div(rho*phi*Cp,T).

Tutorials#

Example tutorial cases demonstrating interTempFoam are available in:

  • tutorials/multiphase/interTempFoam/damBreakViscosity-Temperature: Dam-break flow with temperature-dependent viscosity modeling.

  • tutorials/multiphase/interTempFoam/damBreakWithObstacleViscosity-Temperature: Dam-break flow around a solid obstacle with temperature-dependent rheology.