com1DFA.com1DFAΒΆ

Main functions for python DFA kernel

Functions

DFAIterate

Perform time loop for DFA simulation

appendFieldsParticles

append fields and optionally particle dictionaries to list for export

checkParticlesInRelease

remove particles laying outside the polygon

com1DFACore

Run main com1DFA model

com1DFAMain

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

computeEulerTimeStep

compute next time step using an euler forward scheme

computeTravelAngle

Compute the travel angle associated to the particles

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

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 depth

initializeMassEnt

Initialize mass for entrainment

initializeMesh

Create rectangular mesh

initializeParticles

Initialize DFA simulation

initializeResistance

Initialize resistance matrix

initializeSimulation

create simulaton report dictionary

pointInPolygon

find particles within a polygon

polygon2Raster

convert line to raster

prepareArea

convert shape file polygon to raster

prepareInputData

Fetch input data

prepareReleaseEntrainment

get Simulation to run for a given release

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

savePartToPickle

Save each dictionary from a list to a pickle in outDir; works also for one dictionary instead of list

setDEMoriginToZero

set origin of DEM to 0,0

setRelThIni

Add thickness values in configuration file according to thickness flags, ini settings or shapefile attributes and create one cfgFile for each releaseScenario

setThickness

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

trackParticles

track particles from initial area

updateSavingTimeStep

update saving time step list

writeMBFile

write mass balance info to file