FDLIB

FDLIB is a comprehensive software library of FORTRAN 77 (compatible with FORTRAN 90) Matlab, C++, and other codes, covering a broad spectrum of fundamental and applied topics in fluid dynamics. The codes are suitable for self-study, classroom instruction, and fundamental or applied research. The utility subroutines and simulation programs of FDLIB are pertinent to a variety of disciplines in science and engineering including applied mathematics and scientific computing, computational physics, biomechanics, aerospace engineering, mechanical engineering, chemical engineering, electrical engineering, and bioengineering. FDLIB is the counterpart of the standard numerical-methods software libraries offerred by IMSL and NAG.

FDLIB Directories

The thirteen main directories of FDLIB are listed in the following table: please click on a subject for an extended description:

Numerical methods 01_num_meth
Grids 02_grids
Hydrostatics 03_hydrostat
Various solutions 04_various
Lubrication flows 05_lub
Stokes flow 06_stokes
Potential flow 07_ptf
Hydrodynamic stability 08_stab
Vortex motion 09_vortex
Boundary-layer flows 10_bl
Finite-difference methods 11_fdm
Boundary-element methods 12_bem
Turbulence 13_turbo

Each main directory contains utility subroutines and simulation programs. The utility subroutines are general-purpose computational modules. The simulation programs are computational engines that drive various simulations.

Public FDLIB

A subset of FDLIB resides in the public domain, and is available subject to the terms of the lesser GNU license agreement.

FDLIB 08.01, April, 2008 View and download the source code

To unravel the tar file, issue the Unix command: tar xf FDLIB.tar
To unravel the zip file, issue the Unix commnnd: tar xzf FDLIB.zip

General information

A distinguishing feature of FDLIB is that the utility subroutines and simulation programs are compact, specialized, and modular, written in the spirit of well-known general-purpose libraries on numerical methods offered, for example, by IMSL, NAG, and MATLAB.

FDLIB is not a Computational Fluid Dynamics (CFD) library, in the conventional sense of the term. Instead of offering a large memory-demanding program with many options based on one particular numerical method, FDLIB offers instead a host of small- and medium-sized programs that implement a variety of methods. The execution of the programs requires only a modest amount of computer memory, and the simulations may run on laptop and inexpensive desktop computers.

The intelligent use of the programs requires at least an undergraduate-level understanding of applied mathematics, fluid dynamics, and numerical methods. FDLIB should not be treated as a black box, neither it should be regarded as a device that can be used without a basic understanding of its foundation.

The FORTRAN codes of FDLIB are written in standard FORTRAN 77, which is a subset of FORTRAN 90), for compilers that support the END DO extension and allow for in-line comments following an exclamation. With proper compilation, as stated in the UNIX makefiles, the programs and subroutines should run on any hardware platform.

The input data are either read from input files (preferred method), or entered from the keyboard in an interactive session. The output is placed in output files in tabular format, so that they can be processed and displayed using a graphics, visualization, or animation package of choice. The format of the output data can be readily modified in the source code

Documentation

An in-depth discussion of the mathematical formulation and numerical methods, along with the User Guide of selected directories of FDLIB, can be found in the books: Other related and highly-recommended books are:

All of these books are an excellent value with a high information to $ ratio. If you use the software, consider buying these books or ordering them through your library to endorse the publishers and encourage the further development of the software.

A partial User Guide for directories 08_stab stability and 12_bem bem is available.

CFDLAB

A subset of FDLIB has been combined with the fabulous X11 graphics library vogle into the interactive graphics and animation software package CFDLAB.

BEMLIB

Selected directories of FDLIB have been arranged in the boundary-element software library BEMLIB

FDLIB Directories

Public subdirectories are checked in the first column. CFDLAB implementations are checked in the fourth column. The host BEMLIB directory is indicated in the fifth column.

Directory: 01_num_meth

This directory contains a suite of programs and subroutines accompanying the second edition of the book by C. Pozrikidis, Numerical Computation in Science and Engineering, Oxford University Press (2008).

Subdirectory Subject CFDLAB BEMLIB
✓ 01_num_comp Numerical computation. num_meth
✓ 02_lin_calc Numerical linear algebra and calculus. num_meth
✓ 03_lin_eq Linear equations. num_meth
✓ 04_nl_eq Nonlinear equations. num_meth
✓ 05_eigen Algebraic eigenvalue problems. num_meth
✓ 06_interp_diff Interpolation and differentiation. num_meth
✓ 07_integration Numerical integration. num_meth
✓08_approximation Function approximation and Fourier series. num_meth
✓ 09_ode Ordinary differential equations. num_meth
✓ 10_ode_ddm Ordinary differential equations; domain discretization methods. num_meth
✓ 11_pde_diffusion Partial differential equations; unsteady diffusion equation. num_meth
✓ 12_pde_poisson Partial differential equations; Poisson equation. num_meth
✓ 13_pde Partial differential equations; convection-diffusion equation. num_meth
✓ 14_bem Boundary-element methods. num_meth
✓ 15_fem Finite-element methods. num_meth
✓ 99_spec_fnc Special functions. num_meth

