ludwig-cf / ludwig

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

Getting stress information as an output #319

Open M-Rishish opened 1 month ago

M-Rishish commented 1 month ago

Greetings sir,

I am seeking a method to calculate the stress at the interface of a binary fluid. In my input script, I am using the following commands to accomplish this:

These commands generate files named str-0000XXX.dat, but I am uncertain about the specific information they contain. Despite reviewing the manual and the relevant web pages, I couldn't find any clear explanations. It would be very helpful to get information about the contents of these files and understand if it is possible to calculate the interfacial stress using them.

Thankyou

kevinstratford commented 1 month ago

Let me have a look and get back to you.

kevinstratford commented 1 month ago

OK. The files and input keys you refer to were intended to obtain various averages for systems in shear flow.

It sounds like you want something more like a 3d snapshot of the stress, so that it could be interpolated to the surface position.

If so, there are a couple of ways forward I could suggest. If you have the order parameter output, you can recover the "thermodynamic" contribution to the stress via

$$ P_{\alpha\beta} = p0 \delta{\alpha\beta} + \kappa \partial\alpha \phi \partial\beta \phi $$

with some appropriate derivatives (something like paraview might help). In a similar fashion one obtain obtain the full stress from the distributions if one was prepared to take a full distribution output.

M-Rishish commented 1 month ago

Thank you for your response sir.

To clarify my problem, I am trying to calculate the stress on an active particle (squirmer) neutrally trapped at a binary fluid interface to determine the resulting force and torque on the particle.

Following your advice, I attempted to calculate the stress in a simple Poiseuille flow with a binary fluid interface at the center using Eq. (6.18) from the paper "Inertial effects in three-dimensional spinodal decomposition of a symmetric binary fluid mixture: a lattice Boltzmann study" by Kendon et al. (Journal of Fluid Mechanics, 2001, 440:147-203, doi:10.1017/S0022112001004682) https://www.cambridge.org/core/journals/journal-of-fluid-mechanics/article/inertial-effects-in-threedimensional-spinodal-decomposition-of-a-symmetric-binary-fluid-mixture-a-lattice-boltzmann-study/C96581C756A77D17B3CD63452C25420E However, I did not obtain the correct stress profile.

Is there a method or approach you recommend for accurately calculating the stress on a particle at the interface to determine the force and torque acting on it?

kevinstratford commented 1 month ago

OK. I'm not sure what "correct" is in the context of the Poiseuille flow, as you haven't given any details.

However, I think I now understand what you are looking for. The force and torque on the particle are, clearly, computed as part of the dynamics at each time. The question is how to get hold the numbers.

For the liquid crystal free energy, a diagnostic computation of the contributions to the force on the colloid is taking place in stats_colloid_force_split.c. Something of this nature would be required for the symmetric free energy, but it doesn't exist at the moment.