You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to simulate the response of an object in an air fluid. For this, I have set the left side as the inlet, the right side as the outlet, and periodic boundary conditions for the top, bottom, front, and back. The left side has a velocity directed towards the right, while the right side is configured to allow free outflow.
However, I have observed that during the simulation, a backward shock wave appears at the left wall, as though the outflow condition is not functioning as expected. I would greatly appreciate any insights or suggestions as to why this might be occurring.
Here are the detailed settings I have used:
parallel_for(lbm.get_N(), [&](ulong n) {
uint x=0u, y=0u, z=0u;
lbm.coordinates(n, x, y, z);
// Default initial values: rho=1, u=0, flags=0 (inside fluid)// Below, modifications will be made as needed// (1) Inlet (x=0): Set velocity boundaryif(x == 0u) {
lbm.flags[n] = TYPE_E; // Fluid boundary, use Equilibrium boundary
lbm.u.x[n] = U_in; // Set velocity in the x direction
lbm.u.y[n] = 0.0f;
lbm.u.z[n] = 0.0f;
}
// (2) Outlet (x=Nx-1): Can specify a near free outflow// Method A: Approximate velocity as (U_in, 0, 0), or smaller// Method B: Set density rho != 1// The following demonstrates a simple "velocity" specificationif(x == Nx_1) {
lbm.flags[n] = TYPE_E; // Equilibrium boundary// lbm.u.x[n] = U_in; // Can also be set to a smaller value, such as 0.8f*U_in// lbm.u.y[n] = 0.0f;// lbm.u.z[n] = 0.0f;
lbm.rho[n] = 1.0f; // Or slightly less than 1.0f to simulate a slight pressure gradient
}
// (3) Top, bottom, front, and back boundaries: Rigid walls// if(y == 0u || y == Ny_1 || z == 0u || z == Nz_1) {// lbm.flags[n] = TYPE_S; // No-slip boundary// // set the transparent boundary// }
});
The text was updated successfully, but these errors were encountered:
// --------------------------- 1. Define Physical Quantities, Grid, and Flow Parameters ---------------------------// Example: Set Reynolds number Re, characteristic length D (obstacle diameter), and inlet velocity U_inconstfloat Re = 4000.0f; // Example: Reynolds number around 4000constfloat D = 100.0f; // Cylinder diameter (LBM length unit)constfloat U_in = 0.05f; // Inlet velocity (LBM velocity unit, typical range ~0.001 - 0.1)// From Re = (U_in * D) / nu => nu = (U_in * D) / Reconstfloat nu = (U_in * D) / Re;
// Define the dimensions of the wind tunnel: assume that the length direction x is much larger, and y, z are the height and width// This is just an example; you can adjust the size as neededconstfloat Lx = 10.0f * D; // Length in the x directionconstfloat Ly = 2.0f * D; // Height in the y directionconstfloat Lz = 2.0f * D; // Width in the z direction// Convert floating-point dimensions to integer grid sizes// For example, aiming for ~5-6 million grid cells in total volume Nx*Ny*Nz// Simple example: 1 cell corresponds to 1 LBM length unit in each directionconstuint Nx = (uint)ceil(Lx);
constuint Ny = (uint)ceil(Ly);
constuint Nz = (uint)ceil(Lz);
float3 axis = axis_ * (Nx, Ny, Nz); //0, 4, 5, 6// --------------------------- 2. Create LBM Simulation Object ---------------------------// Here, only a single GPU is used, and no additional body forces are applied (fx=fy=fz=0.0f)
LBM lbm(Nx, Ny, Nz, nu, 0.0f, 0.0f, 0.0f);
I would like to simulate the response of an object in an air fluid. For this, I have set the left side as the inlet, the right side as the outlet, and periodic boundary conditions for the top, bottom, front, and back. The left side has a velocity directed towards the right, while the right side is configured to allow free outflow.
However, I have observed that during the simulation, a backward shock wave appears at the left wall, as though the outflow condition is not functioning as expected. I would greatly appreciate any insights or suggestions as to why this might be occurring.
Here are the detailed settings I have used:
The text was updated successfully, but these errors were encountered: