com1DFA.com1DFA

Main functions for python DFA kernel

Functions

DFAIterate

Perform time loop for DFA simulation

addMaxValuesToDF

add max values of peakFields to dataframe and optionally rangeValue

appendFieldsParticles

append fields and optionally particle dictionaries to list for export

com1DFACore

Run main com1DFA model

com1DFACoreTask

This is a subdivision of com1DFAMain to allow for parallel execution.

com1DFAMain

preprocess information from ini and run all desired simulations, create outputs and reports

com1DFAPostprocess

postprocessing of simulation results: save configuration to csv, create plots and report

com1DFAPreprocess

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

computeEulerTimeStep

compute next time step using an euler forward scheme

createReportDict

create simulaton report dictionary

exportFields

export result fields to Outputs directory according to result parameters and time step that can be specified in the configuration file

fetchRelVolume

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

getRelThFromPart

get release thickness for initialising particles - use max value

getSimTypeList

Define available simulation types of requested types

initializeFields

Initialize fields and update particles flow thickness.

initializeMassEnt

Initialize mass for entrainment

initializeMesh

Create rectangular mesh

initializeParticles

Initialize DFA simulation

initializeRelVol

initialize release line and apply thickness to compute release volume

initializeResistance

Initialize resistance matrix

initializeSecRelease

Initialize secondary release area

initializeSimulation

create simulaton report dictionary

prepareInputData

Fetch input data

prepareReleaseEntrainment

set thickness values for release, secondary release and entrainment

prepareVarSimDict

Prepare a dictionary with simulations that shall be run with varying parameters following the variation dict

readFields

Read ascii files within a directory and return List of dictionaries

releaseSecRelArea

Release secondary release area if trigered Initialize particles of the trigured secondary release area and add them to the simulation (particles dictionary)

reportAddTimeMassInfo

Add time and mass info to report

runOrLoadCom1DFA

Run or load DFA results depending on runDFAModule=True or False

savePartToPickle

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

setDEMoriginToZero

set origin of DEM to 0,0

setThickness

set thickness in line dictionary of release, entrainment, second.

setupresultsDF

setup result fields max values dataframe for initial time step for all resTypes used and optional for avalanche front

trackParticles

track particles from initial area

updateSavingTimeStep

update saving time step list

writeMBFile

write mass balance info to file