Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regarding passive tracer particles #207

Open
maowei111 opened this issue Jul 31, 2024 · 2 comments
Open

Regarding passive tracer particles #207

maowei111 opened this issue Jul 31, 2024 · 2 comments
Labels
setup question question for a specific setup

Comments

@maowei111
Copy link

Hello, I am a beginner. Could you please tell me if Fluid X3D can realize my idea: to create a rectangular box, define a velocity on the side of the box to simulate wind blowing, then draw a small hole at the bottom of the box and give it a flow rate or velocity to simulate a leak, and use passive tracer particles to demonstrate the effect of the leak? If it is possible, could you provide me with an idea or a piece of code as a reference?

Another question: Do passive tracer particles need to have their quantity, position, and other information predefined and placed in the box? Can't they flow into the computational domain as a particle stream (similar to DPM particles)?

Looking forward to your response!

@ProjectPhysX
Copy link
Owner

Hi @maowei111,

yes FluidX3D can do this, but needs some work from your side on the setup function.

  • The particles have to be placed manually into the simulation box at initialization. Particle number cannot change during simulation. However, you can manually reposition them in between simulation time steps. See here for a sample setup.
  • To put particles into an inflow stream, you can use the following trick:
    • At initialization, place all particles in solid boundary nodes (TYPE_S) somewhere in a wall of the simulation box.
    • During simulation, run a few time steps with lbm.run(5u);, then place a few of the particles in the inflow stream with randomized coordinates. Don't forget to copy from GPU to CPU memory with lbm.particles->read_from_device(); before modifying positions, and copy back to GPU memory with lbm.particles->write_to_device(); afterwards. If you have a lot of particles and modify only few at a time, use toe offset/length parameters in read_from_device()/write_to_device() to copy only the modified particles.

Kind regards,
Moritz

@ProjectPhysX ProjectPhysX added the setup question question for a specific setup label Aug 3, 2024
@maowei111
Copy link
Author

Thank you for your response!
Could you please tell me how to define a circular hole in the computational domain and assign it a flow rate/pressure to simulate leakage? This problem has been troubling me for a day.
Additionally, I have another question: how can I place the imported geometric model at the bottom of the simulation box so that the bottom of the model aligns perfectly with the bottom of the simulation box?
Looking forward to your response again! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
setup question question for a specific setup
Projects
None yet
Development

No branches or pull requests

2 participants