Version 22 (modified by 12 years ago) ( diff ) | ,
---|
Computing the Jeans Length
The first step in setting up this problem was to consider the Jeans Length for a given ambient density and temperature. Recall,
I used the ambient density and temperature of the BP case for the Bonnor Ebert runs. This gave
Using the isothermal sound speed of,
where Kb is the boltzmann constant and mH is the mass of hydrogen, I calculated
Determining the form of the perturbation function
Recall, in our linear perturbative analysis on the gravito-hydrodynamic equations, we had:
This led to a 2nd order ODE in the density perturbation which had the following solution:
In addition to specifying the sound speed and ambient density for this perturbation (implicit to the Jeans length), we need to specify the wave length of the perturbation. With the desire to keep the ratio
small, I chose
Using this, we can set the initial (t=0) density inside of the mesh as:
To get the form of the corresponding velocity perturbation, we use the linearized continuity equation:
Rearranging,
where
is the growth rate given by
(cf. growth rate)
and so,
Thus, we have the form of the initial (t=0) velocity perturbation:
Finally, to get the form of the pressure perturbation for an isothermal simulation, we use the Ideal Gas Equation:
which gives
Thus, we now have the form of all perturbations of the fluid variables.
Setting up the problem domain
I decided on a 1D grid (a string of cells in x) that was much greater than the Jeans length:
The Jeans Length needed to be resolved to prevent artificial fragmentation, so
Choosing 1750 cells in the x direction (small computational cost given 1D sim) satisfies this by having
so there are about 35 cells/ Jeans length.
Given the simulation is 1D, I set the ylower/yupper and zlower/zupper bounds to 0 in global.data, and set the number of cells in y = 1 and z = 1.
Problem Scales
lscale | |
---|---|
rscale | |
tempscale |
A meaningful simulation time seemed to be the e-folding time for the perturbation function. That is,
In order to calculate this in computational units, I first ran astrobear to get the output file scales.data, which lists timescale.
After computing
It was easy to solve for tfinal,
The code
The following is for a 1D isothermal sim of the Jeans Instability.
In ProblemModuleInit, I read in ambient density and temperature. These are used to uniformly set a corresponding Ambient Object.
In ProblemGridInit, I loop over the cells in x (indexed by i) adding the following density perturbation:
I am not 100% sure, but I think if I wanted to place the analytical function in astrobear, I would then add to ProblemBeforeStep a loop over cells in i that continues to perturb the density function in time t:
Thus we should see the characteristic growth rate of
.Results
Analytic function -
Since I am having difficulty saving an initial density function in astrobear for use with ProblemBeforeStep, I just plotted the analytical function for the initial density perturbation and the perturbation after an e-folding time in Mathematica. The e-folding time in physical units is ~6 Myr, and in computational units corresponds to t = 0.0016.
These next plots are what I would expect AstroBEAR should give us after 1) strictly initializing a sinusoidal density perturbation, and 2) allowing it to evolve in time with self-gravity turned on. These results are as follows:
These are using periodic physical and elliptical BCs.
Now, a query-over-time of rho at r = (1,0,0) produces the following output:
At t=0.0016
And at t=0.005:
It looks like exponential growth…
Makes me wonder:
1) Scaling error?
2) Error in analytic function at t=6 Myr?
Here's the last curiosity, when I look at the frame where the density = e*rhoInit, the peaks match the 'analytical function' I plotted in Mathematica, but the valleys don't. .
Attachments (13)
- RhoFinal.png (27.4 KB ) - added by 12 years ago.
- rhoInit.png (27.7 KB ) - added by 12 years ago.
- rhoFinalAbear.png (17.2 KB ) - added by 12 years ago.
- rhoInitAbear.png (20.2 KB ) - added by 12 years ago.
- rhoFinal2Abear.png (20.8 KB ) - added by 12 years ago.
- expRho1.png (18.4 KB ) - added by 12 years ago.
- rho0time.png (14.7 KB ) - added by 12 years ago.
- rhoE.png (19.4 KB ) - added by 12 years ago.
- GrowthRate.png (22.7 KB ) - added by 12 years ago.
- RhoCompareJeans23713.png (13.3 KB ) - added by 12 years ago.
- JeansFinal23July2013.png (45.0 KB ) - added by 12 years ago.
- JeansInit23July2013.png (41.6 KB ) - added by 12 years ago.
- Calcs.ods (134.7 KB ) - added by 11 years ago.
Download all attachments as: .zip