Skip to content

luizeducze

Due to recent bot attacks we have changed the sign-up process. If you want to participate in our forum please send a message via our contact form.

Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • in reply to: About VTI file in porousmedia #10318
    luizeducze
    Participant

    Dear Jafari,

    From your message I see an error in the code. I am really sorry for that.

    You can see in the code that we have some numbers in operations like 0.5, or 2. The correct way is to define T(0.5) or T(2.), so they can be converted to float for gpu running.

    Just do the following procedure. Replace for example:
    length[0] + outletLength – inletLength )/2.

    by:
    length[0] + outletLength – inletLength )/T(2.)

    And do the same thing for all free numbers in the code.

    Kind regards,
    Luiz

    in reply to: About VTI file in porousmedia #10306
    luizeducze
    Participant

    Dear Jafari,

    From what I understood, your simulation is running normally.

    This example was developed to simulate on clusters using dozens of cores during some hours.

    So, probably, the computational resources that you are using is not enough.

    This multiphase model is quite complex and the computational performance is still quite low. We are continuously working in developing optimized multiphase models.

    Kind regards,
    Luiz

    in reply to: Shan-Chen #9917
    luizeducze
    Participant

    Dear xinhui,

    Are you using single-component or multi-component ShanChen method?

    You can create a layer with a different material number than the fluid to be your solid.
    For example, your fluid can be material number 1 and the solid 5.

    In your prepare lattice function you can set use the sLattice.defineRho() to set the density in different material numbers. You can find this in many examples in OpenLB.

    Also, in your COUPLING, you can choose the material numbers where the operations will be applied, as an example: coupling.restrictTo(superGeometry.getMaterialIndicator({1}));

    Since you want to compute the interaction in the solid for the contact angle, you can do that:
    coupling.restrictTo(superGeometry.getMaterialIndicator({1}));
    coupling.restrictTo(superGeometry.getMaterialIndicator({5}));

    Check the binary shear flow example to see how it is applied.

    In this way, you can prescribe a density to your solid in prepare lattice, then tell your code to compute the interaction from the solid. Remember to use the bounce-back or other boundary condition for your solid (material number 5) in your prepare lattice.

    If you have more doubts just ask.

    Kind regards,
    Luiz

    in reply to: Definition of liquid fraction in example galliumMelting2d #9583
    luizeducze
    Participant

    Dear Inko0521@126.com,

    Can you describe more your problem?

    Your phase change material is initially a liquid and you want to convert it to a solid?

    There are other components/phases in your domain? Or is just one material which turns into solid over time?

    Kind regards,
    Luiz

    in reply to: Definition of liquid fraction in example galliumMelting2d #9448
    luizeducze
    Participant

    Dear Qiong,

    The liquid fraction is indeed computed from the Enthalpy as you said.

    If you go to the file advectionDiffusionDynamics.h, you will find the function the computed the liquid fraction:

    template<typename V, typename PARAMETERS, typename ENTHALPY>
    V computeLiquidFraction(const PARAMETERS& parameters, const ENTHALPY& enthalpy) const
    {
    using namespace TotalEnthalpy;

    const V cp_s = parameters.template get<CP_S>();
    const V cp_l = parameters.template get<CP_L>();
    const V T_s = parameters.template get<T_S>();
    const V T_l = parameters.template get<T_L>();
    const V l = parameters.template get<L>();
    const V H_s = cp_s * T_s;
    const V H_l = cp_l * T_l + l;
    V liquid_fraction{};

    if (enthalpy <= H_s) {
    liquid_fraction = 0.;
    }
    else if (enthalpy >= H_l) {
    liquid_fraction = 1.;
    }
    else {
    liquid_fraction = (enthalpy – H_s) / l;
    }
    return liquid_fraction;
    }

    Then, if you go to the file navierStokesAdvectionDiffusionCouplingPostProcessor2D.hh,
    you will see that the value of the liquid fraction is stored inside the field POROSITY:

    cell.template setField<descriptors::POROSITY>(
    dynamics->template computeLiquidFraction<T>(parameters, enthalpy));

    The POROSITY here is just a variable used to store the information of the liquid fraction, but this one is still computed from the enthalpy.

    in reply to: airBubbleCoalescence3d example: adding BounceBack BCs #9312
    luizeducze
    Participant

    Another thing …

    You dont need those lines:

    sLattice1.defineDynamics<BulkDynamics>(superGeometry, 3);
    sLattice2.defineDynamics<BulkDynamics>(superGeometry, 3);

    sLattice1.defineDynamics<BulkDynamics>(superGeometry, 4);
    sLattice2.defineDynamics<BulkDynamics>(superGeometry, 4);

    When you use the setBounceBack, you are already applying the correct dynamics to the boundary nodes.

    Did you applied BulkDynamics for the material number 1?

    Kind regards,
    Luiz

    in reply to: airBubbleCoalescence3d example: adding BounceBack BCs #9311
    luizeducze
    Participant

    Dear Farahani,

    I tried to simulate here the same example with your modifications and it worked. However, I did the simulation using lattice1 for H2O, lattice2 for N2 and lattice3 for O2. Are you trying to simulate just H2O and N2? I will try to disable the O2 phase and see if it breaks.

    Kind regards,
    Luiz

    in reply to: Mineral precipitation and dissolution #8440
    luizeducze
    Participant

    Dear Antonio.

    I believe that the phase change model would be interesting for your application. In this approach, melting is modeled by an energy conservation equation, which means that the phase change process is triggered by temperature gradients. In your case, perhaps the model would have to be modified to allow the formation of a solid phase from concentration gradients.

    I will talk to my colleagues to get more insights. Afterwards, I will come back here to give a more detailed suggestion.

    Cheers,
    Luiz Eduardo Czelusniak

Viewing 8 posts - 1 through 8 (of 8 total)