Directory: 02_grids

This directory contains programs and subroutines that perform adaptive discretization and parametrization, and meshing of two-and three-dimensional lines, and planar or three-dimensional surfaces.

Subdirectory Subject CFDLAB BEMLIB
✓ grid_2d Discretization of a planar line into a collection of straight or circular elements with corresponding shapes. grids
✓ prd_2d Adaptive parametrization of a closed line in the xy plane. grids
 prd_2d_qs Adaptive parametrization of a closed planar line with symmetry with respect to two planes.
&ensp prd_2d_pr Adaptive parametrization of a periodic planar line.
  prd_2d_pr_hs Adaptive parametrization of a periodic planar line with symmetry with respect to the mid-plane.
&ensp prd_3d Adaptive parametrization of a closed three-dimensional line.
&ensp prd_3d_pr Adaptive parametrization of a periodic three-dimensional line.
✓ prd_ax Adaptive representation of a line beginning and ending at the x axis. The line is regarded as the trace of a surface of revolution in a meridional plane, generated by rotating the line around the x axis. BEMLIB: grids grids
&ensp prd_ax_cl Adaptive representation of a closed line. The line is regarded as the trace of a toroidal surface in a meridional plane.
  prd_ax_hs Adaptive representation of a line beginning and ending at the x axis , with plane-reflection symmetry with respect to the x=0 plane.
  prd_ax_pr Adaptive representation of a periodic line representing the trace of an axisymmetric periodic surface in a meridional plane.
&ensp prd_ax_pr_hs Adaptive representation of a periodic line representing the trace of an axisymmetric periodic surface in a meridional plane, with plane-reflection symmetry with respect to the x=0 plane.
✓ rec_2d Interpolation and numerical differential of the velocity field through a two-dimensional rectangular grid, based on data provided at the grid nodes. Computation of the velocity gradient tensor, rate of deformation tensor and its eigenvalues and eigenvectors, vorticity and vorticity tensor.
✓ rec_2d_strml Interpolation and computation of streamlines and velocity vector field from data prescribed on a two-dimensional rectangular grid.
&ensp sm_3d_df Smoothing by diffusion of a function defined over a closed surface described by triangulation.
&ensp sm_3d_tr Smoothing by spectrum truncation of a function defined over a closed surface described by triangulation.
✓ trgl Triangulation of a closed surface into an unstructured mesh of six-node curved triangular elements generated by the successive subdivisions of an octahedron or icosahedron. grids
&ensp trgl_sqr Triangulation of a square patch into a structured grid of six-node plane triangular elements based on the successive subdivisions of an eight-element pattern.

Directory: 03_hydrostat

This directory contains programs that compute hydrostatic shapes.

Subdirectory Subject CFDLAB BEMLIB
✓ drop_2d A two-dimensional sessile or pendant bubble or drop resting on a horizontal plane.
✓ drop_2di A two-dimensional sessile or pendant bubble or drop resting on an inclined plane.
&ensp drop_3d A three-dimensional sessile or pendant bubble or drop resting on a plane.
✓ drop_ax An axisymmetric sessile or pendant bubble or drop resting on a horizontal plane.
✓ flsphere A sphere floating on the interface between two immiscible fluids.
✓ men_2d A meniscus between two paralel plates.
✓men_2d_plate A semi-infinite meniscus originating from an inclined plate.
✓ men_3d An infinite meniscus outside an elliptical contact line.
✓ men_ax A meniscus inside a vertical circular tube.

Directory: 04_various

This directory contains programs and subroutines that generate various solutions to the equations of steady and unsteady incompressible Newtonian flow. The solutions are obtained by evaluating analytical expressions, or by computing numerical solutions of ordinary and simple partial-differential equations.

Subdirectory Subject CFDLAB BEMLIB
✓ chan_2d Unidirectional Couette-Poiseuille flow through a two-dimensional channel.
✓ chan_2d_2l Unidirectional Couette-Poiseuille flow of two superimposed layers through a two-dimensional channel.
✓chan_2d_imp Transient flow flow in a channel confined between two parallel plane walls, due to the sudden translation of one wall parallel to itself with constant velocity.
chan_2d_ml Flow of an arbitrary number of superimposed layers through a two-dimensional channel.
✓ chan_2d_osc Time-periodic Couette flow in a channel confined between two parallel plane walls,
due to the in-plane oscillations of one of the walls.
✓chan_2d_trans Transient flow in a channel confined between two parallel plane walls, due to the sudden application of a constant pressure gradient.
✓ chan_2d_wom Time-periodic flow in a channel confined between two parallel plane walls, due to an oscillatory pressure gradient.
✓ chan_brush Flow through a semi-infinite rectangular strip modeling the unit cell of a paint brush.
film Flow of a film down an inclined plane.
films Flow of an arbitrary number of superimposed layers down an inclined plane.
flow_1d Steady, unidirectional, pressure- and gravity-driven flow through a tube with arbitrary cross-section. The main program solves an integral equation for the distribution of the boundary shear stress using a boundary-element method, and computes the velocity at a specified point. laplace
flow_1d_1p Steady, unidirectional, shear flow over a periodic array of cylinders or periodic wall with arbitrary cross-section. The main program solves an integral equation for the distribution of the boundary shear stress using a boundary-element method, and computes the drift velocity, the slip velocity, and the velocity at a specified point. laplace
flow_1d_osc





Oscillatory, unidirectional, flow inside or outside a tube with arbitrary cross-section. The motion may be due to an oscillatory pressure gradient (internal flow), or to the translational oscillations of the tube wall parallel to the generators (internal or extrenal flow). The main program solves an integral equation for the distribution of the complex amplitude of the boundary shear stress using a boundary-element method, and then computes the complex amplitude of the velocity at a specified point. helmholtz
plate_imp Unsteady flow in a semi-infinite fluid bounded by an infinite plane, due to the impulsive translation of the plane at constant velocity.
plate_osc Time-periodic flow in a semi-infinite fluid bounded by an infinite plane, due to the sinusoidal ocillations of theplane.
✓ spf








Similarity solutions for three types of stagnation-point flow:
  • Two-dimensional oblique stagnation-point flow toward a flat plate.
  • Axisymmetric orthogonal stagnation-point flow
  • Swirling flow due to the rotation of a flat disk (von Karman flow).
The main program solves the boundary-value problem resulting from a similarity solution, using a shooting method.

✓ strml













































































































The main program generates streamline patterns for a braod range of flows listed in a nested menu, including, but not limited to, the following:

Irrotational flows
  • Periodic array of two-dimensional (2D) point sources.
  • A 2D point source above a plane wall.
  • A 2D point source in a channel.
  • A 2D point source in a semi-infinite strip.
  • A 2D oint source in front of a circular cylinder.
  • A 2D potential dipole.
  • A three-dimensional (3D) point source above a plane wall.
  • A 3D point source in front of a sphere.
  • A doubly-periodic array of 3D point sources.
  • A 3D point source in uniform flow.
  • Flow past a Rankine ovoid.
  • A 3D potential dipole.
  • A ring of point sources
  • A ring of point sources near a wall.
  • Flow around a corner.
  • Flow past a stationary circular cylinder.
  • Flow due to a moving circular cylinder.
  • Flow past a flat plate.
  • Flow past an ellipse.
  • Flow past a Joukowski airfoil.
  • Flow exiting a channel.
  • Flow over a circular bump.
  • Flow doen and up a strip.
  • Flow past a sphere.
  • Flow due to a moving sphere.
  • Orthogonal stagnation-point flow past a sphere.
  • Flow past a prolate spheroid.
  • Flow past an oblate spheroid.
Vortex flows
  • Periodic array of Stuart vortices in shear flow.
  • A pair of point vortices of equal strength.
  • A point vortex outside a circular cylinder.
  • A point vortex inside a circular cylinder.
  • A point vortex between two walls.
  • A point vortex in a semi-infinite strip.
  • A periodic array of vortex blobs.
  • A periodic vortex street.
  • A line vortex ring.
  • A line vortex ring in front of a plane.
  • A line vortex ring in front of a sphere.
  • A line vortex ring inside a sphere.
  • Hill's spherical vortex in a stationary or moving frame.
Stokes flows
  • Stagnation-point flow against a plane wall.
  • Flow due to a plane scraping a plane for several scraping angles.
  • Flow due to a moving belt.
  • Flow due to a tape plunging into a pool.
  • Symmetric and antisymmetric flow in a corner.
  • Flow due to the application of constant shear stress at a corner.
  • Flow past, or due to, a translating sphere.
  • Flow past, or due to, a translating drop.
  • A three-dimensional points force (Stokeslet).
  • A two-dimensional points force (Stokeslet).
  • A doubly-periodic array of two-dimensional point forces.
  • A triply-periodic array of three-dimensional point forces.
  • A point force in front of a sphere.
  • A point force above a plane wall.
  • Linear flow past a drop.
  • Quadratic stagnation-point flow.
  • Flow past a slender cylinder.
  • Shear flow over a plane wall with a circular orifice.
  • Shear flow over a plane wall with a discoidal zero-shear-stress patch.
  • Shear flow over a plane wall with a slit.
  • Shear flow over a plane wall with a slit-like zero-shear-stress patch.
Other flows
  • Kovasznay flow.
  • Taylor cellular flow.
  • Oseen flow due to a moving sphere.
  • Flow due to a point source of momentum.
  • Blasius boundary-layer flow.
  • Oblique stagnation-point flow toward a flat plate.
  • Axisymmetric stagnation-point flow toward a flat plate.
  • Two-dimensional linear flow.
✓ tube_ann Flow through an annular tube confined between two coaxial cylinders.
✓ tube_ann_ml Flow of an arbitrary number of annular layers through an annular tube confined between two coaxial cylinders.
✓tube_ann_sw Swirling flow in an annular tube confined between two coaxial cylinders, due to the rotation of the inner or outer cylinder.
✓tube_ann_sw_ml Swirling flow of an arbitrary number of annular layers in an annular tube confined between two coaxial cylinders, due to the rotation of the inner or outer cylinder.
✓ tube_crc Flow through a circular tube.
✓ tube_crc_ml Flow of an arbitrary number of annular layers through a circular tube.
✓ tube_crc_sec Flow through a circular tube due to the translation of section of the wall.
✓ tube_crc_sw Swirling flow in a circular tube due to the sudden rotation of the cylinder wall at constant angular velocity.
✓ tube_crc_trans Transient flow through a circular tube, due to the sudden application of a constant pressure gradient.
✓ tube_crc_wom Time-periodic flow through a circular tube, due to an oscillatory pressure gradient.
✓ tube_ell Flow through a tube with elliptical cross-section.
✓ tube_rec Flow through a tube with rectangular cross-section.
✓ tube_trgl_eql Flow through tube whose cross-section is an equilateral triangle.

Directory: 05_lub

This directory contains programs that generate solutions to problems involving viscous flow with negligible inertial forces. The mathematical formulation relies on the approximations of lubrication flow. The basic assumption, implemented as an approximation, is that the flow is locally unidirectional with a parabolic, position- and possibly time-dependent velocity profile.

Subdirectory Subject CFDLAB BEMLIB
✓ bear_2d Dynamic simulation of the motion of a two-dimensional body pressing against a sliding wall, in the arrangement of the slider bearing. The body geometry and boundary conditions for the pressure away from the lubrication zone are specified at the input. The equation governing the motion of the slider bearing normal to the wall derives from Newton's second law of motion, where the force due to the lubrication pressure is a key ingredient.
✓ chan2l_exp Dynamic simulation of the evolution of the interface between two viscous fluids in a horizontal or inclined channel confined between two parallel plane walls, in Couette, Poiseuille, or gravity-driven flow. The interfacial waves are spatially periodic. The problem is formulated in terms of a highly nonlinear partial differential equation for the location of the interface. under the auspices of lubrication theory. The solution is found using an explicit finite-difference method.
✓chan_2d_imp Same as program chan_2d_2l_exp, except that the motion is simulated using an implicit finite-difference method to circumvent stability restrictions on the time step.
✓ films Dynamic simulation of the evolution of an arbitrary number of interfaces between an arbitrary number of superimposed viscous films leveling on a horizontal wall or flowing down an inclined or vertical plane wall. The wall and the inclined plane are allowed to have periodic corrugations. The interfaces are spatially periodic and the wavelength matches the period of the wall. Under the approximations of lubrication flow, the problem is formulated in terms of a system of highly nonlinear partial differential equations for the location of the interfaces and free surface. The solution is found using an explicit finite-difference method.

Directory: 06_stokes

This directory contains programs pertinent to Stokesf flow. The underlying physical assumption is that inertial forces exerted on small fluid parcels are negligible, and the motion is determined by the balance between the pressure force, the viscous force, and possibly a body force.

stokes
Subdirectory Subject CFDLAB BEMLIB
✓bump_3d Shear flow past a spherical protrusion on a plane wall.
 caps_2d Dynamic simulation of the motion of a two-dimensional bubble, drop, or liquid capsule with generalized interfacial properties, in infinite, semi-infinite, or channel flow. The interface may exhibit constant surface tension, variable surface tension due to the presence of a surfactant, or develop elastic tensions due to the deformation from the unstressed shape. The evolution of the concentration of an insoluble surfactant over the deforming interface is computed by a semi-implicit finite-volume method. In the case of infinite flow, the program also computes the effective rheological properties of a dilute suspension.
 caps_3d Dynamical simulation of the motion of a three-dimensional bubble, drop, or liquid capsule bounded by an elastic membrane, in infinite or wall-bounded flow. The interface may exhibit constant surface tension, variable surface tension due to the presence of a surfactant, or develop elastic tensions and bending moments. due to the deformation from the unstressed shape. The evolution of the concentration of an insoluble surfactant over the deforming interface is computed by a semi-implicit finite-volume or finite-element method. In the case of flow in an infinite domain, the program also computes the effective rheological properties of a dilute emulsion.
 caps_ax Dynamical simulation of the deformation of an axisymmetric bubble, drop, or capsule, moving under the action of gravity, or deforming under the action of a specified infinite, semi-infinite, or tube flow. The interface may exhibit constant surface tension, variable surface tension due to the presence of a surfactant, or elastic tensions. The evolution of the concentration of an insoluble surfactant over the deforming interface is computed using a finite-volume method.
 chan2l Dynamic simulation of the evolution of the interface between two-layers in a channel confined between two parallel walls.
 chan2lw Dynamic simulation of the evolution of the interface between two-layers in a channel confined between a plane wall and a wavy wall.
 drop_3d Dynamic simulation of the motion of a three-dimensional drop or bubble with uniform surface tension.
 drop_3dw Dynamical simulation of the deformation of a three-dimensional drop or bubble with uniform surface tension adhering to a plane wall with a specified contact line, under the influence of a shear flow.
 em_2d Dynamical simulation of the motion of a singly- or doubly-periodic, polydisperse suspension of two-dimensional bubbles, drops, or capsules, subject to a specified shear flow. The interfaces may exhibit constant surface tension, variable surface tension due to the presence of a surfactant, or elastic tensions. The evolution of the concentration of an insoluble surfactant over the deforming interfaces is computed using a finite-volume method. The program also computes the effective rheological properties of the emulsion.
 films Dynamical simulation of the deformation of a number of superposed viscous layers comprising a composite film, for several flow configurations including layers in channel flow, layers leveling on a horizontal plane, and layers flowing down an inclined plane.
 filmw Dynamical simulation of the evolution of a liquid film down an inclined plane. The interface is occupied by an insoluble surfactant.
