Giter VIP home page Giter VIP logo

titan2d / titan2d Goto Github PK

View Code? Open in Web Editor NEW
21.0 9.0 15.0 101.68 MB

The TITAN2D toolkit is used for modeling of geophysical mass flows over natural terrain (volcanic flows, avalanches, landslides, ...).

Home Page: https://vhub.org/resources/titan2d

License: Other

Shell 1.88% Perl 0.81% Python 7.46% C 61.25% C++ 14.73% Makefile 0.35% M4 0.54% Java 12.68% SWIG 0.05% Dockerfile 0.26%
amr hpc digital-elevation-model geophysical-fluid shallow-water-equations volcanology landslide hazard-assessment avalanche

titan2d's Introduction

TITAN2D

TITAN2D is a free software application developed by the Geophysical Mass Flow Group at the State University of New York (SUNY) at Buffalo. TITAN2D was developed for the purpose of simulating granular flows (primarily geological mass flows such as debris avalanches and landslides) over digital elevation models (DEM)s of natural terrain. The code is designed to help scientists and civil protection authorities assess the risk of, and mitigate, hazards due to dry debris flows and avalanches. TITAN2D combines numerical simulations of a flow with digital elevation data of natural terrain supported through a Geographical Information System (GIS) interface such as GRASS.

TITAN2D was desined for parallel computing on multiple processes/threads, which effectively increases computational power, decreases computing time, and allows for the use of large data sets.

Adaptive Mesh Refienemnt (AMR) allows for the concentration of computing power on regions of special interest. Mesh refinement captures the complex flow features that occur at the leading edge of a flow, as well as locations where rapid changes in topography induce large mass and momentum fluxes. Mesh unrefinement is applied where solution values are relatively constant or small to further improve computational efficiency.

Reference papers:

Modeling Features

TITAN2D currently supports the following rheology models as modeling modules:

  • Mohr-Coulomb
  • Two-fluid Pitman-Le
  • Pouliquen-Forterre
  • Voelmy-Salm

Please see the User Guide to learn how to use these modeling features.

Installation

See INSTALL.MD for compilation instruction See User Guide for installation and usage

Execution

In order to run TITAN2D in openMP mode (prefered at this time):

source <path_to_titan>/bin/titanvars.sh
<path_to_titan>/bin/titan -nt <number of threads> <input python script>

In order to run TITAN2D in hybrid MPI/OpenMP mode:

source <path_to_titan>/bin/titanvars.sh
mpirun -np <number of processes> <path_to_titan>/bin/titan -nt <number of threads> <input python script>

Cite TITAN2D

If you use TITAN2D for your academic research, you are highly encouraged to cite the following publications:

@article{titan2d2005,
  title={Parallel adaptive numerical simulation of dry avalanches over natural terrain},
  author={Patra, Abani K and Bauer, Andrew C and Nichita, CC and Pitman, E Bruce and Sheridan, Michael F and Bursik, M and Rupp, Byron and Webber, A and Stinton, AJ and Namikawa, LM and others},
  journal={Journal of Volcanology and Geothermal Research},
  volume={139},
  number={1-2},
  pages={1--21},
  year={2005},
  publisher={Elsevier}
}
@inproceedings{titan2d2019,
  title={Modernizing Titan2D, a parallel AMR geophysical flow code to support multiple rheologies and extendability},
  author={Simakov, Nikolay A and Jones-Ivey, Renette L and Akhavan-Safaei, Ali and Aghakhani, Hossein and Jones, Matthew D and Patra, Abani K},
  booktitle={International Conference on High Performance Computing},
  pages={101--112},
  year={2019},
  organization={Springer}
}
@article{titan2d2020,
  title={Comparative Analysis of the Structures and Outcomes of Geophysical Flow Models and Modeling Assumptions Using Uncertainty Quantification},
  author={Patra, Abani and Bevilacqua, Andrea and Akhavan-Safaei, Ali and Pitman, E Bruce and Bursik, Marcus and Hyman, David},
  journal={Frontiers in Earth Science},
  volume={8},      
  pages={275},     
  doi={10.3389/feart.2020.00275},      
  issn={2296-6463}, 
  year={2020},
  publisher={Frontiers}
}

