#girdap
Please refer to https://uzgoren.github.io/girdap for more information.
This project's aim is to develop object-oriented c++ libraries for solving conservation equations on a self-managed grid.
This project is still in progress. Please give us feedback for the bugs you encountered or new bright ideas you may think of.
###REQUIREMENTs
C++ compiler that accepts C++11 standards
###COMPILE
An executable installer is still being prepared, however compiling from the source is very easy and straightforward. Installation guidelines for Linux and MacOS are provided and tested. Even though Girdap is capable of running on Windows, the installation requires different tools and guide for the installation will be announced later.
####Linux Operating Systems and MacOS
###FAQ ####What is girdap? girdap provides building blocks for numerical simulations of complex transport equations. Tools are built around a grid management platform connected to finite volume method based differential operators. girdap’s primary goals are (1) flexibility and (2) accuracy.
Flexible tools allow researchers to develop new numerical algorithms and educators to teach students existing algorithms. Tools provided aim to shift programming focus more on physics and numerical method to avoid time consuming programming details.
The accuracy is handled by automated grid refinement and coarsening based on the solution field.
girdap does not target audiences who would like to get immediate results for an engineering project. It involves a numerical algorithm development phase. Those who would like to skip such a development can refer to a commercial CFD/multiphysics software.
####Isn’t this done before? Similar projects do exist. OpenFOAM is one example; and another one is FEniCS. Please check them out. They are really good projects. girdap just offers another flavor.
####What does girdap mean? girdap is not an acronym. It means whirlpool in Turkish.
####What operators are included? Time derivative, divergence, gradient, Laplacian, and source terms can be defined for a differential equation.
####How can I install/use girdap? You can retrieve the source code (written in c++ following c++11 standards) at github. You can see examples of main_*.cpp files under src directory so that you can compile and use it in the way you like. Use the script provided in the main directory to compile. Note that our focus is mainly on the development of girdap’s skeleton rather than its transportability so you may experience problems while compiling your first application. This is of course going to change with its first release.
####Can you provide an example? A typical numerical simulation involve the following steps;
- Create a new grid
- Declare your own field variables (defined on cell centers)
- State initial and boundary conditions for each variable
- Start a time loop
- Solve for var_1 governed by a partial differential equation
- Solve for var_2 governed by algebraic equations
- Grid adaptation/movement
- Write an output to screen/file
- Exit
girdap provides tools for each step above. In addition, you can have as many grids and as many variables together governed by different set of equations; and interacting with each other. Such a flexibility allows developing various algorithms for fluid-structure interactions and multiphase flows.
Furthermore, through a driver code (as main.cpp); one can add a custom source term or decide on how to linearize non-linear equations; or how to manage inner and outer loops; how to handle adaptation and many more. It is also possible to link 1D/2D domain with a 3D domain using interpolators between grids. Cell movements can be controlled as well.
Boundary conditions can be defined as a linear function for Dirichlet and Neumann type conditions. This flexibility allows convective heat transfer coefficient to be specified at the boundaries.
Initial conditions can be defined easily through cell iterators on grid.
So a thin long rod interacting with 3D incompressible flow can be declared as follows:
- Create grid1 and grid2
- Declare velocity, pressure and temperature for grid1 (3D); temperature for grid2 (1D)
- State initial and boundary conditions
- Start a time loop
- Link temperature field of grid1 to grid2 as a boundary condition
- Solve heat diffusion equation on grid 2
- Adapt grid2 based on its temperature field
- Solve flow velocity on grid1
- Adapt grid1 based on its velocity field
- Solve pressure equation on grid1
- Correct flow velocity on grid1
- Link temperature field of grid2 to grid1 as a dummy variable
- Solve energy equation with a source term (dummy var) on grid1
- Write an output to screen/file
- Exit
For those who are familiar, this is quite similar to scripting in Matlab.
####What is grid adaptation? Grid adaptation is used in problem with multiple length scales; so that computational time is used wisely. Regions with less interaction handled with coarse resolution; and regions influence the field are handled with fine resolution. So automated grid handling is the key for accuracy and speed.
####How is grid adaptation handled? It relies on splitting a cell into two and merging two neighboring cells. This leads to anisotropic grid refinement. Grid refinement is based on error estimation (before it is available). It is widely reported that indicators based on gradients do not produce quality mesh; and hence we use other indicators for refinement and coarsening.
At the moment, grid focuses on quad cells. While underlying structure for hexa, tri and tetra cells are available, automated adaptive grid refinement and coarsening is available for quad cells. These overall form the envelope of girdap’s skeleton.
####What about parallel computing, MPI, OpenMP? It is not yet considered; but it is within our future plans.
####ACKNOWLEDGEMENT This work is part of a research project supported by a Marie Curie International Reintegration Grant within the 7th European Community Framework Programme.