ludwig-cf / ludwig

A lattice Boltzmann code for complex fluids
https://ludwig.epcc.ed.ac.uk
Other
52 stars 35 forks source link

Buoyancy force #288

Closed yehaozju closed 8 months ago

yehaozju commented 9 months ago

Hi, @kevinstratford , I wanna to investigate two types of colloids with different size, thus the different gravity force. But g parameter must be set same. Is there any method to address this problem.

Originally posted by @Yehao19990718 in https://github.com/ludwig-cf/ludwig/issues/57#issuecomment-1825308899

kevinstratford commented 9 months ago

This requires a factor of the volume in the external force. I will have a look.

kevinstratford commented 8 months ago

I've added something that might do the trick in the latest release. See

https://ludwig.epcc.ed.ac.uk/inputs/colloid.html#external-forces

kevinstratford commented 8 months ago

I'll close the issue.

ohenrich commented 8 months ago

@kevinstratford Please check the sections 2.5.5.9 and 2.5.5.10 for typos and grammar (there are text duplications).

Reading the paragraph on "Body force on the fluid when colloids are present" it is not completely clear to me what the new default behaviour is when setting a body force only.

It sounds as if the additional force on the colloid (as described in 2.5.5.10) is automatically applied when a body force is set and colloids are present, giving (as we know now) the correct physical behaviour. So simulating pressure-driven flow doesn't require setting an additional flag, correct?

Which situations would favour the new option colloid_buoyancy?

kevinstratford commented 8 months ago

Ahem. I have obviously confused the issue. I will check.

In short, the behaviour of colloid_gravity is unchanged (uniform force on each particle); colloid_buoyancy is aimed at situations where there are particles of different size present (and should give rise to different force on each).

kevinstratford commented 8 months ago

There is an additional question I see here concerning issue #285 to which the answer is: there is no choice related to force. As the previous behaviour was simply "wrong" (the situation was not anticipated), you now get the "correct" behaviour if there is both a force and a colloid.

There's an example at

tests/regression/d3q27/serial-coll-cf1.inp

This is a separate issue to the gravity, buoyancy question, I think. I have tried to clarify the html docs.

Hope this helps.

ohenrich commented 8 months ago

I think I commented on the wrong conversation. I think this is all good now and clear. Thanks.

kevinstratford commented 8 months ago

Thanks. I will close.