✓flow_2d Flow in a two-dimensional domain with arbitrary geometry. The main program solves an integral equation of the first kind for the distribution of the boundary traction, and then computes streamlines emanating from specified points in the flow. Several types of flow and domain geometries are implemented in the program; other configurations can be included by straightforward modifications. stokes
 flow_3x Shear flow over an axisymmetric cavity, orifice, or protrusion embedded on a plane wall, possibly in the presence of an upper plane wall. The main program solves a system of integral equations of the first kind for the Fourier coefficients of the boundary distribution of the traction, and computes streamlines. In the case of flow over a protrusion, the program also computes the force and torque exerted on the protrusion. The program may be readily modified to handle shear flow past an axisymmetric particle, where the unperturbed flow is directed perpendicular to the particle axis.
 layers Dynamic simulation of the deformation of two superposed viscous layers, or one layer resting on a wall underneath a semi-infinite fluid, for a variety of configurations: two layers in channel flow, a layer leveling underneath a semi-infinite fluid on a horizontal plane, a layer flowing down an inclined plane, an infinite interface deforming under the influence of a periodic collection of point-source dipoles.
 pint Particle motion near or inside a flat interface between two immiscible fluids.
✓prtcl_2d Flow past a collection of two-dimensional particles with arbitrary shapes for several flow configurations including: Uniform flow past a doubly-periodic particle array, flow in a semi-infinite domain bounded by a plane wall, flow in a channel confined by two parallel plane walls. The main program solves an integral equation of the first kind for the distribution of the traction over the particle surfaces, and then generates streamlines emanating from specified points. The results allow the computation of macroscopic flow variables including the permeability of a disorderded two-dimensional porous medium. Flow past a fixed bed of two-dimensional particles with arbitrary shapes, for a variety of flow configurations, computed by a boundary-element method. stokes
 prtcl_2d_se Same as prtcl_2d, except that the integral equations are solved using a spectral-element method.
✓prtcl_3d Flow past, or due to the motion of, a three-dimensional solid particle in a solitary or periodic arrangememt. The main program solves an integral equation of the first kind for the distribution of the traction over the particle surface, and computes the grand-resistance tensor for rigid-body motion in a quiescent fluid. The flow occurs in an infinite domain or in a semi-infinite domain bounded by a plane wall. The force and torque exerted on a particle that is held stationary in an arbitrary flow may be computed readily from the numerical results using the reciprocal relation for Stokes flow. The translational and angular velocity of a particle subjected to a specified force and torque arises by a straightfoward computation. stokes
✓prtcl_3d_mob Mobility problem for three-dimensional particle motion. stokes
 prtcl_3d_mob_se Same as prtcl_3d_mob, but the integral equations are solved using a spectral-element method.
✓prtcl_ax Axisymmetric flow past, or due to the motion of, a collection of particles with arbitrary shapes aligned with a common axis, for a variety of configurations including: uniform flow past a fixed collection of particles, flow due to particle translation, flow in a semi-infinite domain bounded by a plane wall, flow in the interior of a cylindrical tube. The main program solves an integral equation of the first kind for the boundary traction, and then computes streamlines. stokes
✓prtcl_sw Swirling flow generated by the rotation of an axisymmetric particle around its axis. The main program solves an integral equation of the first kind for the distribution of the traction over the particle surface, and then computes the torque exerted on the particle. Several particle geometries are implemented in the program; others geometries be included with straightfoward modifications. stokes
✓sgf_2d





























Green's functions of two-dimensional Stokes flow, representing the flow due to a two-dimensional point force. The subroutines evaluate the Green's functions for the velocity, pressure, and stress.

function
sgf_2d_1p_fs Periodic Green's function in free space.
sgf_2d_1p_w Periodic Green's function in a semi-infinite domain bounded by a plane wall.
sgf_2d_1p_ww Periodic Green's function in a channel bounded by two parallel plane walls.
sgf_2d_2p Doubly periodic Green's function.
sgf_2d_2p_glut Generates look-up tables for the doubly periodic Green's function.
sgf_2d_fs Free-space Green's function.
sgf_2d_w Green's function in a semi-infinite domain bounded by a plane wall.

stokes





























✓sgf_3d

















Green's functions of three-dimensional Stokes flow representing the flow due to a solitary point force or a periodic array of point forces. The subroutines evaluate the Green's functions for the velocity, pressure, and stress.

Function
sgf_3d_2p Doubly-periodic Green's function.
sgf_3d_3p Triply-periodic Green's function.
sgf_3d_fs Free-space Green's function.
sgf_3d_sph Green's function for flow in the exterior of a solid sphere.
sgf_3d_w Green's function for a semi-infinite domain of flow bounded by a plane wall.
stokes

















✓sgf_ax

















Green's functions of axisymmetric Stokes flow, representing the flow due to a ring of point forces. The subroutines evaluate the Green's functions for the velocity, and the kernel of the double-layer potential.

Function
sgf_ax_1p Singly-periodic Green's function in free space.
sgf_ax_1p_ct Singly-periodic Green's function for flow inside a circular tube.
sgf_ax_fs Free-space Green's function.
sgf_ax_w Green's function for semi-infinite flow bounded by a plane wall.
stokes

















 slip Particle motion near a plane wall with the no-slip or slip boundary condition over the wall and particle surface.
 spart Interception of two spherical particles with the no-slip or slip boundary condition.
 spfl Dynamical simulation of the evolution of a film resting on a plane wall subjec to a stagnation-point flow.
 susp_2d Dynamical simulation of the motion of a collection of two-dimensional (cylindrical) particles with arbitrary shapes, for several flow configurations, including uniform flow of a doubly-periodic array, flow in a semi-infinite domain bounded by a plane wall, and flow in a channel bounded by two parallel plane walls. A specified force and torque is exerted on each particle. The main program solves an integral equation of the first kind for the distribution of the traction over the particle surfaces, and simultaneously produces the particle translational and angular velocities.
 susp_2d_se Same as susp_2d, except that the integral equations are solved using a spectral-element method.
 susp_3d Dynamical simulation of a suspension of three-dimensional freely-suspended particles.
 thread_ax Dynamic simulation of the evolution of an infinite liquid thread or annular layer, subject to axisymmetric periodic perturbations. The ambient fluid may be of infinite extent or bounded by a coaxial cylindrical surface in the configuration of the core-annular flow. The thread interface may exhibit constant surface tension, variable surface tension due to the presence of an insoluble surfactant, and develop elastic tensions. The evolution of the concentration of an insoluble surfactant over the deforming interface is computed by a finite-volume method.

Directory: 07_ptf

This directory contains programs that solve problems involving potential (irrotational) flow of an incompressible fluid. The fundamental physical assumption is that the vorticity is zero throughout the domain of the flow.

Subdirectory Subject CFDLAB BEMLIB
✓airf_2d Shapes of two-dimensional airfoils.
✓airf_2d_cdp Potential flow past an airfoil with arbitrary geometry with the Kutta condition satisfied at the trailing edge or at a designated point. The flow is computed by solving Laplace's equation subject to the Dirichlet boundary condition using the constant-source-dipole panel method.
✓airf_2d_csdp Potential flow past an airfoil with arbitrary geometry with the Kutta condition satisfied at the trailing edge or at a designated point. The flow is computed by solving Laplace's equation with the Dirichlet boundary condition using the constant-point-source / source-dipole panel method.
✓airf_2d_lvp Potential flow past an airfoil with arbitrary geometry, with the Kutta condition satisfied at the trailing edge or at a designated point. The flow is computed by solving Laplace's equation using the linear vortex panel method. laplace
✓body_2d Potential flow past a two-dimensional body with arbitrary geometry. The flow occurs in an infinite domain or in a semi-infinite domain bounded by a plane wall. The main program solves an integral of the second kind for the boundary distribution of a properly defined disturbance potential over the surface of the body, computes the distribution of the pressure coefficient and the force exerted on the body, and then computes streamlines originating from specified points. The program implements uniform flow past a body with cicrular, elliptical, triangular, or rectangular shape. Other flow geometries and types of flow may be included by straightforward modifications. laplace
✓body_ax Potential flow past an axisymmetric body with arbitrary geometry. The main program solves an integral equation of the second kind for the boundary distribution of a properly defined disturbance potential, computes the distribution of the pressure coefficient and the force exerted on the body, and then computes streamlines originating from specified points. The program implements uniform flow past a body with spherical, spheroidal, and toroidal shape. Other flow geometries and types of flow may be included by straightforward modification. laplace
 bubble_3d Dynamical simulation of the evolution of a three-dimensional gas bubble suspended in an inviscid fluid. The ambient fluid is infinite or semi-infinite bounded by a plane wall. The flow is computed using a generalized vortex method with a boundary-element implementation.
✓cvt_2d Potential flow in a rectangular cavity with impenetrable bottom and side walls, computed by a finite-difference method.
 drop_3d Dynamical simulation of the natural oscillations of a three-dimensional inviscid drop induced by surface tension. The flow is computed using a generalized vortex method with a boundary-element implementation.
