Skip to content

Reply To: Implement Gravity in Shen Chen model

#4509
mgaedtke
Keymaster

Hi zshi,

using slatticeOne.defineExteneralField ( geometry, 1, externalforcebeginat, sizeofexternalforce, f) to set additional forces when using Shan-Chen-Model is exactly right. Note that our field externalforce is actually F/rho (acceleration), so that you don’t have any problems with variing densities. Just set the externalforce to g in lattice units and you should be fine.

Cheers,
Max