com1DFA.com1DFA
Main functions for python DFA kernel
Functions
Perform time loop for DFA simulation |
|
add max values of peakFields to dataframe and optionally rangeValue |
|
append fields and optionally particle dictionaries to list for export |
|
Run main com1DFA model |
|
This is a subdivision of com1DFAMain to allow for parallel execution. |
|
preprocess information from ini and run all desired simulations, create outputs and reports |
|
postprocessing of simulation results: save configuration to csv, create plots and report |
|
preprocess information from configuration, read input data and gather into inputSimFiles, create one config object for each of all desired simulations, create dataFrame with one line per simulations of already existing sims in avalancheDir |
|
compute next time step using an euler forward scheme |
|
create simulaton report dictionary |
|
export result fields to Outputs directory according to result parameters and time step that can be specified in the configuration file |
|
compute release area volume using release line and thickness info and dem if in config settings secRelArea is True - also include secondary release area in release volume estimate |
|
get release thickness for initialising particles - use max value |
|
Define available simulation types of requested types |
|
Initialize fields and update particles flow thickness. |
|
Initialize mass for entrainment |
|
Create rectangular mesh |
|
Initialize DFA simulation |
|
initialize release line and apply thickness to compute release volume |
|
Initialize resistance matrix |
|
Initialize secondary release area |
|
create simulaton report dictionary |
|
Fetch input data |
|
set thickness values for release, secondary release and entrainment |
|
Prepare a dictionary with simulations that shall be run with varying parameters following the variation dict |
|
Read ascii files within a directory and return List of dictionaries |
|
Release secondary release area if trigered Initialize particles of the trigured secondary release area and add them to the simulation (particles dictionary) |
|
Add time and mass info to report |
|
Run or load DFA results depending on runDFAModule=True or False |
|
Save each dictionary from a list to a pickle in outDir; works also for one dictionary instead of list Note: particle coordinates are still in com1DFA reference system with origin 0,0 |
|
set origin of DEM to 0,0 |
|
set thickness in line dictionary of release, entrainment, second. |
|
setup result fields max values dataframe for initial time step for all resTypes used and optional for avalanche front |
|
track particles from initial area |
|
update saving time step list |
|
write mass balance info to file |