-
I've been working on some planet-disk interaction simulations where you have a planet embedded within a disk orbiting a central star. In the disk.cpp file, GM in the input file is treated as a point mass for the star at the center of the coordinates. I've been trying to run the simulation for the case where the star and planet both orbit the barycenter. For this I removed the GM parameter and treated the star as a source term in a binary with the planet, however this hasn't been working as expected. Any ideas of how to move forward? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I'm afraid I cannot provide any meaningful support without more specific information. What is exactly your problem and what do you expect? In your coordinate system, the orbit of the gas near the coordinate center is not circular. If you are using spherical polar coordinates, probably you need some special treatment for the inner boundary conditions. |
Beta Was this translation helpful? Give feedback.
-
You can simply delete the 'GM' line from the input file to turn off the point source gravity. |
Beta Was this translation helpful? Give feedback.
-
Adding to the above, your own source function can imitate the built-in mass at the origin in |
Beta Was this translation helpful? Give feedback.
Adding to the above, your own source function can imitate the built-in mass at the origin in
src/hydro/srcterms/pointmass.cpp
, where the geometric factors are defined in the appropriatesrc/coordinates/
file. The use of face fluxes of mass for modifying the energy is there for good reason, but a quick and dirty cell-centered version using just the primitives can work decently. The only catch is if you decide to go into a rotating frame, since the obvious way of implementing the Coriolis force is wrong, and will cause your system to spiral out of control numerically.