Skip to content

sfraniatte

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • in reply to: Set Pressure Boundary Conditions for Inlet and Outlet #9589
    sfraniatte
    Participant

    Hello,

    I attempted to apply these boundary conditions, but it turned out not to be a good idea in my case, as the simulation became less stable. I believe this might explain why there is so little information available on how to implement them. You have likely done everything correctly; it’s just that this approach doesn’t seem to work as intended in this particular situation.

    For instance, when I applied these boundary conditions in the aorta example, the flow reversed for certain pressure inlet values.

    in reply to: Choose between CPU and GPU #9379
    sfraniatte
    Participant

    I am sorry because I understood my error… The number of cores used was to high which slow down the calculation. Stupid mistake !

    Thanks a lot for your time !

    Sylvain

    in reply to: Choose between CPU and GPU #9378
    sfraniatte
    Participant

    Ok, I have two computers :
    _ an Ubuntu 22.04 VM on windows 11 with 6 CPU cores (Intel(R) Core(TM) i5-10400T CPU @ 2.00GHz)
    _ an Ubuntu 24.04 with 32 CPU cores (AMD Ryzen Threadripper PRO 5975WX 32-Cores) and with a GPU card

    My goal, today, is to launch a calculation on the computer which run on Ubuntu 24.04 on the CPU cores to run a biger simulation. However, when I test with the same case (my own case), the calculation is slower than when it is done whith the VM on windows.

    I am wondering if the problem comes from CPUs which does not have the same brand.

    Sylvain

    in reply to: Choose between CPU and GPU #9376
    sfraniatte
    Participant

    I mean that the calculation is not faster than in sequential mode. The calculation is faster on my other computer with 6 Threads…

    Yes, indeed, I would like to use the CPUs only for now and one GPU in the future when my code will be ready for that.

    Thank you for the details.

    Sylvain

    in reply to: Choose between CPU and GPU #9374
    sfraniatte
    Participant

    Ok, the first lines after this call are :
    [MpiManager] Sucessfully initialized, numThreads=32
    [ThreadPool] Sucessfully initialized, numThreads=1

    Yes, it returned true. However, I uninstalled CUDA then to have Openmpi which works properly. Because, it was not working. And it still does not work…

    My main goal is to have Openmpi to use CPU. But I have the feeling that it is not possible due to the presence of the GPU card.

    So, to sum up, I uninstalled CUDA and I install again Openmpi as explained in the user manual (sudo apt-get install openmpi-bin openmpi-doc libopenmpi-dev) but it still does not work properly.

    Sylavin

    in reply to: Choose between CPU and GPU #9372
    sfraniatte
    Participant

    Where can I find the terminal log ? Is it when I compile Openlb at he installation ?

    Yes, I did follow this section…

    Thank you for your answer !
    Sylvain

    in reply to: Importing stl files #9259
    sfraniatte
    Participant

    Do you use a debugger like gdb ? I think it can help you

    in reply to: Importing stl files #9245
    sfraniatte
    Participant

    Which error/bug did you get ? Take care to locate the inlet and outlet at the correct places…

    in reply to: Yplus calculation #9154
    sfraniatte
    Participant

    You are right ! It was the problem. I works with materials 3,31,32,33,34. I just really do not understand why it uses the material 3 to compute Yplus. I wonder how it computes the Yplus value and if it is correct in my case. Thank you !

    in reply to: Yplus calculation #9058
    sfraniatte
    Participant

    I compute y+ as in the aorta example :
    if ( bouzidiOn ) {
    SuperLatticeYplus3D<T, DESCRIPTOR> yPlus( sLattice, converter, superGeometry, stlReader, 3 );
    SuperMax3D<T> yPlusMaxF( yPlus, superGeometry, 1 );
    int input[4]= {};
    T yPlusMax[1];
    yPlusMaxF( yPlusMax,input );
    clout << “\n yPlusMax=” << yPlusMax[0] << std::endl;
    }

    It is definetely the number of digits because I did the test with the same case, the same quantity of materials but with different materials number (by swithcing materials from 30, 31, 32, 33, 34 to 3, 6, 7, 8, 9 for the inlets it does work).

    in reply to: Pressure Inlet #9041
    sfraniatte
    Participant

    Finnally, I think it works. It is just that the results are not what I excepted. I was looking at the pressure near the inlet and the outlet (which are not exactly at the inlet and the outlet) and it is not at all the values that I set at the inlet and outlet. However, when I see the whole flow with Paraview, I see that the stream become very complexe and I think it is ok. Then, by switching between Bouzidi and Bounce Back, because of the complexity of the aorta stl file, the result is different. It schows that Bouzidi is better I think.

    Thanks a lot for your help and I can share it if you explain me how to do. I am still a beginner.

    Best regard
    Sylvain

    in reply to: Pressure Inlet #9038
    sfraniatte
    Participant

    I spoke to fast, it still does not work. So, to be clear, I use the aorta example and I want replace the velocity inlet condition by a pressure inlet condition. So I use the aorta stl file and I did touch the indicators for the inlet and the outlets. The inlet/outlet materials are placed correctly. When I use Bouzidi condition, this line is used : “setBouzidiBoundary<T,DESCRIPTOR>(lattice, superGeometry, 2, stlReader);”. When I use Bounce Back Boundary, this line is used : “setBounceBackBoundary(lattice, superGeometry, 2);”. It works only in the second case. So, I think that I have to add something in the first case but I do not know what.

    Sorry for the previous message…

    Best regard
    Sylvain

    in reply to: Pressure Inlet #9036
    sfraniatte
    Participant

    I mean it is exactly the same behavior and the orientation of the inlets and the outlets are along the same axis. Sorry for the unuseful details.

    However, it seems that I solved my problem. It was a line which did not have to be there.

    Thanks a lot for your help !

    Best regard
    Sylvain

    in reply to: Pressure Inlet #9034
    sfraniatte
    Participant

    I use my own stl file and the aorta stl file. The result is exactly the same in the two cases. So, you can consider that I use the aorta stl file and that there is no problem with the stl file. The pressure boundary axis is aligned. I would like to set a pressure inlet and outlet condition by imposing 10 Pa at the inlet and 0 Pa at the outlet. It works only with BouzidiOn=False but My walls are not straight…

    in reply to: Pressure Inlet #9032
    sfraniatte
    Participant

    Hi Adrian,

    Thanks a lot for your message. In my case, the boundaries are straight at the inlet and the outlet but not at the walls. So, Bouzidi IBB is relevent. I used the aorta exemple and I just changed the inlet condition by removing the velocity condition and adding a pressure condition as below (it works only when bouzidiOn=False when the pressure condition is at the outlet but not with the inlet and the outlet). Maybe one line is missing but I really do not see which one.

    Best regards
    Sylvain

    void prepareGeometry( UnitConverter<T,DESCRIPTOR> const& converter, IndicatorF3D<T>& indicator,
    STLreader<T>& stlReader, SuperGeometry<T,3>& superGeometry )
    {

    OstreamManager clout( std::cout,”prepareGeometry” );
    clout << “Prepare Geometry …” << std::endl;

    superGeometry.rename( 0,2,indicator );
    superGeometry.rename( 2,1,stlReader );

    superGeometry.clean();

    // Set material number for inflow
    IndicatorCircle3D<T> inflow( 0.,-0.15,0., 0., 1.,0., 0.25 );
    IndicatorCylinder3D<T> layerInflow( inflow, 2.*converter.getConversionFactorLength() );
    // IndicatorCircle3D<T> inflow( -0.175,0.072,0., 1., 0.,0., 0.19 );
    // IndicatorCylinder3D<T> layerInflow( inflow, 2.*converter.getConversionFactorLength() );
    // std::vector<T> extend( 3, T(0) );
    // extend[0] = 0.35;
    // extend[1] = 2.5*converter.getConversionFactorLength();
    // extend[2] = 0.35;
    // std::vector<T> origin( 3, T(0) );
    // extend[1] = -0.147;
    // IndicatorCboid3D<T> layerInflow( extend,origin);
    // superGeometry.rename( 2,2,1,layerInflow );
    superGeometry.rename( 2,3,1,layerInflow );

    // Set material number for outflow0
    //IndicatorCircle3D<T> outflow0(0.2053696,0.0900099,0.0346537, 2.5522,5.0294,-1.5237, 0.0054686 );
    IndicatorCircle3D<T> outflow0( 0.,0.48,0., 0.,-1.,0., 0.08 );
    IndicatorCylinder3D<T> layerOutflow0( outflow0, 2.*converter.getConversionFactorLength() );
    superGeometry.rename( 2,4,1,layerOutflow0 );

    // Removes all not needed boundary voxels outside the surface
    superGeometry.clean();
    // Removes all not needed boundary voxels inside the surface
    superGeometry.innerClean( 3 );
    superGeometry.checkForErrors();

    superGeometry.print();
    clout << “Prepare Geometry … OK” << std::endl;
    }

    // Set up the geometry of the simulation
    void prepareLattice( SuperLattice<T, DESCRIPTOR>& lattice,
    UnitConverter<T,DESCRIPTOR> const& converter,
    STLreader<T>& stlReader, SuperGeometry<T,3>& superGeometry )
    {

    OstreamManager clout( std::cout,”prepareLattice” );
    clout << “Prepare Lattice …” << std::endl;

    const T omega = converter.getLatticeRelaxationFrequency();

    // material=1 –> bulk dynamics
    lattice.defineDynamics<BulkDynamics>(superGeometry, 1);

    if ( bouzidiOn ) {
    // material=2 –> no dynamics + bouzidi zero velocity
    setBouzidiBoundary<T,DESCRIPTOR>(lattice, superGeometry, 2, stlReader);
    // material=3 –> no dynamics + bouzidi velocity (inflow)
    // setBouzidiBoundary<T,DESCRIPTOR,BouzidiVelocityPostProcessor>(lattice, superGeometry, 3, stlReader);
    }
    else {
    // material=2 –> bounceBack dynamics
    setBounceBackBoundary(lattice, superGeometry, 2);
    // material=3 –> bulk dynamics + velocity (inflow)
    //lattice.defineDynamics<BulkDynamics>(superGeometry, 3);
    //setInterpolatedVelocityBoundary<T,DESCRIPTOR>(lattice, omega, superGeometry, 3);
    }

    // material=3 –> bulk dynamics + pressure (inflow)
    lattice.defineDynamics<BulkDynamics>(superGeometry.getMaterialIndicator(3));
    setInterpolatedPressureBoundary<T,DESCRIPTOR>(lattice, omega, superGeometry.getMaterialIndicator(3));

    // material=4,5 –> bulk dynamics + pressure (outflow)
    lattice.defineDynamics<BulkDynamics>(superGeometry.getMaterialIndicator({4, 5}));
    setInterpolatedPressureBoundary<T,DESCRIPTOR>(lattice, omega, superGeometry.getMaterialIndicator({4, 5}));

    // Initial conditions
    AnalyticalConst3D<T,T> rhoF(converter.getLatticeDensityFromPhysPressure(pression_sortie));
    std::vector<T> velocity( 3,T() );
    AnalyticalConst3D<T,T> uF( velocity );
    AnalyticalConst3D<T,T> rho(converter.getLatticeDensityFromPhysPressure(pressure_entree));

    // Initialize all values of distribution functions to their local equilibrium
    lattice.defineRhoU( superGeometry.getMaterialIndicator({1, 4}),rhoF,uF );
    lattice.iniEquilibrium( superGeometry.getMaterialIndicator({1, 4}),rhoF,uF );
    AnalyticalConst3D<T, T> rhoFromPressure(converter.getLatticeDensityFromPhysPressure(pressure_inlet));
    lattice.defineRho( superGeometry.getMaterialIndicator(3),rhoFromPressure);
    lattice.iniEquilibrium( superGeometry.getMaterialIndicator(3),rhoFromPressure,uF );

    lattice.setParameter<descriptors::OMEGA>(omega);
    lattice.setParameter<collision::LES::Smagorinsky>(T(0.1));
    // Lattice initialize
    lattice.initialize();

    clout << “Prepare Lattice … OK” << std::endl;
    }

Viewing 15 posts - 1 through 15 (of 20 total)