MATLAB code for the exact solution of viscous dissipative Oberbeck–Boussinesq equations: Ostroumov–Birikh flow generalization

Published: 14 January 2026| Version 1 | DOI: 10.17632/fyt9bwdf5g.1
Contributors:
,

Description

This repository contains a complete MATLAB software package for computing and visualizing an exact analytical solution to the Oberbeck-Boussinesq equations for viscous, incompressible fluid flow. The solution generalizes the classical Ostroumov-Birikh type flow by fully incorporating the effects of viscous dissipation (via the Rayleigh dissipation function) and an external pressure gradient. The core achievement of this code is the calculation of a three-dimensional temperature field generated solely by viscous heating, even under isothermal boundary conditions and in the absence of external temperature gradients. The velocity field is linear in the transverse coordinate, while the induced temperature field has a quadratic structure. Key functionalities of the software include: Calculation of steady-state velocity and temperature fields based on user-defined physical, geometrical, and boundary parameters. Support for custom fluid properties (viscosity, thermal diffusivity, heat capacity). Automatic derivation of all integration constants from the specified boundary conditions. Comprehensive visualization: profiles of velocity components and temperature modes, 2D contour plots, and 3D surface plots of the temperature distribution across the fluid layer. Built-in verification of boundary condition satisfaction and calculation of integral flow characteristics (maximum/average temperature, dissipation power). The package serves as a valuable tool for validating CFD solvers, analyzing thermal effects in microfluidic and shear flows, and for educational purposes in advanced fluid dynamics and heat transfer courses.

Files

Steps to reproduce

Open MATLAB (version R2023a or later recommended). Place the provided script file in a new folder. Run the script directly — no additional input files or toolboxes are required. The program will automatically compute the exact solution using physical parameters for glycerol at 20 °C (density, viscosity, thermal conductivity, etc.). Four figures will appear: (a) velocity profiles, (b) temperature components along the vertical coordinate, (c) 3D surface of the full temperature field, and (d) contour plot with isolines. Numerical results (maximum and mean temperature, dissipation power, boundary condition residuals) are printed in the command window. To adapt the code for another fluid, modify the physical parameters in Section 1 of the script. To change flow conditions (layer thickness, pressure gradient, boundary velocities), edit the corresponding values in Section 2. All calculations are fully deterministic and reproducible; no random number generation or iterative solvers are used.

Institutions

  • Samara State Technical University
  • Ural'skij federal'nyj universitet imeni pervogo Prezidenta Rossii B N El'cina

Categories

Software, Computational Physics, Fluid Dynamics, Heat Transfer, Mathematical Software, Continuum Mechanics

Licence