titan2d's People

Contributors

aliakhav avatar haghakhani avatar nsimakov avatar palakkpatel avatar rljbufny1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

titan2d's Issues

Is Mac binary available?

Thank you very much for developing such a handy tool.
I am wondering whether a macOS version is available?

How to generate a real landslide mode

Dear All,
Titan2D is a powerful code for the simulation of the landslide. But how to generate a real landslide model with complex boundary. For I only see some examples with the simple shape, such as cylinder and so on.
Thanks a lot!
Best regards,
Henry

TITAN2D make issues

Hello All,
I am installing titan2d using Ubuntu 18.04 LTS on Windows 10.I encountered some problems, some of which I have solved, but there are still some problems I can't solve.When i compiled Titan2d using

make -j

it was giving me error which says:

lh@DESKTOP-R0338SE:~/TITAN2D/titan_wsp/titan2d_bld/iccoptompmpi$ make -j6
Making all in src
make[1]: Entering directory '/home/lh/TITAN2D/titan_wsp/titan2d_bld/iccoptompmpi/src'
Making all in header
make[2]: Entering directory '/home/lh/TITAN2D/titan_wsp/titan2d_bld/iccoptompmpi/src/header'
make  all-am
make[3]: Entering directory '/home/lh/TITAN2D/titan_wsp/titan2d_bld/iccoptompmpi/src/header'
make[3]: Leaving directory '/home/lh/TITAN2D/titan_wsp/titan2d_bld/iccoptompmpi/src/header'
make[2]: Leaving directory '/home/lh/TITAN2D/titan_wsp/titan2d_bld/iccoptompmpi/src/header'
Making all in gisapi
make[2]: Entering directory '/home/lh/TITAN2D/titan_wsp/titan2d_bld/iccoptompmpi/src/gisapi'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/lh/TITAN2D/titan_wsp/titan2d_bld/iccoptompmpi/src/gisapi'
Making all in useful
make[2]: Entering directory '/home/lh/TITAN2D/titan_wsp/titan2d_bld/iccoptompmpi/src/useful'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/lh/TITAN2D/titan_wsp/titan2d_bld/iccoptompmpi/src/useful'
Making all in preproc
make[2]: Entering directory '/home/lh/TITAN2D/titan_wsp/titan2d_bld/iccoptompmpi/src/preproc'
mpic++ -DHAVE_CONFIG_H -I. -I../../../../titan2d/src/preproc -I../../src/header   -DUSE_MPI -DMPICH_IGNORE_CXX_SEEK  -I/home/lh/TITAN2D/titan_wsp/hdf5/include -I/usr/include/gdal -I../../../../titan2d/src/preproc/../gisapi -I../../../../titan2d/src/preproc/../useful -std=c++11 -O3 -fopenmp -MT libtitan_preprocess_a-preprocess.o -MD -MP -MF .deps/libtitan_preprocess_a-preprocess.Tpo -c -o libtitan_preprocess_a-preprocess.o `test -f 'preprocess.C' || echo '../../../../titan2d/src/preproc/'`preprocess.C
mpic++ -DHAVE_CONFIG_H -I. -I../../../../titan2d/src/preproc -I../../src/header   -DUSE_MPI -DMPICH_IGNORE_CXX_SEEK  -I/home/lh/TITAN2D/titan_wsp/hdf5/include -I/usr/include/gdal -I../../../../titan2d/src/preproc/../gisapi -I../../../../titan2d/src/preproc/../useful -std=c++11 -O3 -fopenmp -MT libtitan_preprocess_a-createfunky.o -MD -MP -MF .deps/libtitan_preprocess_a-createfunky.Tpo -c -o libtitan_preprocess_a-createfunky.o `test -f 'createfunky.C' || echo '../../../../titan2d/src/preproc/'`createfunky.C
In file included from ../../../../titan2d/src/preproc/../header/hpfem.h:40:0,
                 from ../../../../titan2d/src/preproc/../header/integrators.h:19,
                 from ../../../../titan2d/src/preproc/../header/titan_simulation.h:27,
                 from ../../../../titan2d/src/preproc/preprocess.C:33:
