Turning off gravitational settling is a valid setting in the input.yaml. It is read and if set to true, populates the falling velocity vector vFall_ in the LAGRIDPlumeModel object. Otherwise it is left uninitialized.
|
//Setup settling velocities |
|
if ( simVars_.GRAVSETTLING ) { |
|
vFall_ = AIM::SettlingVelocity( iceAerosol_.getBinCenters(), \ |
|
met_.tempRef(), simVars_.pressure_Pa ); |
|
} |
However, vFall_ is used unconditionally in LAGRIDPlumeModel::RunTransport() so if settling is off, that points to uninitialized memory. Same when vFall_ is used in LAGRIDPlumeModel::remapAllVars().
Should turning off settling velocity even be an option? But right now it's leads to bugs.
As a side note, vFall_ is only computed once at initialization, but depends on temperature and pressure. The pressure is the reference pressure at which the contrail was emitted in the input.yaml, and T is the interpolated temperature at that point. This is not updated throughout the simulation: all transport steps use the falling velocity computed at $t_0$. I don't know how big of an effect this would make but this seems incorrect? I know that the "most correct" way of doing this would be to compute setting velocity at every cell of the grid, but we could get away with at least updating the numbers based on the mask centroid or something.
Turning off gravitational settling is a valid setting in the
input.yaml. It is read and if set to true, populates the falling velocity vectorvFall_in theLAGRIDPlumeModelobject. Otherwise it is left uninitialized.APCEMM/Code.v05-00/src/Core/LAGRIDPlumeModel.cpp
Lines 85 to 89 in adf714b
However,
vFall_is used unconditionally inLAGRIDPlumeModel::RunTransport()so if settling is off, that points to uninitialized memory. Same whenvFall_is used inLAGRIDPlumeModel::remapAllVars().Should turning off settling velocity even be an option? But right now it's leads to bugs.
As a side note,$t_0$ . I don't know how big of an effect this would make but this seems incorrect? I know that the "most correct" way of doing this would be to compute setting velocity at every cell of the grid, but we could get away with at least updating the numbers based on the mask centroid or something.
vFall_is only computed once at initialization, but depends on temperature and pressure. The pressure is the reference pressure at which the contrail was emitted in theinput.yaml, and T is the interpolated temperature at that point. This is not updated throughout the simulation: all transport steps use the falling velocity computed at