Continuum Mechanics Simulation; need some help with the math

In summary: If you go that route, you might also want to look into using open source cfd libraries, which would let you more easily share your work with others. Try googling computational fluid dynamics. I'm sure that there are some cfd products out there where you can include some of your own source code. If you go that route, you might also want to look into using open source cfd libraries, which would let you more easily share your work with others.
  • #1
FireStorm000
169
0
Hello all,
Background
I've been playing with computer simulations quite a bit recently, and wrote one that crudely simulates the formation of star systems. My first version was a conventional many body simulation with about 300 small bodies; it actually tends to come up with convincing star systems, either with one or two stars, and several smaller bodies orbiting. In that sense, it is successful.

Unfortunately, the computation cost scaling on an N-body simulation is only so-so, requiring n(n-1) calculations. Even with a negligibility condition, it becomes unmanageable very quickly (and I have a really fast computer...). It's just too many operations.

I've since gone back to the drawing board and decided to try a continuum mechanics approach, where I specify the state of matter at specific fixed intervals, and move mass between them. This way allows considerable optimizations over the N-body simulation, and is more able to be run on my graphics card, which is at least several hundred times more powerful than my CPU for single precision operations (~5TFlops vs ~20GFlops). Cost scaling for this approach appears to be linear for the gravity calculations, plus I can use a look-up table to speed things along.

Problem
While I can currently specify the properties of the gas at any given point, I'm not entirely certain how to move mass between points on the grid. I need something that respects both the bulk velocity of the gas, as well as having it respond to the pressure at adjacent points, and so forth. The most promising suggestion I've heard so far is to model my problem as an electronic one, with a grid of capacitors, and then solve with kirkov's laws. I like that idea, and it would be easy computationally, but I'm not entirely sure how to set up the parallels for current, voltage, etc. Any suggestions would be much appreciated.
-FireStorm-
 
Physics news on Phys.org
  • #2
It might help to check out computational fluid dynamics software, which is geared to solving continuum fluid mechanics problems. You may have to modify the set up a little to include mutual gravitation..
 
  • #3
Chestermiller said:
It might help to check out computational fluid dynamics software, which is geared to solving continuum fluid mechanics problems. You may have to modify the set up a little to include mutual gravitation..
I would absolutely love to see source code for such an application, but I'd be surprised if I could find one. I can find commercial stuff, but nothing I could get source code to or modify, much less incorporate into my own program or redistribute. If you know of an open source one, I'd certainly check it out.
 
  • #4
FireStorm000 said:
I would absolutely love to see source code for such an application, but I'd be surprised if I could find one. I can find commercial stuff, but nothing I could get source code to or modify, much less incorporate into my own program or redistribute. If you know of an open source one, I'd certainly check it out.

Try googling computational fluid dynamics. I'm sure that there are some cfd products out there where you can include some of your own source code.
 
  • #5


I would first like to commend you on your innovative approach to simulating star system formation. It is clear that you have put a lot of thought and effort into this project, and your results so far are impressive.

In terms of your current challenge with the continuum mechanics approach, it seems like you have already considered some potential solutions and are on the right track by looking at electronic models. However, as you mentioned, setting up the parallels for current, voltage, etc. may be a bit tricky.

One suggestion I have is to look into using a finite element method (FEM) for your simulation. This method is commonly used in engineering and physics for solving problems involving continuous media, such as fluid dynamics. It involves breaking down the system into smaller, finite elements and solving equations for each element, which can then be combined to get an overall solution.

In the case of your simulation, you could break down the gas into smaller elements and use FEM to solve for the movement of mass between these elements based on the bulk velocity and pressure at adjacent points. This approach may be more computationally efficient and could provide more accurate results compared to the electronic model.

Additionally, there are many software packages available that utilize FEM for simulations, so you may not have to start from scratch in terms of programming. I would suggest researching and experimenting with different FEM methods and software to find the best fit for your specific simulation.

I hope this suggestion helps and I wish you the best of luck with your simulation. Keep up the great work!
 

1. What is the purpose of continuum mechanics simulation?

The purpose of continuum mechanics simulation is to model and understand the behavior of materials and structures under various loading and boundary conditions. This allows for the prediction of mechanical properties and the optimization of designs.

2. What is the difference between continuum mechanics and classical mechanics?

Continuum mechanics is a branch of mechanics that considers the behavior of materials as a continuous mass rather than individual particles. This allows for the analysis of large-scale systems and the prediction of macroscopic behavior. Classical mechanics, on the other hand, deals with the motion and forces of individual particles.

3. What are the basic equations used in continuum mechanics simulation?

The basic equations used in continuum mechanics simulation are the conservation of mass, conservation of momentum, and conservation of energy. These equations govern the behavior of fluids, solids, and gases and can be solved using numerical methods.

4. How is continuum mechanics simulation used in engineering?

Continuum mechanics simulation is used in engineering to analyze and design structures, machines, and systems. It allows engineers to predict the performance of materials and structures, optimize designs, and evaluate the effects of different loading and boundary conditions.

5. What are some common challenges in continuum mechanics simulation?

Some common challenges in continuum mechanics simulation include the complex nature of material behavior, the need for accurate and reliable numerical methods, and the computational cost of solving large-scale problems. It also requires a deep understanding of both mechanics and mathematics to accurately interpret and analyze simulation results.

Similar threads

Replies
11
Views
3K
  • Classical Physics
Replies
7
Views
829
Replies
1
Views
468
  • Quantum Physics
Replies
22
Views
637
  • Classical Physics
Replies
2
Views
1K
Replies
12
Views
2K
Replies
3
Views
738
  • Programming and Computer Science
Replies
19
Views
2K
Replies
11
Views
1K
Back
Top