MATLAB Code for Numerical Simulation and Visualization of 2D Inclined Viscous-Gravity Flow with Nonlinear Boundary Conditions

Published: 15 January 2026| Version 1 | DOI: 10.17632/66mb3pg92w.1
Contributors:
,

Description

This dataset contains a complete MATLAB script for simulating and visualizing a steady, two-dimensional flow of a viscous fluid down an inclined plane under the influence of gravity. The model implements an analytical-numerical solution incorporating nonlinear (quadratic) boundary conditions for the surface velocity. Key features include: computation of velocity component profiles (Vx, Vy), analysis of dimensionless parameters (Reynolds and Froude numbers), advanced streamline tracing using the stream2 function, and investigation of flow phenomena such as flow reversal and particle trajectories. The code is self-contained, fully commented, and designed for reproducibility. It serves as a valuable tool for research and education in computational fluid dynamics, stability analysis of stratified flows, and applied mathematics.

Files

Steps to reproduce

Prerequisites: MATLAB (R2018b or later) must be installed on your computer. Data Access: Download the single MATLAB script file MATLAB_2D_InclinedViscousFlow_NonlinearBC.m from this dataset. Execution: Open MATLAB, navigate to the file location, and run the script by either: Typing the filename (without .m) in the Command Window Clicking the "Run" button in the MATLAB Editor Output: The code will automatically generate three main figures: Figure 1: Basic velocity profiles showing Vx for different Y positions, Vy profile, and parameter sensitivity studies Figure 2: Streamline patterns computed using MATLAB's stream2 function Figure 3: Advanced flow analysis including curvature, divergence, and particle trajectories Parameter Modification: To explore different flow regimes, modify parameters in the "System Parameters" section of the code (lines 5-40). Key adjustable parameters include: Layer thickness (h) and inclination angle (alpha) Boundary velocity components and gradients (W, Omega, Gamma) Pressure gradients (p1, p2) Reynolds number range (Re_vals) Froude number range (Fr_vals) Custom Analysis: For specific studies, modify the auxiliary functions at the end of the file to compute additional flow characteristics. Results Saving: Figures can be saved manually using MATLAB's "Save As" option or by modifying the script to include automatic figure export commands.

Institutions

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

Categories

Engineering, Applied Mathematics, Numerical Analysis, Computational Physics, Fluid Mechanics

Licence