Skip to content

channel3d Taueff problem

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #8913
    liu
    Participant

    Dear Community :
    I want to call the value in the TAU_EFF and use it for calculations, how should it be used, thank you very much.
    Here’s the full code
    ///////////////////////////////////////////////////////////////////
    void setInitialConditions(SuperLattice<T, DESCRIPTOR>& sLattice,
    UnitConverter<T,DESCRIPTOR> const& converter,
    SuperGeometry<T,3>& superGeometry,
    AnalyticalScaled3D<T, T>& forceSolScaled,
    TrackedForcing3D<T, T>& forceSol)
    {

    OstreamManager clout(std::cout, “setInitialConditions”);
    clout << “Set initial conditions …” << std::endl;

    AnalyticalConst3D<T, T> rho(1.);
    Channel3D<T, T> uSol(converter, 1.);

    sLattice.defineRhoU(superGeometry, 1, rho, uSol);
    sLattice.iniEquilibrium(superGeometry, 1, rho, uSol);

    sLattice.defineRhoU(superGeometry, 2, rho, uSol);
    sLattice.iniEquilibrium(superGeometry, 2, rho, uSol);

    AnalyticalConst3D<T,T> TauEff(1./converter.getLatticeRelaxationFrequency());

    sLattice.defineField<TAU_EFF>(superGeometry, 1, TauEff);
    sLattice.defineField<TAU_EFF>(superGeometry, 2, TauEff);//

    // Force Initialization
    forceSol.updateAveVelocity(converter.getCharPhysVelocity()); // New average velocity

    // Initialize force
    sLattice.defineField<FORCE>(superGeometry, 1, forceSolScaled);
    sLattice.defineField<FORCE>(superGeometry, 2, forceSolScaled);
    // Tau_w Initialization
    T tau_w_guess = 0.0; // Wall shear stress in phys units
    AnalyticalConst3D<T, T> tau_w_ini(tau_w_guess);
    AnalyticalScaled3D<T, T> tau_w_ini_scaled(tau_w_ini, 1. / ( converter.getConversionFactorForce() * util::pow(converter.getConversionFactorLength(),2.) ) );

    sLattice.defineField<TAU_W>(superGeometry, 1, tau_w_ini_scaled);
    sLattice.defineField<TAU_W>(superGeometry, 2, tau_w_ini_scaled);

    clout << “Set initial conditions … OK” << std::endl;
    }

    #8934
    FBukreev
    Keymaster

    Hello,

    please look in src/dynamics/navierStokesAdvectionDiffusionCoupling.h or into the postProcessors in src/boundary. There you can find how to make calculations per cell with external fields.

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