Skip to content


Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #5120

    Hello developer,
    I am trying to get the image of the drop formed in the example ContactAngle2d and for this I added some lines in the getResult function as follows

    // Writes the VTK files
    if ( iT%vtkIter==0 ) {
    clout << “Writing VTK …” << std::endl;
    //SuperLatticeVelocity2D<T, DESCRIPTOR> velocity( sLattice1 );
    SuperLatticeDensity2D<T, DESCRIPTOR> density1( sLattice1 );
    SuperLatticeDensity2D<T, DESCRIPTOR> density2( sLattice2 );
    vtmWriter.addFunctor( velocity );
    vtmWriter.addFunctor( density1+density2 );
    vtmWriter.write( iT );

    BlockReduction2D2D<T> planeReduction( density1+density2, 600, BlockDataSyncMode::ReduceOnly );
    // write output as JPEG
    heatmap::write(planeReduction, iT);

    clout << “Writing VTK … OK” << std::endl;

    I added the above part with the help of other examples given. The image that I am getting is attached here. Drop Image
    Why this image has lower density inside the circle (its of blue colour)?

    Thanks and regards


    Hi Bhuttu,

    The issue is that the densities of the two SuperLattices are not the densities of the fluid components. The density of sLattice1 is the total fluid density (= rho_1 + rho_2), while the “density” of sLattice2 is an order parameter to define whether it is fluid 1 or fluid 2 (= rho_1 – rho_2).

    Therefore to plot the total density you only need to plot “density1”. It should be slightly higher inside the droplet due to the Laplace pressure. The reason you currently see a smaller value in the droplet is because “density1+density2” is two times the density of fluid 2, which is zero inside the droplet.

    I hope this helps.


    Thank you Sam 🙂 🙂
    Sorry for the late reply I was busy in something.
    Yes I got where I was wrong.


Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.