Repository navigation
[com1DFA] Add TJEM entrainment model - #1339
Michael-Pallua wants to merge 21 commits into
Conversation
This reverts commit 39c99bf.
81c6920 to
02df759
Compare
|
Coverage Impact This PR will not change total coverage. Modified Components (1)
Modified Files with Diff Coverage (1)
🛟 Help
|
awirb
left a comment
There was a problem hiding this comment.
I think as the TJEM model is not explained in the docstrings - it is a good idea to add a description thereof to the com1DFA docu already with this PR
| entrModel = cfgGen["entrModel"].lower() | ||
| entrType = entrModelsList.index(entrModel) + 1 | ||
| log.debug("Entrainment Model used: %s, %s" % (entrModelsList[entrType - 1], entrType)) | ||
| print("Entrainment Model used: %s, %s" % (entrModelsList[entrType - 1], entrType)) |
|
|
||
| #++++++++++++ Entrainment Model | ||
| ### Available Models: | ||
| #avaframe |
There was a problem hiding this comment.
this would be more in line with the choice of friction models
| #++++++++++++Entrainment Energy loss | ||
| # Used to determine the energy loss because of entrainment | ||
| entShearResistance = 0 | ||
| entDefResistance = 0 |
There was a problem hiding this comment.
in general I think grouping parameters with respect to the entrainment model that they belong to would make sense
| entrMassCell = entrMassRaster[indCellY, indCellX] | ||
| if entrMassCell > 0.0: | ||
| if entrType == 1: | ||
| dm, areaEntrPart = computeEntMassAndForce(dt, entrMassCell, areaPart, uMag, tau, entEroEnergy, rhoEnt) | ||
| if entrType == 2: | ||
| dm, areaEntrPart, tau = computeEntMassAndForceTjem(dt, entrMassCell, areaPart, uMag, tau, entShearStrength, velMagMin) |
There was a problem hiding this comment.
why is this moved up here and not from line 404 onwards where the if entrMassCell > 0.0: condition is also still required?
There was a problem hiding this comment.
why is this not done all at the same spot?
| double areaPart, double uMag, | ||
| double tau, double entShearStrength, | ||
| double velMagMin): | ||
| """ compute force component due to entrained mass |
There was a problem hiding this comment.
add info about which entrainment model (TJEM)
| areaEntrPart : float | ||
| Area for entrainment energy loss computation | ||
| tau : float | ||
| bottom shear stress, limited to the shear strength of the snow cover if entrainment occurs |
There was a problem hiding this comment.
| bottom shear stress, limited to the shear strength of the snow cover if entrainment occurs | |
| updated bottom shear stress, limited by the shear strength of the snow cover if entrainment occurs |
|
|
||
| dm = max(0.0, tau - tauC) * areaPart * dt / uMag | ||
| # cannot entrain more than the mass available under the particle | ||
| dm = min(dm, entrMassCell * areaPart) |
There was a problem hiding this comment.
is the entrMassCell only updated outside of the loop over the particles, so not after mass has been entrained by one particle within the cell? That would mean the subsequent particle within the loop over the particles k, can entrain more than would still be available?
|
|
||
| #++++++++++++ Entrainment Shear Strength | ||
| # Used to determine the strength of the erodible snow cover when using TJEM Entrainment Model [Pa] | ||
| entShearStrength = 500 |
There was a problem hiding this comment.
why is it not called tauC? Or why is it then in the computeMassAndEntForceTJEM function renamed to tauC?

The goal is to make the TJEM entrainment model, which is already present in
com9MoTVoellmy, available incom1DFA.Short description of changed files:
com1DFACfg.ini:A parameter to select the desired entrainment model (etnrType) is included as well as the parameter of the new entrainment model: the shear strength of the erodible snow cover (entShearStrength).
com1DFA.py:Changes are made to implement the new selection between the two now available entrainment models.
DFAfunctionsCython.pyxandDFAfunctionsCython.pxdA new function,
computeEntMassAndForceTjem(), which implements the equations of the TJEM entrainment model is added.PR Checklist
Please confirm before requesting review:
pytestlocally without failsConfirm before the final merge/rebase into master