✓flow_2d





Potential flow in a two-dimensional domain with arbitrary geometry. The main program solves an integral of the second kind for the boundary distribution of a properly defined disturbance harmonic potential, and then computes streamlines originating from specified points. The program implements uniform flow past a cavity or a protrusion embedded on a plane wall, possibly in the presence of an upper wall. Other flow geometries may be included by straightforward modifications.





laplace





✓lgf_2d























Green and Neumann functions of Laplace's equation in two dimensions. These subroutines evaluate the following Green's functions and their gradient:

Function
lgf_2d_1p Singly-periodic Green's function in free space.
lgf_2d_fs Free-space Green's function.
lgf_2d_w Green's function for a semi-infinite domain of flow bounded by a plane wall.
lgf_2d_ww Green's function for flow in a channel confined between two parallel plane walls.
lnf_2d_crc Neumann function for internal or external flow bounded by a circular cylinder.
lnf_2d_w Neumann function for a semi-infinite domain of flow bounded by a plane wall.
lnf_2d_ww Neumann function for flow on a channel confined between two parallel plane walls.
lnf_2d_www Neumann function for flow in a semi-infinite rectangular strip confined between two parallel plane walls and another plane wall intersecting them at right angle.

laplace























✓lgf_3d

















Green and Neumann functions of Laplace's equation in three dimensions. These subroutines evaluate the following Green's functions and their gradient:

Function
lgf_3d_2p Doubly-periodic Green's function.
lgf_3d_2p_glut Generates look-up tables for the doubly-periodic Green's function.
lgf_3d_fs Free-space Green's function.
lgf_3d_w Green's function for semi-infinite flow bounded by a plane wall.
lnf_3d_sph Neumann function for flow inside or outside a sphere.
lnf_3d_w Neumann function for flow in a semi-infinite domain bounded by a plane wall.

laplace

















✓lgf_ax



Green's and Neumann functions of Laplace's equation in an axisymmetric doman. These subroutines evaluate the following Green's functions and their gradient:

Function
lgf_ax_fs Free-space Green's function.
lgf_ax_w Green's function for semi-infinite flow bounded by a plane wall.
lnf_ax_w Neumann function for semi-infinite flow bounded by a plane wall.

laplace
✓tank_2d Dynamical simulation of the sloshing of a liquid inside a rectangular tank undergoing accelerating motion, computed by a boundary-element method. laplace
 wave_3d Dynamical simulation of doubly-periodic gravity/capillary waves computed by a generalized vortex method.

Directory: 08_stab

This directory contains programs and subroutines related to hydrodynamic stability.

Subdirectory Subject CFDLAB BEMLIB
✓ann2l Capillary instability of the interface between two annular layers placed between two concentric cylinders, in the presence of an insoluble surfactant.
✓ann2l0 Capillary instability of the interface between two annular layers placed between two concentric cylinders in the presence of an insoluble surfactant, under conditions of Stokes flow.
✓ann2lel Same as ann2l, but for an elastic interface.
✓ann2lel0 Same as ann2l0, but for an elastic interface.
✓chan2l0 Instability of two-layers flow in a channel confined between two parallel plane walls, under conditions of Stokes flow.
✓film Instability of a liquid film flowing down an inlined plane, under conditions of Stokes flow.
✓film_s Instability of a liquid film flowing down an inclined plane in the presence of an insoluble surfactant, under conditions of Stokes flow.
✓layer_s Instability of a liquid layer resting on a plane wall in the presence of an insoluble surfactant.
✓prony prony: Decomposition of a time series into normal modes expressing exponentially growing or decaying sinusoidal waves.

wave: Decomposition of linear spatial waves into exponentially evolving normal modes.

✓rt0 Inertial or gravitational Rayleigh-Taylor instability of a horizontal interface between two semi-infinite fluids in Stokes flow.
✓ rt0w Rayleigh-Taylor instability of and a film resting on a plane wall underneath a semi-infinite fluid, under conditions of Stokes flow.
✓sf_inv Normal-mode stability of an inviscid shear flow with a velocity profile specified in analytic or discrete form.
✓thread0 Capillary instability of viscous thread immersed in an infinite ambient viscous fluid, under conditions of Stokes flow.
✓thread_inv Capillary instability of an inviscid thread suspended in an infinite ambient inviscid fluid with negligible density.
✓vl Kelvin-Helmholtz instability of an inviscid vortex layer with constant vorticity.
✓vs Kelvin-Helmholtz instability of a vortex sheet.

Directory: 09_vortex

This directory contains programs concerning vorticity dynamics and vortex motion in an effectively inviscid fluid.

Subdirectory Subject CFDLAB BEMLIB
✓lv_lia Dynamical simulation of the motion of a closed three-dimensional line vortex, computed by the local-induction approximation (LIA).
✓lvr











