Skip to content

microFluidics2d: Including gravity

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics microFluidics2d: Including gravity

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #8110
    CWhalley_1
    Participant

    To whom it may concern,

    I have been modifying the microFluidics2d example to simulate a scenario for my university thesis. I have been attempting to include gravity in the example but have not had any success so far. As far as I can tell none of the other multiComponent examples include gravity. Any assistance with this would be much appreciated.

    Regards,

    Callum

    #8123
    TimBingert
    Participant

    Hi Callum!

    In the line where the Descriptor is set, you have to include the Field “EXTERNAL_FORCE” like this:
    typedef D2Q9<CHEM_POTENTIAL,FORCE,EXTERNAL_FORC> DESCRIPTOR;
    This field will be added to the multi-phase force in the free energy post-processor, just fyi. In the “prepareLattice” method, you can now initialize the external force field with the desired gravitational acceleration.

    Hope this helps, kind regards
    Tim

    #8124
    TimBingert
    Participant

    typedef D2Q9<CHEM_POTENTIAL,FORCE,EXTERNAL_FORCE> DESCRIPTOR;
    sorry typo

    #8141
    CWhalley_1
    Participant

    Hi Tim,

    Thanks for your help. Unfortunately I haven’t gotten around to trying to implement that yet.
    I have been trying to define each fluid as a different density, i.e. fluid coming from inlet1 having a density close to air and fluid coming from inlet21 and inlet22 having a density close to water. I have so far had no success with this, does anyone have any suggestions on how I can implement this?

    Thanks,
    Callum

    #8146
    TimBingert
    Participant

    Hi Callum,

    the microFluidics2d example uses a phase-field model that might be incapable of simulating a high density ratio such as water/air. For this, you can use the model from the example “phaseSeparation3d”. It is a pseudo-potential approach that uses Carnahan-Starling EoS. With the right reduced temperature, the EoS will give you a density ratio of the water/air system. The implementation with this model is easier, too, as you will only need one lattice.

    Best regards,
    Tim

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