This is now an iterative process, which makes things better
This commit is contained in:
parent
776734db58
commit
e7a47611d9
1 changed files with 6 additions and 4 deletions
|
|
@ -387,13 +387,15 @@ submodule(moduleMesh) boundaryParticle
|
||||||
|
|
||||||
end do
|
end do
|
||||||
|
|
||||||
|
! Correction for this time step
|
||||||
alpha = 1.d0 - density_incident/density_rest
|
alpha = 1.d0 - density_incident/density_rest
|
||||||
|
|
||||||
! Limit alpha between 0 and 1
|
! Apply correction with a factor of 0.1 to avoid fast changes
|
||||||
alpha = min(alpha, 1.d0)
|
self%alpha(edge%n) = self%alpha(edge%n) + 0.1d0 * alpha
|
||||||
alpha = max(alpha, 0.d0)
|
|
||||||
|
|
||||||
self%alpha(edge%n) = alpha
|
! Limit alpha between 0 and 1
|
||||||
|
self%alpha(edge%n) = min(self%alpha(edge%n), 1.d0)
|
||||||
|
self%alpha(edge%n) = max(self%alpha(edge%n), 0.d0)
|
||||||
|
|
||||||
deallocate(density_nodes)
|
deallocate(density_nodes)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue