FDLIB Directories C. Pozrikidis: FDLIB FDLIB home


FDLIB Directories


The contents of the FDLIB directories are listed in the following tables, including a description of the subdirectories.

Subject Main Directory Click on an arrow
for an extended description
1. Numerical methods 01_num_meth -->
2. Gridding 02_grids -->
3. Hydrostatics 03_hydrostat -->
4. Various solutions 04_various -->
5. Lubrication flows 05_lub -->
6. Low-Re-number flows 06_stokes -->
7. Potential flow 07_ptf -->
8. Hydrodynamic stability 08_stab -->
9. Vortex motion 09_vortex -->
10. Boundary layers 10_bl -->
11. Finite-difference methods 11_fdm -->
12. Boundary-element methods 12_bem -->
13. Turbulence 13_turbo -->

The source code of the public directories is available to view and download.





Directory: 01_num_meth


Numerical Methods


This directory contains a collection of Fortran and some C++ programs and subroutines on various aspects of numerical computation. This software accompanies the book: C. Pozrikidis, 1998, ``Numerical Computation in Science and Engineering,'' Oxford University Press. The level of difficulty varies over a broad range. Some programs are elementary and have been included for the purpose of familiarization with computer programming and numerical computation; other programs are more advanced.

The programs are arranged in twelve subdirectories. The first eleven directories correspond to the like-numbered chapters of the textbook. The twelfth directory contains programs for the evaluation of special functions. Stand-alone subroutines are accompanied by their drivers; if tintagel.f is the file name of a subroutine, then tintagel_dr.f is the name of the driver. Compilation and linking should be done as shown in the UNIX makefile of the host subdirectory, where the file dependencies are shown.

This directory is copied in identical form in the num_meth directory of the boundary-element library BEMLIB

Public subdirectories are printed in green.

Subdirectory Subject
01_num_comp General aspects of numerical computation
o

ProgramTopic
binary Converts a positive number to the corresponding binary.
bits Greatest integer that can be described with a specified number of bits.
cluster_2d Identifies clusters in a collection of point particles
combinatorial Computes the combinatorial by two methods.
euclid Finds the greatest common divisor of two positive integers.
fast_sum Sums an infinite series whose terms decay like 1/n2.
mapping Multiplies a vector by a matrix many times.
pie Computes the number pi = 3.14... by considering the perimeter of a regular polygon with an increasing number of sides.
prime Ascertains whether a specified integer is prime.
ran_bsort Generates a string of random numbers and ranks them using bubble-sort.
ran_sort Generates a string of random numbers, indexes them, and ranks them.
richardson Accuracy improvement by repeated Richardson extrapolation.
von_koch Generates the vertices of the von Koch periodic line.

02_lin_calc Linear algebra and linear calculus
o
Program Topic
chol_c Cholesky decomposition of a symmetric and positive-definite matrix by column or row.
det_33c Determinant of a 3x3 complex matrix
det_44c Determinant of a 4x4 complex matrix
det_hess Determinant of a lower or upper Hessenberg matrix.
gram_sc Gram-Schmidt orhogonalization of a set of vectors.
inv_l Inverse of a lower-triangular matrix.
inv_u Inverse of an upper-triangular matrix.
ldu LDU decomposition of a symmetric matrix.
lu_c Crout LU decomposition, computation of the determinant and inverse of a matrix.
lu_d Doolittle LU decomposition, computation of the determinant and inverse of a matrix.
lu_d_t Doolittle LU decomposition of a tridiagonal matrix.
qr_dec QR decomposition of an arbitrary matrix by three methods: Gram-Schmidt, rotation, and reflection.
03_lin_eq Systems of linear algebraic equations
o
Program Topic
bcg Biconjugate gradients method for arbitrary systems.
cg Conjugate gradients method for symmetric and positive-definite systems.
cramer_22 Solution of a 2x2 system by Cramer's rule.
cramer_33c Solution of a 3x3 complex system by Cramer's rule.
cramer_44c Solution of a 4x4 complex system by Cramer's rule.
cycl_red Cyclic reduction of a tridiagonal matrix with constant diagonal elements.
gel Gauss elimination with option for partial pivoting and operation-reduction for a symmetric matrix; LU decomposition.
gel_inv Computation of a matrix inverse by Gauss elimination.
gel_mrhs Gauss elimination with multiple right-hand sides; computation of a matrix inverse.
penta Solution of a pentadiagonal system.
solve_chol_c Solution of a real, symmetric, and positive-definite system by Cholesky decomposition.
thomas Solution of a tridiagonal system using Thomas's algorithm.
thomas_c Solution of a tridiagonal system using a compact implementation of Thomas's algorithm.
thomas_pr Solution of a tridiagonal system with two wrapped elements corresponding to periodic boundary conditions, using Thomas's algorithm.
04_nl_eq Nonlinear algebraic equations
o
Program Topic
bairstow Bairstow's method for polynomial root finding.
cubic Computes the roots of a cubic equation.
fpi1 One-point iterations for one equation.
fpi2 One-point iterations for two equations.
non_lin Solves a system of nonlinear equations by the Newton or Broyden method.
non_lin1 Solves one nonlinear equation by several methods.
quadratic Computes the roots of the quadratic equation.
05_eigen Eigenvalues and eigenvectors of matrices
o
Program Topic
char_poly Generates the coefficients of the characteristic polynomial by two methods.
cond_number || ||2 condition number of a real matrix.
house_sym Householder method for making a matrix tridiagonal.
jacobi Jacobi method for computing all eigenvalues of a real symmetric matrix.
lanczos Lanczos method for reducing a matrix to the tridiagonal form.
lanczos_sym Lanczos method for reducing a symmetric matrix to the tridiagonal form.
power Real eigenvalues of a real matrix by the power method with shifting and deflation and facility for inverse iteration.
power_sym Real eigenvalues of a real symmetric matrix by the power method with shifting.
06_interp_diff Function interpolation and differentiation
o
Program
Topic
arc_3d Computes the circular arc that passes through three points in space.
chebyshev Applications of Chebyshev interpolation and approximation.
hermite Hermite interpolation of a function of one variable by two methods.
interp_1d Interpolation of a function of one variable by several methods: Aitken, Fornberg, Neville, Newton
lagrange Applications of Lagrange interpolation.
lagrange_es Lagrange interpolation with evenly-spaced points.
laplacian_2d Finite-difference formulae for the Laplacian of a function of two variables.
splines_cb Cubic spline interpolation with several types of end-conditions.
07_integration Numerical integration of a function of one or two variables
o
Program Topic
filon Filon rule for computing a sinusoidal integrand.
gauss_disk Base points and weights for Gauss integration over a disk.
gauss_lag Base points and weights of the Gauss-Laguerre quadrature.
gauss_leg Base points and weights of the Gauss-Legendre quadrature for a regular integral.
gauss_log Base points and weights of a quadrature for integrating an integrand with a log singularity.
gauss_sph Base points and weights of a quadrature for integrating over the surface of a sphere.
gauss_trgl Base points and weights of a quadrature for integrating over a planar triangle.
integral Computes an integral of a function of one variable by several methods.
integral_lag Computes an integral by the Gauss-Laguerre quadrature.
integral_log Computes an integral with a logarithmic singularity using an appropriate quadrature.
08_approximation Approximation of a function of one or two variables
o
Program Topic
b_spl_un Computes and displays uniform B-splines.
b_splines Approximates a function with B-splines.
bernstein Approximates a function with a Bernstein polynomial.
fft Fast Fourier transform of a function of one variable.
ft_1d Fourier transform of a function of one variable by the conventional method.
ft_1d_nu Complex Fourier transform of a function of one variable with non-uniformly spaced points, computed by the conventional method.
ft_2d Fourier transform of a function of two variables over a rectangle.
09_ode_ivp Ordinary differential equations: initial-value problems
o
Program Topic
ode Solves a system of odes by several methods.
10_ode_bvp Ordinary differential equations: boundary-value problems
o
Program Topic
fdm Finite-difference method for an ode.
fem Finite-element method for an ode.
11_pde Partial differential equations
o
Program Topic
chimney Temperature distribution in a chimney wall.
poiss_DNDD Solution of Poisson's equations in a rectangle with Dirichlet and Neumann boundary conditions.
poiss_NNNN1 Solution of Poisson's equations in a rectangle with Neumann boundary conditions. Equation is applied at interior and boundary nodes.
poiss_NNNN2 Solution of Poisson's equations in a rectangle with Neumann boundary conditions. Equation is applied only at interior.
rod Unsteady heat conduction through a rod.
12_spec_fnc Computation of special functions
o
Program
Topic
ber_bei_0 Computes the Kelvin functions ber0, bei0 and their derivatives.
bess_I01K01 Computes the modified Bessel functions I0, I1, K0, K1
bess_J0 Computes the Bessel function J0.
bess_J1 Computes the Bessel function J1.
ell_int Computes the complete elliptic integrals of the first and second kind.
error_f Computes the error function, the complementary error function, and the inverse error function.
exp_int Computes the exponential integral.
ker_kei_0 Computes the Kelvin functions ker0 and kei0, and their derivatives.
gso_poly Generates the coefficients of several families of orthogonal polynomials using the Gram-Schmidt orthogonalization.
leg_fnc_ortho Computes the orthonormal set of Legendre functions.

FDLIB main page and contents



o





Directory: 02_grids


Grid generation in two and three dimensions


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

Public subdirectories are printed in green. The host BEMLIB directory is indicated when appropriate. The CFDLAB signature denotes that the graphics implementation of this program is available.

Subdirectory Subject
grid_2d
BEMLIB: grids
CFDLAB
Discretization of a planar line into a collection of straight or circular elements with corresponding shapes.

prd_2d
BEMLIB: grids
Adaptive parametrization of a closed line in the xy plane.
prd_2d_qs Adaptive parametrization of a closed planar line with symmetry with respect to two planes.
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.
prd_3d_cl Adaptive parametrization of a closed three-dimensional line.
prd_3d_pr Adaptive parametrization of a periodic three-dimensional line.
prd_ax
BEMLIB: grids
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.
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.
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
CFDLAB
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
CFDLAB
Interpolation and computation of streamlines and velocity vector field from data prescribed on a two-dimensional rectangular grid.
sm_3d_cl_tr Smoothing of a function defined over a closed surface described by triangulation.
trgl
BEMLIB: grids
CFDLAB
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.
trgl_octa_hs Triangulation of an open surface into a structured grid consisting of six-node curved quadratic triangular elements. The triangulation descends from half the regular octahedron.
trgl_octa_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.

FDLIB main page and contents

o








Directory: 03_hydrostat


Hydrostatics


This directory contains a collection of programs that generate the shapes of two-dimensional and axisymmetric interfaces in hydrostatics.

Public subdirectories are printed in green. The CFDLAB signature denotes that the graphics implementation of this program is available.

Subdirectory Subject
drop_2d

CFDLAB

Shape of a two-dimensional sessile or pendant drop resting on a horizontal plane.
drop_ax

CFDLAB

Shape of an axisymmetric sessile or pendant drop resting on a horizontal plane.
men_2d

CFDLAB

Shape of a two-dimensional meniscus subtended between two parallel vertical plates.
men_2d_plate

CFDLAB

Shape of a two-dimensional semi-infinite meniscus attached to an inclined plate.
men_ax

CFDLAB

Shape of an axisymmetric meniscus in a circular cylinder.

FDLIB main page and contents

o





Directory: 04_various

Various flows


This directory contains a collection of 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.

Public subdirectories are printed in green. The host BEMLIB directory is indicated when appropriate. The CFDLAB signature denotes that the graphics implementation of this program is available.

Subdirectory Topic
chan_2d Couette-Poiseuille flow through a two-dimensional channel.
chan_2d_2l Couette-Poiseuille flow of two superimposed layers through a two-dimensional channel.
chan_2d_imp

CFDLAB

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

CFDLAB

Flow of an arbitrary number of superimposed layers through a two-dimensional channel.
chan_2d_osc

CFDLAB

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

CFDLAB

