Skip to content

Using setBouzidiAdeDirichlet BC properly

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #9772
    talco
    Participant

    Hi all,
    I’m currently working on an example with curved walls for thermal BC
    so I can’t use the setAdvectionDiffusionTemperatureBoundary BC

    After reading “Boundary conditions for thermal lattice Boltzmann equation method” by Like Li, and
    related posts on the forum, I would like to use the setBouzidiAdeDirichlet BC instead,
    but could not find any example on how to use it properly

    from DoxyGen I know that the definition needs to be:
    setBouzidiAdeDirichlet<T,DESCRIPTOR>(sLattice, superGeometry.getMaterialIndicator(material), phi_d, bulkMaterials);

    but I’m doing something wrong, since Im getting an error stating that:
    no matching function for call to ‘setBouzidiAdeDirichlet<T, TDESCRIPTOR>(olb::SuperLattice<double, olb::descriptors::D3Q7<olb::descriptors::VELOCITY, olb::descriptors::TEMPERATURE> >&, olb::SuperGeometry<double, 3>&, int, olb::STLreader<double>&)’

    It will really help if somone can give a short example on how to properly define this BC ?

    #9776
    shota
    Participant

    Hi talco,

    in the following a short example on how to use the bouzidiAdeBoundary:

    void prepareADLattice( SuperLattice<T,RADDESCRIPTOR>& adLattice,
                           AdeUnitConverter<T,RADDESCRIPTOR> const& adConverter,
                           STLreader<T>& stlReader,
                           SuperGeometry<T,3>& superGeometry)
    {
      auto bulkIndicator = superGeometry.getMaterialIndicator({1});
      
      // Boundary conditions
      ...
      setBouzidiBoundary<T,RADDESCRIPTOR,BouzidiAdeDirichletPostProcessor>(adLattice, superGeometry, 5, stlReader);
    
      // Initial conditions
      AnalyticalConst3D<T,T> tempA( 10. );
      Vector<T,3> velocityV;
      AnalyticalConst3D<T,T> uF(velocityV);
    
      ...
      adLattice.defineRho( superGeometry, 5, tempA);
      adLattice.iniEquilibrium(superGeometry, 5, tempA, uF);
      setBouzidiAdeDirichlet(adLattice, superGeometry, 5, tempA);
    
      adLattice.template setParameter<descriptors::OMEGA>(adConverter.getLatticeRelaxationFrequencyFromDiffusivity<RADDESCRIPTOR>(D));
      adLattice.initialize();
    }

    I hope this helps.

    BR
    Shota

    • This reply was modified 3 weeks, 2 days ago by shota.
    #9782
    talco
    Participant

    Dear Shota,
    It worked out great,
    Thanks for helping, it’s really appreciated

    #9783
    talco
    Participant

    Hi Shota,
    Just noticed that following the change, multiprocessing doesn’t work
    It only runs on a single core
    Is this to be expected with the implementation of this BC ?

    #9791
    shota
    Participant

    Dear talco,

    no that should not be the case.
    Could you provide more details on how it is not working, e.g. simulation crashes, or the like?

    #9792
    talco
    Participant

    Dear Shota,
    I did some checking and found that it was a system problem on my side
    So it worked out great after all,
    Thanks again for your help,

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