ludwig-cf / ludwig

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

Colloids with different density #332

Open kevinstratford opened 1 week ago

kevinstratford commented 1 week ago

At the moment, all colloids have a uniform density rho0. This is usually equal to the fluid density.

In principle, one can give each colloid a different density. This would require:

  1. Addition of a rho component in the colloid structure.
  2. Addition of relevant i/o for rho in colloid.c.
  3. The addition of a mechanism to assign a density to each colloid in the input, with a default of rho0.
  4. An updated mass computation to account for the density. It is possible that this occurs in more than one place, but it should really be only colloid_state_mass().
  5. A check on the buoyancy computation (interaction.c).
yehaozju commented 5 days ago

Thank you very much for your reply! I have modified the code according to your suggestion.