Initial and Boundary Conditions
Version 1 Created by Jonathan
M. on 30 May 2009.
I suggest making a completely separate file that will contain all your code. Call it: steprad.c and a similar name can be used for the primary function. Eventually this primary function will be stuck amongst all the other operations. We’ll have to think about at what stage we want the radiation step to be done. Perhaps that paper you mention says how they do it.
Recall you should make your own boundary condition file and initial condition files too. We need to keep things as clear and clean as possible. For the boundary conditions all that’s required is to use the right name for the file and function. You could use the present routine as a template, but look at the other boundary routines for some simpler templates. For example, to see how your code should look in the end, see: boundoutflow3dcart.c . That’s for 3D Cartesian, but the code should look similar in your case. The only thing you really have to worry about is to call the MPI function once you are done with your stuff.
For the initial condition file you should know now that you should duplicate the tori1sol into a new file, rename it as your own name, and then call this function at the bottom of the analsol.c file. In that bottom code just duplicate how the tori1sol code is called.
For the actual boundary conditions: It all depends on the details of your problem. If you really have a disk attached to a star, then I suppose there is a radiation flux into the disk and out of the disk and one has to choose that total flux. For the other boundary conditions you should just use “outflow” for the outer radial edge and the normal polar axis boundary condition for the poles. I would presume that outflow would mean that some simple primitive variable used to define the radiation field will just be copied either directly or linearly into the ghost zones.
Definition in file 4.txt.