载入中...
搜索中...
未找到
CaveRoughnessTransfer.cpp
浏览该文件的文档.
2
3#include <algorithm>
4
5namespace eve::procgen {
6
8 const float relief = std::clamp(input.relief, -1.f, 1.f);
9 const float flow = std::clamp(input.hydraulicIntensity, 0.f, 2.f) * 0.5f;
10 const float coupling = std::clamp(input.coupling, 0.f, 1.f);
11
12 // Convex relief stays in contact with replenished water, while negative relief
13 // represents recirculating or stagnant pockets. Strong flow partly ventilates the
14 // pockets but increases transfer over exposed asperities. This is deliberately a
15 // bounded sub-grid proxy; resolved flow remains owned by CaveHydrology.
16 const float ridgeExposure = std::max(relief, 0.f) * (0.45f + 0.55f * flow);
17 const float recessShelter = std::max(-relief, 0.f) * (1.f - 0.35f * flow);
18 const float multiplier = std::clamp(1.f + coupling * (0.45f * ridgeExposure - 0.40f * recessShelter), 0.60f, 1.45f);
19 return {multiplier, ridgeExposure, recessShelter};
20}
21
22} // namespace eve::procgen
EvpackChunkInput input
Definition Evpack.cpp:170
CaveRoughnessTransferSample sampleCaveRoughnessTransfer(const CaveRoughnessTransferInput &input)
Estimate local reactive transport over a rough carbonate wall.
Inputs for rough-wall control of local dissolution mass transfer.
Bounded mass-transfer response of an exposed ridge or sheltered recess.