Transient flow in a channel confined between two parallel plane walls, due to the sudden application of a constant pressure gradient.
chan_2d_wom

CFDLAB

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
CFDLAB
Flow of an arbitrary number of superimposed layers down an inclined plane.
flow_1d
CFDLAB
BEMLIB: laplace
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.
flow_1d_1p
BEMLIB: laplace
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.
flow_1d_osc
CFDLAB
BEMLIB: helmholtz
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.
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 toward a flat plate (Homman 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

CFDLAB

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

CFDLAB

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

CFDLAB

Transient flow through a circular tube, due to the sudden application of a constant pressure gradient.
tube_crc_wom

CFDLAB

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.


o



Directory: 05_lub


Lubrication flows


This directory contains a collection of 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.

Public subdirectories are printed in green. The CFDLAB signature denotes that the graphics implementation of this program is available.

Subdirectory Subject
bear_2d

CFDLAB

Dynamical 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 being a kew ingredient
chan2l_exp

CFDLAB

Dynamical 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 assumed to be spatially periodic. Under the auspices of lubrication theory, the problem is formulated in terms of a highly nonlinear partial differential equation for the location of the interface. The solution is found using an explicit finite-difference method.
chan2l_imp

CFDLAB

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

CFDLAB

Dynamical 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 with wavelength that 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.

FDLIB main page and contents


o


Directory: 06_stokes


Stokes flow


This directory contains subroutines and programs that generate solutions to problems involving steady or quasi-steady Stokes flow, that is, flow at zero Reynolds number. The underlying physical assumption is that inertial forces exerted on a small fluid parcel are negligible, and the motion is determined by the balance between pressure and viscous forces.

Public subdirectories are printed in green. The host BEMLIB directory is indicated when appropriate. The CFDLAB signature denotes that the graphics implementation of this program is available.

SubdirectorySubject
caps_2d Dynamical 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.
drop_3d Dynamical 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 adhering to a plane wall with a specified contact line, under the influence of a shear flow. The interface exhibits constant surfce tension.
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, layers flowing down an inclined plane.
flow_2d

BEMLIB: stokes
CFDLAB

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 additions.
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 Dynamical 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 including: 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.
prtcl_2d

BEMLIB: stokes
CFDLAB

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.
prtcl_2d_se Same as prtcl_2d, except that the integral equations are solved using a spectral-element method.
prtcl_3d

BEMLIB: stokes

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.
prtcl_ax

BEMLIB: stokes

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.
prtcl_sw

BEMLIB: stokes

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 can be included with straightfoward additions.
sgf_2d

BEMLIB: stokes

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.

Subroutine Topic
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.

sgf_3d

BEMLIB: stokes

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.

Subroutine Topic
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.

sgf_ax

BEMLIB: stokes

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.

Subroutine Topic
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.

susp_2d Dynamical simulation of the motion of a collection of two-dimensional (cylindrical) particles with arbitrary shapes, for several flow configurations: uniform flow of a doubly-periodic array, flow in a semi-infinite domain bounded by a plane wall, 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.
thread_ax Dynamical 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.


o o



o o




Directory: 07_ptf


Potential (irrotational) flow.


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.

Public subdirectories are printed in green. The host BEMLIB directory is indicated when appropriate. The CFDLAB signature denotes that the graphics implementation of this program is available.

SubdirectorySubject
airf_2d Shapes of two-dimensional airfoils.

ProgramFunction
joukowski joukowski airfoils by conformal mapping.

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 Dirichlet boundary conditions, 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 Dirichlet boundary conditions using the constant-point-source / source-dipole panel method.
airf_2d_lvp

CFDLAB
BEMLIB: laplace

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.
body_2d

CFDLAB
BEMLIB: laplace

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.
body_ax

CFDLAB
BEMLIB: laplace

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.
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

CFDLAB

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

CFDLAB
BEMLIB:laplace

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 addition.
lgf_2d

BEMLIB:laplace

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

Subroutine 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.

lgf_3d

BEMLIB:laplace

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

Subroutine 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.

lgf_ax

BEMLIB:laplace

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

Subroutine 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.

tank_2d

CFDLAB
BEMLIB:laplace

Dynamical simulation of the sloshing of a liquid inside a rectangular tank undergoing accelerating motion, computed by a boundary-element method.

Joanna Brown has prepared an amusing animation flick.
wave_3d Dynamical simulation of doubly-periodic gravity/capillary waves computed by a generalized vortex method.


o o o






Directory: 08_stab

Hydrodynamic stability


This directory contains programs and subroutines related to various aspects of hydrodynamic stability.

o Partial documentation is provided in the User Guide.

Public subdirectories are printed in green.

Subdirectory Subject
ann_2l Capillary instability of the interface between two annular layers placed between two concentric cylinders, in the presence of an insoluble surfactant.
ann_2l0 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.
chan_2l0 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.
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 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.
thread_inv Capillary instability of an inviscid thread suspended in an infinite ambient inviscid fluid with negligible density.
thread0 Capillary instability of viscous thread immersed in an infinite ambient viscous fluid, under conditions of Stokes flow.
vl Kelvin-Helmholtz instability of an inviscid vortex layer with constant vorticity.
vs Kelvin-Helmholtz instability of a vortex sheet.

FDLIB main page and contents







Directory: 09_vortex


Vortex dynamics


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

Public subdirectories are printed in green. The CFDLAB indicates denotes that the graphics implementation of this program is available.

Subdirectory Subject
lv_lia

CFDLAB

Dynamical simulation of the motion of a closed three-dimensional line vortex, computed by the local-induction approximation (LIA). o
lvr Velocity induced by a line vortex ring in an infinite or bounded domain.
Subroutine 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

CFDLAB

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. Two rings interact according to the well-known "leap-frogging" mode.
pv Velocity induced by point vortices in domains bounded by various surfaces.
Subroutine 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

CFDLAB

Dynamical simulation of the motion of collection of point vortices.
pvm_pr

CFDLAB

Dynamical simulation of the motion of a periodic collection of vortices, illustrating the Kelvin-Helhmoltz instability. A periodic array tracing a periodic line emulates a two-dimensional vortex sheet separating two streams of a homogeneous fluid. o
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 vanish, we obtain a line vortex ring.
vl_2d

CFDLAB

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. o
vp_2d

CFDLAB

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. o
vp_ax

CFDLAB

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. o
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.

FDLIB main page and contents







Directory: 10_bl


Boundary layers


This directory contains a collection of programs concerning elementary aspects of boundary-layer flows.

Public subdirectories are printed in green.

SubdirectorySubject
falskan The main program solves ODE boundary-value problems associated with the Falkner-Skan boundary layer, for a specified acceleration exponent.
kp_cc The main program computes several features of the two-dimensional boundary layer developing around a circular cilynder, using the Karman-Pohlhausen method.
pohl_pol Profiles of the Pohlhausen polynomials.

FDLIB main page and contents







Directory: 11_fdm


Finite-difference methods


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

Public subdirectories are printed in green. The CFDLAB signature denotes that the graphics implementation of this program is available.

Subdirectory Subject
cvt_pm

CFDLAB

Transient flow in a rectangular cavity computed by Alexandre Chorin's projection method.
cvt_sv

CFDLAB

Steady flow in a two-dimensional rectangular cavity driven by the translation of the lid, computed using the streamfunction-vorticity formulation.

FDLIB main page and contents







Directory: 12_bem


Boundary-element methods


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

o Partial documentation is provided in the User Guide.

Public subdirectories are printed in green. The host BEMLIB directory is indicated when appropriate.

Subdirectory Subject
ldr_3d

BEMLIB: laplace

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.
ldr_3d_2p Solution of Laplace's equation in the upper or lower half-space subject to the Dirichlet boundary condition on a doubly periodic surface, computed using the double-layer formulation.
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.
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.
lnm_3d

BEMLIB: laplace

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.

FDLIB main page and contents







Directory: 13_turbo


Turbulent flow


This directory contains programs and date related to turbulent flow.

Public subdirectories are printed in green.

Subdirectory Subject
stats Statistics of a turbulent time series recorded in the laboratory by Kurt Keller: 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.

FDLIB home and contents