../../../../titan2d/src/preproc/../header/properties.h: In member function ‘void TiScale::h5write(H5::CommonFG*, std::__cxx11::string) const’:
../../../../titan2d/src/preproc/../header/properties.h:91:33: error: ‘class H5::CommonFG’ has no member named ‘createGroup’
         H5::Group group(parent->createGroup(group_name));
                                 ^
../../../../titan2d/src/preproc/../header/properties.h: In member function ‘void TiScale::h5read(const H5::CommonFG*, std::__cxx11::string)’:
../../../../titan2d/src/preproc/../header/properties.h:103:33: error: ‘const class H5::CommonFG’ has no member named  ‘openGroup’
         H5::Group group(parent->openGroup(group_name));
                                 ^
In file included from ../../../../titan2d/src/preproc/../header/hpfem.h:40:0,
                 from ../../../../titan2d/src/preproc/../header/integrators.h:19,
                 from ../../../../titan2d/src/preproc/../header/titan_simulation.h:27,
                 from ../../../../titan2d/src/preproc/preproc.h:28,
                 from ../../../../titan2d/src/preproc/createfunky.C:33:
../../../../titan2d/src/preproc/../header/properties.h: In member function ‘void TiScale::h5write(H5::CommonFG*, std::__cxx11::string) const’:
../../../../titan2d/src/preproc/../header/properties.h:91:33: error: ‘class H5::CommonFG’ has no member named ‘createGroup’
         H5::Group group(parent->createGroup(group_name));
                                 ^
../../../../titan2d/src/preproc/../header/properties.h: In member function ‘void TiScale::h5read(const H5::CommonFG*, std::__cxx11::string)’:
../../../../titan2d/src/preproc/../header/properties.h:103:33: error: ‘const class H5::CommonFG’ has no member named  ‘openGroup’
         H5::Group group(parent->openGroup(group_name));
                                 ^
In file included from ../../../../titan2d/src/preproc/../header/hpfem.h:40:0,
                 from ../../../../titan2d/src/preproc/../header/integrators.h:19,
                 from ../../../../titan2d/src/preproc/../header/titan_simulation.h:27,
                 from ../../../../titan2d/src/preproc/preprocess.C:33:
../../../../titan2d/src/preproc/../header/properties.h: In member function ‘void TimeProps::h5write(H5::CommonFG*, std::__cxx11::string) const’:
../../../../titan2d/src/preproc/../header/properties.h:584:33: error: ‘class H5::CommonFG’ has no member named ‘createGroup’
         H5::Group group(parent->createGroup(group_name));
                                 ^
../../../../titan2d/src/preproc/../header/properties.h: In member function ‘void TimeProps::h5read(const H5::CommonFG*, std::__cxx11::string)’:
../../../../titan2d/src/preproc/../header/properties.h:606:33: error: ‘const class H5::CommonFG’ has no member named  ‘openGroup’
         H5::Group group(parent->openGroup(group_name));
                                 ^
In file included from ../../../../titan2d/src/preproc/../header/hpfem.h:40:0,
                 from ../../../../titan2d/src/preproc/../header/integrators.h:19,
                 from ../../../../titan2d/src/preproc/../header/titan_simulation.h:27,
                 from ../../../../titan2d/src/preproc/preproc.h:28,
                 from ../../../../titan2d/src/preproc/createfunky.C:33:
../../../../titan2d/src/preproc/../header/properties.h: In member function ‘void TimeProps::h5write(H5::CommonFG*, std::__cxx11::string) const’:
../../../../titan2d/src/preproc/../header/properties.h:584:33: error: ‘class H5::CommonFG’ has no member named ‘createGroup’
         H5::Group group(parent->createGroup(group_name));
                                 ^
../../../../titan2d/src/preproc/../header/properties.h: In member function ‘void TimeProps::h5read(const H5::CommonFG*, std::__cxx11::string)’:
../../../../titan2d/src/preproc/../header/properties.h:606:33: error: ‘const class H5::CommonFG’ has no member named  ‘openGroup’
         H5::Group group(parent->openGroup(group_name));
                                 ^
../../../../titan2d/src/preproc/preprocess.C: In function ‘void Write_data(int, int, int, int, int, NodePreproc*, ElementPreproc**, BoundaryPreproc*, unsigned int*, unsigned int*, double*, double*, char**, double*, double*)’:
../../../../titan2d/src/preproc/preprocess.C:652:43: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
         FILE *fp = fopen_bin(filename, "w");
                                           ^
Makefile:493: recipe for target 'libtitan_preprocess_a-createfunky.o' failed
make[2]: *** [libtitan_preprocess_a-createfunky.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Makefile:465: recipe for target 'libtitan_preprocess_a-preprocess.o' failed
make[2]: *** [libtitan_preprocess_a-preprocess.o] Error 1
make[2]: Leaving directory '/home/lh/TITAN2D/titan_wsp/titan2d_bld/iccoptompmpi/src/preproc'
Makefile:356: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/lh/TITAN2D/titan_wsp/titan2d_bld/iccoptompmpi/src'
Makefile:382: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

By the way,I found some error in the tutorial

../../titan2d/configure --prefix=`pwd` --with-gdal=$TITAN_GDAL --with-hdf5=$TITAN_HDF5 \
--with-swig=$TITAN_SWIG PYTHON=$TITAN_PYTHON/bin/python2.7\
--enable-mpi --enable-openmp CXX=mpic++ CXXFLAGS=-O3 --disable-java-gui

We need to add a space after python 2.7

../../titan2d/configure --prefix=`pwd` --with-gdal=$TITAN_GDAL --with-hdf5=$TITAN_HDF5 \
--with-swig=$TITAN_SWIG PYTHON=$TITAN_PYTHON/bin/python2.7 \
--enable-mpi --enable-openmp CXX=mpic++ CXXFLAGS=-O3 --disable-java-gui

Otherwise, an error will be reported #9

error: Python interpreter is too old

And we need to rename README.md to README
Otherwise,when we input

aclocal;autoheader;autoconf;automake --add-missing --copy

it would report an error

lh@DESKTOP-R0338SE:~/TITAN2D/titan_wsp/titan2d$ aclocal;autoheader;autoconf;automake --add-missing --copy
Makefile.am: error: required file './README' not found
/usr/share/automake-1.15/am/java.am: warning: JAVAROOT was already defined in condition ENABLE_JAVA_GUI, which is included in condition TRUE ...
gui/Makefile.am:16:   while processing 'dist_noinst_JAVA'
gui/Makefile.am:14: ... 'JAVAROOT' previously defined here

Titan2D dependency package do not contain python. Check path.

Hi. I tried to install Titan2D with dep-packages. Everything went well until I failed to configure, compile and install it after creating titan2d_bld. The error said:

configure: error: Titan2D dependency package (/full/path/to/titan2d_dep) do not contain python. Check path

How to solve this? Thank you.

Inconsistent use of tabs and space in indentation on line 47

I download the Titan2D 4.0 version, suddenly when I try to run the interface using titan_gui.py it gave me error of "inconsistent use of tabs and spaces in indentation on line 47" here is some code of the titan_gui.py

#!/usr/bin/env python
#*******************************************************************
#* Copyright (C) 2003 University at Buffalo
#*
#* This software can be redistributed free of charge.  See COPYING
#* file in the top distribution directory for more details.
#*
#* This software is distributed in the hope that it will be useful,
#* but WITHOUT ANY WARRANTY; without even the implied warranty of
#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#*
#* Author: 
#* Description: this is an executable python script
#*
#*******************************************************************
#* $Id: titan_gui.py 235 2012-03-29 07:04:35Z dkumar $ 
#*

import sys,os,math,string,re,socket

import Tkinter
from Tkinter import *
import SimpleDialog,tkMessageBox
import tkFileDialog

class FinalInstructions:
    def __init__(self,master,instruction_string):
        Label(master, text=instruction_string).grid(row=0,column=0,sticky=W,columnspan=3)
        Button(master, text="Quit", command=master.quit).grid(row=3,column=1)

class QuestionTemplate5:
    def __init__(self,master,src_number,filename,directory,heightscale):
        Label(master, text="Information for Flux Source Number "+str(src_number+1)).grid(row=0,column=0,sticky=W,columnspan=2)
        Label(master, text="Extrusion flux rate [m/s]:").grid(row=1,column=0,sticky=W)
        Label(master, text="Active Time [s], start, end:").grid(row=2,column=0,sticky=W)
        Label(master, text="Center of the source, xc, yc (UTM E, UTM N):").grid(row=3,column=0,sticky=W)
        Label(master, text="Major and Minor Extent, majorR, minorR (m, m):").grid(row=4,column=0,sticky=W)        
        Label(master, text="Orientation (angle [degrees] from X axis to major axis):").grid(row=5,column=0,sticky=W)
        Label(master, text="Initial speed [m/s]:").grid(row=6,column=0,sticky=W)
        Label(master, text="Initial direction ([degrees] from X axis):").grid(row=7,column=0,sticky=W)


        self.influx = Entry(master)
        self.start_time = Entry(master)
        self.end_time   = Entry(master)
        self.xcenter = Entry(master)
	self.ycenter = Entry(master) // the error is on this line
        self.majradius = Entry(master)
        self.minradius = Entry(master)
        self.orientation = Entry(master)
        self.Vmagnitude = Entry(master)
        self.Vdirection = Entry(master)

TITAN2D installation issues

As I was about to compile it using
make -j
this error shows up:

../../../../titan2d/src/geoflow/stats.C: In member function ‘void StatProps::calc_stats(int, MatProps*, TimeProps*, DischargePlanes*, LocalQuants*, double)’:
../../../../titan2d/src/geoflow/stats.C:172:22: error: ‘HUGE’ was not declared in this scope
double m_x_min = HUGE;
^~~~
Makefile:382: recipe for target 'stats.o' failed
make[2]: *** [stats.o] Error 1
make[2]: *** Waiting for unfinished jobs....
mv -f .deps/flux_srcs.Tpo .deps/flux_srcs.Po
mv -f .deps/integrators.Tpo .deps/integrators.Po
make[2]: Leaving directory '/home/lnp/titan_wsp/titan2d_bld/iccoptompmpi/src/geoflow'
Makefile:356: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/lnp/titan_wsp/titan2d_bld/iccoptompmpi/src'
Makefile:382: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

I am installing titan2d using Ubuntu 18.04 LTS on Windows 10. I am cloning titan2d using github.

TITAN2D installation issues

Hello. I tried to install Titan2D with INSTALL.MD. Everything went well until the last step"titan2d installation". when i input

../../titan2d/configure --prefix=`pwd` --with-gdal=$TITAN_GDAL --with-hdf5=$TITAN_HDF5 \
--with-swig=$TITAN_SWIG PYTHON=$TITAN_PYTHON/bin/python2.7\
--enable-mpi --enable-openmp CXX=mpic++ CXXFLAGS=-O3 --disable-java-gui

The error said:configure:
error: Python interpreter is too old
How to solve this? Thank you.

parallel write to single hdf5 file

Right now parallel runs record output to num_proc files, which is inconvinient to use later. Ideally all processes should write to a single file

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.