Skip to content

timnoack/openfoam-matrix-export

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenFOAM matrix exporter

This library registers the matrixExporter solver in OpenFOAM. When the solver is invoked, it will export the matrix it is supposed to solve to a file in the Matrix Market format.

Usage

  1. Clone the library to any folder. You may clone it into the $WM_PROJECT_USER_DIR folder, but you can use any other folder as well. Dont forget to clone the submodules as well (--recursive) as the library depends on the fast_matrix_market.
git clone --recursive https://github.com/timnoack/openfoam-matrix-export.git
  1. Build the library. The shared library is automatically copied into the $FOAM_USER_LIBBIN folder.
wmake libso path/to/openfoam-matrix-export
  1. Load the library to your solver application by specifying it in your system/controlDict:
libs ("libMatrixExporter");
  1. Use the matrixExporter solver in your system/fvSolution file:
solvers
{
    T // the name of your field
    {
        solver           matrixExporter;
        matrixFile       "A.mtx";
        sourceFile       "b.mtx";
        initialFieldFile "x.mtx";
        exitAfterExport  yes;
        comment          "Please provide a short description of the testcase and its matrix here.";
    }
}
  1. Run your case as usual. The solver will export the matrix, source vector and initial field to the specified filenames.

About

OpenFOAM matrix exporter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published