Closed ewquon closed 3 years ago
Explanation: What's happening in the previous version of the code is:
if "offset" is specified:
refValue = value + offset
where refValue
is the interpolated TVM inflow plane. This might have worked properly for TVMFV if the patch values were properly initialized the TVM values, but in our case value
does not necessarily get set to refValue
depending on the initial value
and/or valueFraction
.
This looks great, and my tests show that it fixes my problem.
The fix is to update refValue() with offset using
+=
. SOWFA-6 results with TVMIO now appear to be consistent with SOWFA-2.4.x.(*this + offset_->value(t))
can give unexpected results--the entire TVM inflow plane gets wiped out--even whenoffset (0 0 0)
andoffset 0
are specified for U and T, respectively.E.g., comparison of TVMIO/TVMFV on an inflow plane: