CVT_BASIS_FLOW is a FORTRAN90 program which extracts representative solution modes of a set of solutions to a fluid flow PDE.
The selection process uses K-Means clustering, which can be considered to be a discrete version of the CVT algorithm (Centroidal Voronoi Tessellation).
The selected modes will generally be "well spread out" in the space spanned by the set of solutions. Such a set of modes might be useful as a basis for a low-dimensional approximation of new solutions, as long as it may be assumed that these new solutions do not have significant components that were not evident in the original solution data.
Specifically, a partial differential equation (PDE) has been defined, specifying the time dependent flow of a fluid through a region. The PDE specification includes a parameter ALPHA whose value strongly affects the behavior of the flow. The steady state solution S0 is computed for a particular value of ALPHA. Then the time dependent problem is solved over a fixed time interval, with ALPHA varying from time to time. A set of several hundred solutions S(T(I),ALPHA(I)) are saved.
The need is to try to extract from this solution data the typical modes of behavior of the solution. Such a set of modes may then be used as a finite element basis that is highly tuned to the physics of the problem, so that a very small set of basis functions can be used to closely approximate the behavior of the solution over a range of values of ALPHA.
The method of extracting information from the solution data uses a form of K-Means clustering. The program will try to cluster the data, that is, to organize the data by defining a number of cluster centers, which are also points in N dimensional space, and assigning each record to the cluster associated with a particular center.
The method of assigning data aims to minimize the cluster energy, which is taken to be the sum of the squares of the distances of each data point from its cluster center.
In some contexts, it makes sense to use the usual Euclidean sort of distance. In others, it may make more sense to replace each data record by a normalized version, and to assign distance by computing angles between the unit vectors.
Because the data comes from a finite element computation, and the results may be used as a new reduced basis, it may be desirable to carry out mass matrix preconditioning of the data, so that output vectors (cluster generators) are pairwise orthogonal in the L2 inner product (integration of the product of the finite element functions over the domain).
Because the results may be used as a new reduced basis, it may be desirable, once the results have been computed, to apply a Gram-Schmidt orthogonalization procedure, so that the basis vectors have unit Euclidean norm, and are pairwise orthogonal.
The current version of the program assumes that a steady state solution SS of the PDE is known, and that a multiple of SS is to be subtracted from each solution vector before processing.
FILES: the program assumes the existence of the following files: (the actual names of the files are specified by the user at run time. The names used here are just suggestions.)
INPUT: at run time, the user specifies:
OUTPUT: the program computes basis_num basis vectors. The first vector is written to the file gen_001.txt; again, the output vectors are written with two values per line, since this represents the two components of velocity at a particular node.
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
CVT_BASIS_FLOW is available in a FORTRAN90 version.
BRAIN_SENSOR_POD, a MATLAB program which applies the method of Proper Orthogonal Decomposition to seek underlying patterns in sets of 40 sensor readings of brain activity.
CVT_BASIS, a FORTRAN90 program which is similar to CVT_BASIS_FLOW, but handles any general set of data vectors.
CVTP, a FORTRAN90 library which creates a CVTP, that is, a Centroidal Voronoi Tessellation on a periodic domain.
POD_BASIS_FLOW, a FORTRAN90 program which is similar to CVT_BASIS_FLOW, but uses POD methods to extract representative modes from the data.
PDE solution datasets you may copy include:
This program has been run with a number of different datasets, and with various requirements as to normalization and so on. The purpose of most of the runs is to find a generator set of given size. The input and output of each run is stored in a separate subdirectory.
Now we worked with 500 flow solutions in the TCELL region. We subtract 5/3 of steady solution from 1-250, and 1/3 from 251 through 500. We DON'T normalize the PDE solutions.
The next set of runs worked with 500 flow solutions in the TCELL region. We subtract 5/3 of steady solution from 1-250, and 1/3 from 251 through 500. Now we NORMALIZE the PDE solutions before processing them.
The next set of runs worked with 500 flow solutions in the TCELL region. We subtract 5/3 of steady solution from 1-250, and 1/3 from 251 through 500. We DON'T normalize the PDE solutions. We discard half the data, keeping the EVEN steps, 2, 4, ..., 500.
The next set of runs works with 500 flow solutions in the INOUT region. We subtract 5/3 of steady solution from 1-250, and 1/3 from 251 through 500. We DON'T normalize the PDE solutions.
The next set of runs works with 500 flow solutions in the INOUT region. We subtract 5/3 of steady solution from 1-250, and 1/3 from 251 through 500. We NORMALIZE the PDE solutions.
The next set of runs works with 500 flow solutions in the INOUT region. We subtract 5/3 of steady solution from 1-250, and 1/3 from 251 through 500. We DON'T normalize the PDE solutions. Before we proceed, we DROP the ODD numbered PDE solutions
The next set of runs works with 500 flow solutions in the CAVITY region. We subtract 5/3 of steady solution from 1-250, and 1/3 from 251 through 500. We DON'T normalize the PDE solutions.
The next set of runs works with 500 flow solutions in the CAVITY region. We subtract 5/3 of steady solution from 1-250, and 1/3 from 251 through 500. We NORMALIZE the PDE solutions.
The next set of runs works with 500 flow solutions in the CAVITY region. We subtract 5/3 of steady solution from 1-250, and 1/3 from 251 through 500. We DON'T normalize the PDE solutions. Before we proceed, we DROP the ODD numbered PDE solutions
The next set of runs works with 500 flow solutions in the CAVITY region. We subtract 5/3 of steady solution from 1-250, and 1/3 from 251 through 500. We normalize the PDE solutions. We use MASS MATRIX preconditioning.
The next set of runs works with 500 flow solutions in the INOUT region. We subtract 5/3 of steady solution from 1-250, and 1/3 from 251 through 500. We normalize the PDE solutions. We use MASS MATRIX preconditioning.
The next set of runs works with 500 flow solutions in the TCELL region. We subtract 5/3 of steady solution from 1-250, and 1/3 from 251 through 500. We normalize the PDE solutions. We use MASS MATRIX preconditioning.
The next set of runs works with 500 flow solutions in the CAVITY region. We subtract 5/3 of steady solution from 1-250, and 1/3 from 251 through 500. We do not normalize the PDE solutions. We use MASS MATRIX preconditioning.
The next set of runs works with 500 flow solutions in the INOUT region. We subtract 5/3 of steady solution from 1-250, and 1/3 from 251 through 500. We do not normalize the PDE solutions. We use MASS MATRIX preconditioning.
The next set of runs works with 500 flow solutions in the TCELL region. We subtract 5/3 of steady solution from 1-250, and 1/3 from 251 through 500. We do not normalize the PDE solutions. We use MASS MATRIX preconditioning.
The next set of runs works with 500 flow solutions in the CAVITY region. We subtract 5/3 of steady solution from 1-250, and 1/3 from 251 through 500. We do not normalize the PDE solutions. We drop the odd numbered data vectors. We use MASS MATRIX preconditioning.
The next set of runs works with 500 flow solutions in the INOUT region. We subtract 5/3 of steady solution from 1-250, and 1/3 from 251 through 500. We do not normalize the PDE solutions. We drop the odd numbered data vectors. We use MASS MATRIX preconditioning.
The next set of runs works with 500 flow solutions in the TCELL region. We subtract 5/3 of steady solution from 1-250, and 1/3 from 251 through 500. We do not normalize the PDE solutions. We drop the odd numbered data vectors. We use MASS MATRIX preconditioning.
The next set of runs works with 800 flow solutions in the INOUT2 region. We subtract 5/3 of steady solution from 1-400, and 1/3 from 401 through 800. We DON'T normalize the PDE solutions.
The next set of runs works with 800 flow solutions in the INOUT2 region. We subtract 5/3 of steady solution from 1-400, and 1/3 from 401 through 800. We DON'T normalize the PDE solutions. We use mass matrix preconditioning.
The next set of runs works with 40 scalar flow solutions in the one-dimensional BURGERS equation.
You can go up one level to the FORTRAN90 source codes.