Skip to content

FBukreev

Forum Replies Created

Viewing 15 posts - 31 through 45 (of 65 total)
  • Author
    Posts
  • in reply to: High Prandtl numbers #7298
    FBukreev
    Keymaster

    Hello Ramiro,

    from my experience the turbulent Prandtl number must be between 0,3 and 0,7. By coarse resolutions even smaller than 0,3. If you use this thermal coupling postprocessor the standard BGK collision must be also enough. Dous your dynamics use the relaxation frequency from lattice cells or the global from parameters?

    Greetings
    Fedor

    in reply to: Extract Pressure On the Surface of Cylinder on Cylinder2D #7264
    FBukreev
    Keymaster

    Hello Navid,

    you could write your own pressure functor that will print out the values in the needed cells. You need to take the cells laying on the cylinder radius and take their pressure values. The easiest way is to print them in the terminal output.
    ´template
    void compute(SuperLattice& sLattice,
    CuboidGeometry<...>& cuboidG,
    UnitConverter<...>& converter){
    //compute physical X and Y coordinste depending on cylinder coordinate
    T cylCoord = ….;
    T X = f(cylCoord);
    T Y = f(cylCoord);
    T physR[2] = {X,Y};
    int latticeR[3] = {0.};
    cuboidG.getLatticeR(latticeR,physR);
    auto cell = sLattice.getBlock(latticeR[0]).get(latticeR[1],latticeR[2]);
    T latticePressure = ( cell.computeRho() – 1.0 ) / descriptors::invCs2();
    T physPressure = converter.getPhysPressure(latticePressure);
    std::cout << "Cylinder coordinate: " cylCoord << " Pressure: " << physPressure << std::endl; }´ Adapt this code to your case. Greeting Fedor

    in reply to: Extract Pressure On the Surface of Cylinder on Cylinder2D #7265
    FBukreev
    Keymaster

    Hello Navid,

    you could write your own pressure functor that will print out the values in the needed cells. You need to take the cells laying on the cylinder radius and take their pressure values. The easiest way is to print them in the terminal output.

    template<typename T>
    void compute(SuperLattice<T, NSDESCRIPTOR>& sLattice,
                 CuboidGeometry<...>& cuboidG,
                 UnitConverter<...>& converter){
        //compute physical X and Y coordinste depending on cylinder coordinate
        T cylCoord = ....;
        T X = f(cylCoord);
        T Y = f(cylCoord);
        T physR[2] = {X,Y};
        int latticeR[3] = {0.};
        cuboidG.getLatticeR(latticeR,physR);
        auto cell = sLattice.getBlock(latticeR[0]).get(latticeR[1],latticeR[2]);
        T latticePressure = ( cell.computeRho() - 1.0 ) / descriptors::invCs2<T,DESCRIPTOR>();
        T physPressure =  converter.getPhysPressure(latticePressure);
        std::cout << "Cylinder coordinate: " cylCoord << " Pressure: " << physPressure << std::endl;
    }

    Adapt this code to your case.

    Greeting
    Fedor

    • This reply was modified 1 year, 1 month ago by FBukreev.
    in reply to: High Prandtl numbers #7253
    FBukreev
    Keymaster

    Hello Ramiro,

    You can use the UnitConverterFromResolutionAndLatticeVelocity with lattice velocity between 0,1 and 0,15. That will give you the highest possible relaxation time in the chosen resolution. Then look at SmagorinskyBoussinesqCouplingPostProcessor3D. You can stabilize your simulation there with the turbulent Prandtl number.

    Greetings
    Fedor

    in reply to: Implementing Surface-directed spinodal decomposition #7252
    FBukreev
    Keymaster

    You can find something similar in the turbulent nozzle3d example. There is a turbulent inket velocity functor. What I wrote above is an example not from some specific case.

    in reply to: LBM turbulence #7227
    FBukreev
    Keymaster

    You need to use the pvd file to see the results.

    in reply to: LBM laminar #7226
    FBukreev
    Keymaster

    Hello,

    this are minimal coordinates of the material number 2, the nearest wall point to the coordinates origin.

    Greetings
    Fedor

    in reply to: LBM turbulence #7221
    FBukreev
    Keymaster

    You can also look into examples/laminar/cylinder3d.
    This indicator just enlarges the stl geometry to lattice points depending on cell size.

    in reply to: Variable heat source dependent of position and time #7218
    FBukreev
    Keymaster

    Hello Mike,

    do you want to simulate also the heat transfer inside the wall?

    You can use the mentioned source term with help of the SourcedAdvectionDiffusionGBKdynamics by setting the external field SOURCE with that expression. The changing wall termperature you can programm as a new special boundary condition with changing temperature or heat flux.

    Greetings
    Fedor

    in reply to: LBM turbulence #7217
    FBukreev
    Keymaster

    Hello,

    you can look how the stl part is implemented in particles/bifurcation/eulerEuler example with IndicatorLayer function. It must ease the stl inclusion for you.
    You can use the UnitConverterFromResolutionAndLatticeVelocity and set the lattice velocity to 0,1 there or with some smaller value. It can make the simulation more stable.

    Greetings
    Fedor

    in reply to: LBM turbulence #7211
    FBukreev
    Keymaster

    Hello,

    I think you have not defined the Smagorinsky Constant there
    sLattice.setParameter<collision::LES::Smagorinsky>(T(0.15));

    Greetings
    Fedor

    in reply to: Heat transfer liquid-solid and heat conduction in solids #7209
    FBukreev
    Keymaster

    Hello,

    yes, this is the way to change some value per cell.
    There are many reasons why the temperature does not change. You need to display the temperature value after each operation with ADE equation to find the reason.

    Regards
    Fedor

    in reply to: Input Parameters for Shear Kalman Smagorinsky BGK #7207
    FBukreev
    Keymaster

    Hello, this model does not work well there and we don’t use it in our next release. Ufortunately I cannot help you with it. A better way for you could be to use the standard Smagorinsky model with some own modification that you implement as a separte functor or you modify the collision in the smagorinsky dynamics.

    Greetings
    Fedor

    in reply to: Implementing Surface-directed spinodal decomposition #7206
    FBukreev
    Keymaster

    Hello,

    you can write your own analytical function that depends on the z coordinate and then define the force with that functor. Here one example.

    template <typename T, typename S, typename DESCRIPTOR>
        class PorosityProfil3D : public AnalyticalF3D<T, S>
        {
        private:
            T x0, x1, y0, y1, z0, z1, u_p;
            UnitConverter<T, DESCRIPTOR> const &converter;
            int iT, tempCase;
    
        public:
            PorosityProfil3D(T x0_, T x1_, T y0_, T y1_, T z0_, T z1_, T u_p_, int iT_, int tempCase_, UnitConverter<T, DESCRIPTOR> const &converter_) : AnalyticalF3D<T, S>(3),
                                                                                                                            x0(x0_), x1(x1_), y0(y0_), y1(y1_), z0(z0_), z1(z1_), u_p(u_p_), iT(iT_), tempCase(tempCase_), converter(converter_)
            {
                this->getName() = "PorosityProfil3D";
            };
    
            bool operator()(T output[1], const S x[3])
            {
                T res = converter.getResolution();
                T gf = res / (res + 1);
                T distX = 2 * M_PI * (x[0] - tempCase * u_p * converter.getPhysTime(iT) - x0) / (x1 - x0) * gf;
                T distY = 2 * M_PI * (x[1] - tempCase * u_p * converter.getPhysTime(iT) - y0) / (y1 - y0) * gf;
                T distZ = 2 * M_PI * (x[2] - tempCase * u_p * converter.getPhysTime(iT) - y0) / (z1 - z0) * gf;
    
                output[0] = 0.5 + 0.4 * util::sin(distX) * util::sin(distY) * util::sin(distZ);
    
                return true;
            };
        };
    

    the x[2] is the z variable. For the force you need to change output[1] to the 3 dimensional output[3] array.

    What do you mean under thermal noise? You can add advection diffusion equation for temperature scalar and couple it to the main equations.

    Greetings
    Fedor

    in reply to: Heat transfer liquid-solid and heat conduction in solids #7205
    FBukreev
    Keymaster

    if you have the heat source then you need to use advection diffusion lbm for heat and then calculate tempreature fom it. But the sourtce term is anyway programmed on the way how I mentioned it above.

    Regards,
    Fedor

Viewing 15 posts - 31 through 45 (of 65 total)