ProjectPhysX / ProjectPhysX/FluidX3D
Questions about boundary TYPE_E
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 5.3k
- Forks
- 472
- PR merge metrics
- No merged PRs in 30d
Description
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 boundary
if(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" specification
if(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
// }
});
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the TYPE_E boundary setup and inlet/outlet configuration shown in the issue, then review how those boundaries are handled in the project. The issue names no source file or test; completion would require identifying the cause of the backward shock and documenting or validating a corrected boundary setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- hpc
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100