erosiv / soillib

C++20 Geomorphology Simulation Library and Toolbox
MIT License
48 stars 2 forks source link

What do the parameters mean in the configuration file? #16

Closed wanggy-1 closed 8 months ago

wanggy-1 commented 9 months ago

In tools/basic_hydrology/config.yaml, What are the meanings of those parameters and how do they affect the geomorphology? For example, if I don't want to create any lake or pool, how should I adjust these parameters?

lrate: 0.1
scale: 80
max-cycles: 8192
min-basin: 0.05
map:
  dimension:
    - 960
    - 960
water:
  max-age: 1024
  evap-rate: 0.001
  deposition-rate: 0.05
  min-vol: 0.001
  entrainment: 10.0
  gravity: 2.0
  momentum-transfer: 1.0
weigert commented 9 months ago

The code on the main branch does not generate lakes or basins. There is a separate branch for that.

The parameters under water are mostly dimensionless simulation parameters - if you would like to understand what they do, you will have to read the code to understand how the simulation works. Additionally, the convenience of a .yaml config is that you can change parameters without recompiling and see what they do. That's why this file exists.

The remaining parameters are simulation control parameters, e.g. (x,y) map-size and z map-scale. max-cycles is the absolute max number of iterations, and min-basin is the early-termination cutoff, given by the percentage of particles which don't exit the map during their lifetime (i.e. "basin particles"). If the number of particles which don't exit the map drops below min-basin, the hydrological map has been "solved". lrate has to do with time-stepping / exponential averaging for time-deference, but I don't recommend messing around with it. But do what you want!

All of this is quite visible in the code if you take a look inside.

wanggy-1 commented 8 months ago

Thanks for your answer, it's really helpful!