Skip to content

taki

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • taki
    Participant

    I haven’t been able to solve it yet, so I would appreciate it if someone could answer.
    Thanks!

    taki
    Participant

    I have tested the ADE temperature boundary condition.
    I would like to set the outflow to Neumann.
    I’m getting the error: ‘setZeroGradientBoundary’ was not declared in this scope. I’d like some advice on how to resolve this.

    void prepareLattice(SuperLattice<T, TDESCRIPTOR>& ADlattice, SuperGeometry<T, 2>& superGeometry, T rho, AdeUnitConverter<T, TDESCRIPTOR> converter) {
      OstreamManager clout(std::cout, "prepareLattice");
      clout << "Prepare Lattice ..." << std::endl;
    
      const T omega = converter.getLatticeAdeRelaxationFrequency();
    
      ADlattice.defineDynamics<SourcedAdvectionDiffusionBGKdynamics>(superGeometry, 1);
    
      AnalyticalConst2D<T, T> u(converter.getLatticeVelocity(flow_rate), converter.getLatticeVelocity(0.0));
      AnalyticalConst2D<T, T> rho0_(converter.getLatticeDensity(rho));
    
      // Setting of the boundary conditions, inflow, and outflow with Dirichlet condition
      setAdvectionDiffusionTemperatureBoundary<T, TDESCRIPTOR>(ADlattice, superGeometry.getMaterialIndicator(3));
      <strong>setZeroGradientBoundary<T, TDESCRIPTOR>(ADlattice, superGeometry.getMaterialIndicator({4}));</strong>
      
      //setAdvectionDiffusionTemperatureBoundary<T, TDESCRIPTOR>(ADlattice, superGeometry.getMaterialIndicator(4));
    
      ADlattice.setParameter<descriptors::OMEGA>(omega);
    
      auto bulkIndicator = superGeometry.getMaterialIndicator(1);
      auto everywhere = superGeometry.getMaterialIndicator({1, 2, 3, 4});
    
      // Setting flowrate inside reactor, as well as initial concentrations
      ADlattice.defineField<descriptors::VELOCITY>(everywhere, u);
      ADlattice.defineField<descriptors::SOURCE>(bulkIndicator, rho0_);
      ADlattice.defineRho(bulkIndicator, rho0_);
      ADlattice.iniEquilibrium(superGeometry, 1, rho0_, u);
    
      // Setting actual values for the boundary
      ADlattice.defineRho(superGeometry, 3, rho0_);
      ADlattice.iniEquilibrium(superGeometry, 3, rho0_, u);
      ADlattice.defineRho(superGeometry, 4, rho0_);
      ADlattice.iniEquilibrium(superGeometry, 4, rho0_, u);
    
      // Make the lattice ready for simulation
      ADlattice.initialize();
    
      clout << "Prepare Lattice ... OK" << std::endl;
    }
    
Viewing 2 posts - 1 through 2 (of 2 total)