Velocity induced by a line vortex ring in an infinite or bounded domain.
function
lvr_fs A line vortex ring in free space.
lvr_sph Axisymmetric flow induced by a line vortex ring in the presence of a sphere.
lvr_w A line vortex ring before a plane wall positioned perpendicular to the ring axis in an axisymmetric arrangement.
✓lvrm Dynamical simulation of the motion of a collection of coaxial line vortex rings. The strength of the line vortex rings evolves so as to maintain the circulation around the ring constant. A pair of rings exhibit "leap-frogging".
✓pv











Velocity induced by point vortices in domains bounded by various surfaces.
Function
pv_circle A point vortex in the presence of a circular cylinder.
pv_fs A point vortex in free space.
pv_pr A periodic array of point vortices.
pv_w A point vortex in a semi-infinite domain of flow bounded by a plane wall.
pv_ww A point vortex between two parallel plane walls.
pv_www A point vortex in a semi-infinite rectangular strip confined between two parallel plane walls, and an another plane wall intersecting them at a right angle.
✓pvm Dynamical simulation of the motion of collection of point vortices.
✓pvm_pr Dynamical simulation of the motion of a periodic collection of point vortices, illustrating the Kelvin-Helhmoltz instability. A periodic array along a periodic line emulates a two-dimensional vortex sheet separating two streams of a homogeneous fluid.
✓ring Self-induced velocity of a vortex ring with a core of finite cross-section and a specified constant or Guassian vorticity distribution. As the radius of the core tends to zero, we obtain a line vortex ring.
✓vl_2d Dynamic simulation of the motion of a compound vortex layer comprised with an arbitrary number of attached layers with constant vorticity. The motion of the vortex boundaries is computed by the method of contour dynamics for two-dimensional periodic flow.
✓vp_2d Dynamical simulation of the motion of a collection of two-dimensional vortex patches with constant vorticity, in solitary or periodic arrangement. The motion of the vortex boundaries is computed by the method of contour dynamics for two-dimensional flow.
✓vp_ax


Dynamical simulation of the motion of a collection of axisymmetric coaxial vortex patches whose vorticity varies linearly with the distance from the axis of symmetry. The motion of the vortex boundaries is computed by the method of contour dynamics for axisymmetric flow.
 vs_3d Dynamical simulation of the self-induced motion of a closed three-dimensional vortex sheet.
 vs_3d_2p Dynamic simulation of the self-induced motion of a doubly-periodic three-dimensional vortex sheet

Directory: 10_bl

This directory contains of programs concerning boundary-layer flows.

Subdirectory Subject CFDLAB BEMLIB
✓blasius Solution of the Blasius boundary layer equations.
✓falskan Solution of the Falkner-Skan boundary layer equations.
✓kp_cc Boundary-layer flow round a circular cylinder computed by the Karman-Pohlhausen method.
✓pohl_pol Profiles of the Pohlhausen polynomials.

Directory: 11_fdm

This directory contains programs that generate numerical solutions to the equations of incompressible Newtonian flow using finite-difference methods.

Subdirectory Subject CFDLAB BEMLIB
✓channel Unidirectional flow in a channel.
✓cvt_pm Transient flow in a rectangular cavity computed by Alexandre Chorin's projection method.
✓cvt_sv Steady flow in a two-dimensional rectangular cavity driven by the translation of the lid, computed using the streamfunction-vorticity formulation.

Directory: 12_bem

This directory contains programs that generate numerical solutions to Laplace's equation with Dirichlet and Neumann boundary conditions using boundary-element methods

Subdirectory Subject CFDLAB BEMLIB
✓ldr_3d Solution of Laplace's equation in the interior or exterior of a three-dimensional domain subject to the Dirichlet boundary condition, computed using the boundary-integral formulation. laplace
 ldr_3d_2p Solution of Laplace's equation in a doubly periodic semi-infinite domain subject to the Dirichlet boundary condition, computed using the double-layer representation.
✓ldr_3d_ext Solution of Laplace's equation in the exterior of a three-dimensional region subject to the Dirichlet boundary condition, computed using the completed double-layer formulation. laplace
✓ldr_3d_int Solution of Laplace's equation in the interior of a three-dimensional region subject to the Dirichlet boundary condition, computed using the double-layer formulation. laplace
 ldr_3d_sext Spectral element implementation of ldr_3d_ext
 ldr_3d_sint Spectral element implementation of ldr_3d_int
✓lnm_3d Solution of Laplace's equation in the interior or exterior of a three-dimensional domain subject to the Neumann (natural) boundary condition, computed using the boundary-integral formulation. laplace

Directory: 13_turbo

This directory contains data and programs related to turbulent flow.

Subdirectory Subject CFDLAB BEMLIB
✓stats Statistics of a turbulent time series recorded in the laboratory by Kurt Keller for stably stratified turbulent flow behind a grid. The main program reads the velocity and temperature time series, and computes mean and RMS values, power spectra, and time-delayed correlations.

Terms

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

To receive a copy of the GNU Lesser General Public License along write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

On the Internet, visit the URL: http://www.gnu.org/copyleft/lesser.html