Hi John,<div><br></div><div>Thank you for your reply, I have tried different configurations and I always get the same situation: the gas spreading outwards with velocities of ~20 km/s after 300 Myrs of evolution. This happens whether I spread the dark matter particles or not. By the way, I tried using the point mass potential that is implemented as an option in FLASH as you suggested. So I removed the particles completely. I get exactly the same situation, so it is not related to the particles.<br>
<br></div><div>I'm thinking that the problem is related to what Colin mentioned in his answer (check following e-mail)</div><div><br></div><div>Cheers,</div><div>Jesus</div><div><br><div class="gmail_quote">2011/3/17 John ZuHone <span dir="ltr"><<a href="mailto:jzuhone@cfa.harvard.edu" target="_blank">jzuhone@cfa.harvard.edu</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Jesus,<div><br></div><div>I would actually not expect this setup to work all that well. Most certainly the central cell with the particles and the gas is not going to be in hydrostatic equilibrium. This would be true of the central cell even if you had the dark matter spread throughout, but in that case it would not be much of an issue since what you would get is some minor flattening of the gas density profile near the center.</div>
<div><br></div><div>But if I read you correctly you have the particles all dropped into this central zone, and the mass of this central zone alone is much larger than the mass of gas in the entire system, which means each of your particles is very massive. What velocities do you have them set to? Even if you set them initially to zero and they are all at the center you're going to get some spurious velocities. Since the particles are so massive the potential is probably changing a lot and this is throwing things out of equilibrium in the center.</div>
<div><br></div><div>Since the HSE is definitely broken in this cell and probably in a few cells surrounding it, I don't think it's surprising that you're seeing what you are. You are trying to simulate a point mass but severely underresolving it both in terms of spatial and mass resolution. </div>
<div><br></div><div>Is there a particular reason you're trying to represent a point mass in this way? There is a point mass gravitational acceleration option in FLASH that would probably be better suited for this purpose. </div>
<div><br></div><div>Best,</div><div><br></div><font color="#888888"><div>John ZuHone</div></font><div><div></div><div><div><br></div><div><div><div>On Mar 17, 2011, at 12:55 PM, Jesús Zavala Franco wrote:</div>
<br><blockquote type="cite">Dear all,<div><br></div><div>I'm having problems setting up a sphere of gas in hydrostatic equilibrium under its own gravity + the gravity of a particle distribution.</div><div><br></div><div>
In the general case, I would like to have this particle distribution with the same density profile as the gas distribution (so I'm aiming at setting up a dark matter halo with a particle distribution, with gas inside), but to describe the problem I'm having, I will avoid distributing particles in the sphere and simply:</div>
<div><br></div><div>1) put 1000 particles in the centre of the sphere</div><div>2) put gas distributed spherical around this centre with a radial density profile (a NFW profile), and pressure given by the condition of hydrostatic equilibrium:</div>
<div><br></div><div>dP(r)/dr = -(GM(<r)/r^2) * rho_gas(r)</div><div><br></div><div>where M(<r) is the total enclosed mass, and rho_gas(r) is the gas density. M(<r)= M_DM+Mgas(<r), with M_DM the total mass of the 1000 particles, which by the way exceeds the total mass of the gas by almost an order of magnitude. To solve the equation I impose a boundary condition outside the sphere setting a pressure and a density which are reasonable according to the problem and the density profile I'm putting.</div>
<div><br></div><div>So in short, what I have is a sphere of gas within a gravitational potential dominated by essentially a point source in the centre and with a pressure that should give support agains the gravitational collapse.</div>
<div><br></div><div>I'm using a gird of 8^3 with 4 levels of refinement, an ideal gas equation of state, a Pfft Multigrid gravity solver, I'm using the default operator splitting technique to advance the solution.</div>
<div><br></div><div>What I notice is that since the first time step, regardless of my choice of dtinit, the cells just next to the central cell (the one containing the 1000 particles), acquire a radial outwards velocity, whit a size depending of the time step, and that once the time evolution reaches the typical times of the problem (~100 Myrs), this results in the gas in the inner parts propagating outwards, reducing the density in the core, after 1Gyr or so, this propagating gas reaches the boundaries of the sphere. In other words, the equilibrium set at first is broken.</div>
<div><br></div><div>I have tried using the option ppm_modifystates=.true. since as described in the user guide:</div><div><br></div><div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">"The version of PPM in the FLASH code has an option to more closely couple the hydrodynamic solver</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">with a gravitational source term. This can noticeably reduce spurious velocities caused by the operator</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
splitting of the gravitational acceleration from the hydrodynamics"</div></div><div><br></div><div>I thought this could help, but it didn't. I'm aware that if I wouldn't put the particles in the centre, this behaviour is just a resolution problem since the core is not being properly resolved and the density and enclosed mass is underestimated there, the pressure is therefore too high (since is initially set by solving the hydrostatic equilibrium equation with the assumed analytical profile) and it pushed the gas outwards. However, since I'm setting a significant gravity source in the center I wouldn't expect this to be the case. I have tried actually increasing the mass of the particles by a factor of 10, and not considering this mass increase in the solution to the pressure equation, this sets the overall pressure too low and you would expect a collapse. Even though when at first the velocities of the contiguous cells to the centre, point inwards, after a while, they are overwhelmed by an outward flow that develops in the cells next to these, and to my surprise, the sphere expands as well.</div>
<div><br></div><div>I'm running out of ideas on the initial conditions setup, so I'm thinking this could either be a resolution issue, or a bad choice of hydro, gravity solver.</div><div><br></div><div>Any hel will be much appreciated. </div>
<div><br></div><div>Cheers,</div><div>Jesus Zavala</div><div>Department of Physics and Astronomy</div><div>University of Waterloo</div>
</blockquote></div><br></div></div></div></div></blockquote></div><br></div>