-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Additional LB test cases #2748
Additional LB test cases #2748
Conversation
Codecov Report
@@ Coverage Diff @@
## python #2748 +/- ##
=======================================
+ Coverage 85% 85% +<1%
=======================================
Files 534 534
Lines 25524 25524
=======================================
+ Hits 21948 21949 +1
+ Misses 3576 3575 -1
Continue to review full report at Codecov.
|
On Tue, Apr 30, 2019 at 07:57:24AM -0700, Michael Kuron wrote:
mkuron commented on this pull request.
> +
+ # Reach steady state
+ self.system.integrator.run(700)
+ v_final = np.copy(p.v)
+
+ for i in range(3):
+ self.system.integrator.run(100)
+
+ # Check that particle momentum =-fluid momenum
+ # up to the momentum trnasferred in 1/2 time step
+ np.testing.assert_allclose(
+ p.v * p.mass, -
+ np.array(
+ self.system.analysis.analyze_linear_momentum(
+ include_particles=False)),
+ atol=np.linalg.norm(applied_force) * TIME_STEP * 0.55)
What's this 0.55?
In the currently implemented integration scheme, MD and LB momentum seem to be 1/2 time step apart. The difference between 0.5 and 0.55 is numeric tolerance.
|
So @jngrad should this now be rebased? Most of the commits are broken. |
The two merge commits will make the rebasing/squashing difficult. Not sure if this is worth the effort. I would merge it directly. |
bors r+ |
2748: Additional LB test cases r=fweik a=RudolfWeeber * Buyancy force on a sphere in a box of fluid under gravity * Momentum conservation in a fluid with an external volume force applied and a particle with an oposite force applied @KaiSzuttor @mkuron Could you please take a look at the lb_buoyancy_force test? It only passes, when the fluid density is set to 1. On the other hand, the lb_shear and lb_stokes_sphere tests check boundary forces which do not (and should not) depend on the density. They pass when run with different densities. Also, the application of an external volume force is tested in lb.py in test_a_ext_force... Furthermore, to the lb_momentum_conservation.py test checks the balance between forces applied to the lb and those applied to a particle. Co-authored-by: Rudolf Weeber <weeber@icp.uni-stuttgart.de> Co-authored-by: Florian Weik <fweik@icp.uni-stuttgart.de>
Build succeeded |
2748: Additional LB test cases * Buyancy force on a sphere in a box of fluid under gravity * Momentum conservation in a fluid with an external volume force applied and a particle with an oposite force applied Co-authored-by: Rudolf Weeber <weeber@icp.uni-stuttgart.de> Co-authored-by: Florian Weik <fweik@icp.uni-stuttgart.de>
F = 0.013 | ||
BOX_SIZE = 10 * AGRID | ||
TIME_STEP = 0.1 | ||
AGRID = 1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you use AGRID
equal to unity on purpose?
@KaiSzuttor @mkuron Could you please take a look at the
lb_buoyancy_force test? It only passes, when the fluid density is set to 1.
On the other hand, the lb_shear and lb_stokes_sphere tests check boundary forces which do not (and should not) depend on the density. They pass when run with different densities.
Also, the application of an external volume force is tested in lb.py in test_a_ext_force...
Furthermore, to the lb_momentum_conservation.py test checks the balance between forces applied to the lb and those applied to a particle.