Made the simple forcing to scale with dt s.t. it does not explode so easily

This commit is contained in:
jpekkila
2019-06-19 16:34:23 +03:00
parent f3cbc4984c
commit a7515fbbd7
2 changed files with 10 additions and 10 deletions

View File

@@ -196,7 +196,7 @@ forcing(int3 globalVertexIdx)
(globalVertexIdx.y - ny_min) * dsy,
(globalVertexIdx.z - nz_min) * dsz}; // sink (current index)
Scalar magnitude = .1;
Scalar magnitude = 0.05;
// Vector c = magnitude * (1 / length(b - a)) * normalized(b - a); // Outward flow
Vector c = magnitude * cross(normalized(b - a), (Vector){0, 0, 1}); // Vortex
if (is_valid(c)) { return c; }
@@ -248,7 +248,7 @@ solve(Scalar dt) {
#if LFORCING
if (step_number == 2) {
out_uu = out_uu + forcing(globalVertexIdx);
out_uu = out_uu + dt * forcing(globalVertexIdx);
}
#endif
}