Skip to content

Ladasicr

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Permeability Calculation Poiseuille #4266
    Ladasicr
    Participant

    Unfortunately the System is still diverging giving something like

    [LatticeStatistics] step=625; t=0.25; uMax=inf; avEnergy=-nan; avRho=nan

    But the Parameters of the System are still the same as in the original example, except the introduction of the inlet and outlet pressure…

    in reply to: Permeability Calculation Poiseuille #4264
    Ladasicr
    Participant

    Dear Fabian,

    here is the relevant Code which i included in the Pousoille2d example:

    // In function prepareLattice

    sBoundaryCondition.addPressureBoundary(superGeometry, 3, omega);
    sBoundaryCondition.addPressureBoundary( superGeometry, 4, omega );

    std::vector<T> velocity( 2,T( 0 ) );
    AnalyticalConst2D<T,T> u( velocity );
    AnalyticalConst2D<T,T> rho( 1 );

    // Define inlet and outlet pressure
    AnalyticalConst2D<T,T> rhoIn(converter.getLatticeDensityFromPhysPressure(pin)); // pin in Pa
    AnalyticalConst2D<T,T> rhoOut(converter.getLatticeDensityFromPhysPressure(pout));

    // Initialize all values of distribution functions to their local equilibrium
    sLattice.defineRho( superGeometry, 1, rho);
    sLattice.iniEquilibrium( superGeometry, 1, rho, u );
    sLattice.defineRho( superGeometry, 2, rho);
    sLattice.iniEquilibrium( superGeometry, 2, rho, u );
    sLattice.defineRho( superGeometry, 3, rhoIn);
    sLattice.iniEquilibrium( superGeometry, 3, rho, u );
    sLattice.defineRho( superGeometry, 4, rhoOut);
    sLattice.iniEquilibrium( superGeometry, 4, rho, u );

    // In setBoundaryValues
    if ( iT%iTupdate==0 && iT<= iTmaxStart ) {
    // Smooth start curve, sinus
    // SinusStartScale<T,int> StartScale(iTmaxStart, T(1));

    // Smooth start curve, polynomial
    PolynomialStartScale<T,T> StartScale( iTmaxStart, T( 1 ) );

    // Creates and sets the Poiseuille inflow profile using functors
    T iTvec[1] = {T( iT )};
    T frac[1] = {};
    StartScale( frac,iTvec );
    AnalyticalConst2D<T,T> rho(frac[0]*converter.getLatticeDensityFromPhysPressure(pin));

    sLattice.defineRho( superGeometry, 3, rho );
    }

    I think i did some mistake with the smoothened inlet pressure BC.

    Best regards,
    Ladasicr

    in reply to: Permeability Calculation Poiseuille #4246
    Ladasicr
    Participant

    Dear Fabian,

    thanks for the Reply. Unfortunately i am not that deep into the Topic so far… My Problem may rather sound trivial but it is the following:

    I use pressure BC for the inlet in the poiseuille2d example and after the main Loop i just evaluate the mean velocity in order to calculate the Dary law, e.g. the permeability.
    The Problem occurs now if i set FlowType=unForced, DESCRIPTOR = D2Q9Descriptor and apply the inlet pressure BC as hard Parameters, ie. 100 Pa at the inlet and 10 Pa at the outlet.
    Then the Simulation just breaks because with the given Parameters i get for all Parameters like uMax=inf, avEngergy=-nan, avRho=nan etc.

    Any idea how to fix that simple example?

    Best regards,
    Ladasicr

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