Simulating flow with Direct Simulation Monte Carlo

In summary, the conversation discusses the simulation of a Maxwell-Boltzmann distributed gas at a constant temperature and the attempt to create flow in the simulation. The participant is seeking guidance on the accuracy of their approach and looking for resources on how to properly set up flow in DSMC simulations.
  • #1
Declan
26
0
Hello everyone!

So far I am simulating a Maxwell-Boltzmann distributed gas at 273K in a cube. The walls are thermal but also set to 273K. So the temperature should stay the same throughout the box, which it does.

But now I'm trying to get the gas to flow. I'm trying something, but I'm not sure if it's the right way to go about it. First of all, I now distribute the velocities almost the same way, but I add an "offset speed" to all of them, so they have the same basic distribution, but shifted (ie, the center of mass is moving now, rather than stationary as before) so they'll be moving towards the "back wall". I have made the "back wall" kind of a one way valve: if a molecule hits it, it's gone forever. I have made the "front wall" kind of a pump: if molecules hit it, it acts like the other normal walls. But I add a particle every time step (to make up for the ones leaving) pretty close in front of that wall (but not directly on it, because that causes problems). I distribute the particles the same way I originally initialized the original particles, but I again add an offset speed, towards the "back wall" (the one way valve, the exit, etc).

But my measurements are being troublesome. The temperature is lower than it should be. The average x velocity should ideally be the offset speed. Near the place where particles are added, it's much lower. Near the back wall, it's much higher.

I know I'm probably not doing this the way most people using DSMC do it. I've googled a bit but couldn't find much. Could someone shed light on what I might be doing wrong? Or show me a paper that explains how to properly set up flow in DSMC?

Thanks!
 
Physics news on Phys.org
  • #2


Hi there! It sounds like you have a good understanding of the Maxwell-Boltzmann distribution and how to simulate a gas at a constant temperature. However, your approach to creating flow in your simulation may not be the most accurate or efficient. In DSMC simulations, the gas particles are typically given random velocities based on the Maxwell-Boltzmann distribution, and then allowed to collide and exchange momentum with each other as they move through the simulated space. This approach more accurately models the random motion of gas particles and the flow of the gas.

In your current approach, you are artificially adding an "offset speed" to the particles, which may be causing some inaccuracies in your results. Additionally, having a one-way valve and adding particles at the front wall may also be affecting the flow in your simulation.

I recommend looking into papers or tutorials on DSMC simulations to see how others have set up flow in their simulations. You may also want to consider using a software specifically designed for DSMC simulations, such as DS2V or dsmcFoam.

I hope this helps and good luck with your simulation!
 

1. What is Direct Simulation Monte Carlo (DSMC)?

Direct Simulation Monte Carlo (DSMC) is a computer simulation method used to model the flow of gases at the molecular level. It is based on the Boltzmann equation and uses statistical sampling techniques to simulate the collisions and interactions between individual molecules in a gas.

2. What are the advantages of using DSMC over other flow simulation methods?

One of the main advantages of DSMC is its ability to model gas flows in rarefied conditions, where traditional continuum-based methods fail. It also allows for the simulation of complex flows with non-uniform properties and the study of molecular effects such as chemical reactions and heat transfer. Additionally, DSMC is highly parallelizable and can handle large-scale simulations efficiently.

3. How does DSMC account for the behavior of individual molecules in a gas?

DSMC uses a statistical approach to simulate the behavior of individual molecules in a gas. The molecules are represented by a large number of computational particles, each with its own position, velocity, and other properties. The particles move according to simple rules, such as free-flight between collisions and conservation of momentum and energy during collisions.

4. What are some applications of DSMC?

DSMC has a wide range of applications in various fields such as aerospace engineering, plasma physics, and microfluidics. It is commonly used to study rarefied gas flows in hypersonic vehicles, spacecraft re-entry, and micro-electromechanical systems (MEMS). DSMC is also used in the design and optimization of vacuum systems, gas sensors, and other devices.

5. What are the limitations of DSMC?

One of the main limitations of DSMC is the computational cost associated with simulating a large number of particles in a gas. This limits its application to relatively small systems and short time scales. Additionally, DSMC is not suitable for simulating dense gas flows where the continuum assumption is valid. Finally, the accuracy of DSMC results depends on the accuracy of the input parameters and assumptions made in the simulation, which can be challenging to determine in some cases.

Similar threads

  • Atomic and Condensed Matter
Replies
4
Views
3K
  • Programming and Computer Science
Replies
1
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • General Math
Replies
2
Views
1K
  • Programming and Computer Science
Replies
1
Views
1K
  • Atomic and Condensed Matter
Replies
1
Views
2K
Replies
67
Views
5K
  • Atomic and Condensed Matter
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
4K
  • High Energy, Nuclear, Particle Physics
Replies
9
Views
2K
Back
Top