AMR-Wind API
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
|
This document is intended for developers who want to understand the C++ code structure and modify the codebase and, therefore, assumes that the reader is familiar with the installation, compilation, and execution steps. If you are new to AMR-Wind and haven't installed/used AMR-Wind previously, we recommend starting with the user manual that provides a detailed overview of the installation process as well as general usage.
How to use this API guide?
This section provides a brief overview of the organization of this API guide so as to enable readers to quickly find the sections that they are interested in. The source code documentation is organized in sections that divides the codebase into logical groups. We recommend that you start here and navigate to the sections that you are interested in.
AMR-Wind is built on top of the AMReX library. The core data structures provide higher-level abstractions on top of AMReX data structures. We recommend reading the AMReX basics chapter to familiarize yourself with the core AMReX terminology and concepts. Once you have read that chapter, read the AMR-Wind core documentation and familiarize yourself with the concept of Field and FieldRepo (see Field management) in AMR-Wind as these are used quite heavily everywhere in the code. Two other global data structures that are used frequently are CFDSim and SimTime. CFDSim
represents the simulation environment and holds references to the mesh, the field repository, time instance, the registered physics instances, the equation systems, and post-processing and I/O utilities. SimTime
holds all attributes related to time within the code and determines when to advance the simulation, exit, or write outputs.
Source code organization
Upon successful download/clone, the base repository (amr-wind
) has source code is organized in subdirectories described below:
amr-wind
– C++ source files. All code is located within this directoryunit_tests
– Unit-tests for individual modules/classescmake
– Functions, utilities used during CMake configuration phasedocs
– User manual (Sphinx-based) and Doxygen filessubmods
– Third-party libraries and dependenciestest
– Regression tests and associated infrastructuretools
– Miscellaneous post-processing scripts and other utilities
When developing new features, we strongly recommend creating a unit-test and develop features incrementally and testing as you add capabilities. Unit-tests are also a good way to explore the usage of individual components of the code.
Contributing
AMR-Wind is an open-source code and we welcome contributions from the community. Please consult the developer documentation section of the user manual to learn about the process of submitting code enhancements, bug-fixes, documentation updates, etc.
License
AMR-Wind is licensed under BSD 3-clause license. Please see the LICENSE included in the source code repository for more details.
Generated by 1.12.0