Skip to content

Error on Cylinder2D example on Fringe technique implementation.

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics Error on Cylinder2D example on Fringe technique implementation.

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

    Dear Community,
    I was trying to implement Fringe technique implementation in Cylinder2D example of OpenLB like this:
    void setBoundaryValues…
    // rest code
    AnalyticalConst3D wantedVelocity(maxVelocityV[0],T(),T());
    fringe3D fringeForceCoefficients(wantedVelocity, lz-10*ly/N, lz, 0., 0.008);
    slattice.defineField(superGeometry, 5, fringeForceCoefficients);

    But its giving error:
    cylinder2d.cpp: In function ‘void setBoundaryValues(olb::SuperLattice<double, olb::descriptors::D2Q9<> >&, const olb::UnitConverter<double, olb::descriptors::D2Q9<> >&, int, olb::SuperGeometry<double, 2>&)’:
    cylinder2d.cpp:251:38: error: ‘maxVelocityV’ was not declared in this scope
    251 | AnalyticalConst3D wantedVelocity(maxVelocityV[0],T(),T()); // the velocity that you want to take as reference for the fringe zone. The mass conservation must be held through that velocity.
    | ^~~~~~~~~~~~
    cylinder2d.cpp:251:61: error: alias template deduction only available with ‘-std=c++20’ or ‘-std=gnu++20’
    251 | AnalyticalConst3D wantedVelocity(maxVelocityV[0],T(),T()); // the velocity that you want to take as reference for the fringe zone. The mass conservation must be held through that velocity.
    | ^
    cylinder2d.cpp:252:5: error: ‘fringe3D’ was not declared in this scope
    252 | fringe3D fringeForceCoefficients(wantedVelocity, lz-10*ly/N, lz, 0., 0.008); //lz is the furter end of the fringe zone. lz-10*ly/N is the start point of the zone. 0 and 0.008 are the coefficients, you can look on their descriptions in the corresponding source files.
    | ^~~~~~~~
    cylinder2d.cpp:253:5: error: ‘slattice’ was not declared in this scope; did you mean ‘sLattice’?
    253 | slattice.defineField(superGeometry, 5, fringeForceCoefficients); //here 5 is the Material Number of the fringe zone cells.
    | ^~~~~~~~
    | sLattice
    cylinder2d.cpp:253:44: error: ‘fringeForceCoefficients’ was not declared in this scope
    253 | slattice.defineField(superGeometry, 5, fringeForceCoefficients); //here 5 is the Material Number of the fringe zone cells.
    | ^~~~~~~~~~~~~~~~~~~~~~~
    make: *** [../../../default.single.mk:35: cylinder2d.o] Error 1

    Please help me to solve these problems.

    #8709
    FBukreev
    Keymaster

    sorry, but I have sent you only an example of code that you need to change according to your 2d case and your velocity. The error are because of missing variable declaration or missing material number. As I said you need to update your application in several places like in other examples. Add new material number for the fringe zone, change fringe inputs to 2d and so on…
    If you want more help for your application, you can visit our next spring school in Marseille.

    #8710

    Can you please tell me which example of OpenLB has implemented Fringe technique. Suggest me an example. PLease help.

    Thank you

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