Continuum Mechanics Simulation; need some help with the math

Click For Summary

Discussion Overview

The discussion revolves around the challenges of simulating star system formation using continuum mechanics, specifically focusing on the mathematical aspects of moving mass between grid points while accounting for gas dynamics and gravitational interactions. The scope includes computational methods and potential software solutions related to fluid dynamics.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant describes their experience with N-body simulations and the computational challenges they face, leading them to explore a continuum mechanics approach.
  • The same participant seeks advice on how to effectively move mass between grid points while considering bulk velocity and pressure interactions.
  • Another participant suggests looking into computational fluid dynamics (CFD) software, noting that it is designed for continuum fluid mechanics problems but may require modifications for mutual gravitation.
  • There are repeated requests for open-source CFD software that could be modified and integrated into the participant's existing simulation framework.

Areas of Agreement / Disagreement

Participants generally agree on the potential utility of computational fluid dynamics software for the problem at hand, but there is no consensus on specific implementations or available resources. The discussion remains unresolved regarding the best approach to mass movement in the simulation.

Contextual Notes

Participants express uncertainty about the parallels between electrical circuit models and fluid dynamics, as well as the availability of suitable open-source software for their needs.

FireStorm000
Messages
168
Reaction score
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
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..
 
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.
 
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.
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
3K
Replies
11
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
17
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 22 ·
Replies
22
Views
5K
  • · Replies 3 ·
Replies
3
Views
1K
Replies
4
Views
2K