OpenFOAM solver for internal gravity waves in a stratified fluid