wiki:DiskObjects

Version 2 (modified by Jonathan, 11 years ago) ( diff )

BackLinksMenu()

Disk Objects

The Disk object sets up various types of rotating disks. The various properties of a disk can be specified

   TYPE DiskDef
      REAL(KIND=qPREC), DIMENSION(3) :: velocity= (/0,0,0/)  !Disk velocity                                                                                                                                                                                                  
      REAL(KIND=qPREC), DIMENSION(3) :: position = (/0,0,0/)  !Disk velocity                                                                                                                                                                                                 
      REAL(KIND=qPREC) :: density=10   !Disk peak density                                                                                                                                                                                                                    
      REAL(KIND=qPREC) :: pressure=1   !External Disk Pressure                                                                                                                                                                                                               
      REAL(KIND=qPREC) :: radius=1
      REAL(KIND=qPREC) :: height=.25
      REAL(KIND=qPREC) :: thickness=.1 !thickness of disk smoothing region                                                                                                                                                                                                   
      REAL(KIND=qPREC) :: phi=0
      REAL(KIND=qPREC) :: theta=0
      REAL(KIND=qPREC) :: central_mass  !Central Mass                                                                                                                                                                                                                        
      REAL(KIND=qPREC) :: t0=0         !Last time velocity and position were updated.                                                                                                                                                                                        
      REAL(KIND=qPREC) :: background_density=1   !Last time velocity and position were updated.                                                                                                                                                                              
      INTEGER :: soft_function         !Gravitational softening function                                                                                                                                                                                                     
      REAL(KIND=qPREC) :: soft_length  !Gravitational softening radius                                                                                                                                                                                                       
      INTEGER :: SubSample=1           !Subsample factor                                                                                                                                                                                                                     
      INTEGER :: iTracer=0             !Disk Tracer                                                                                                                                                                                                                          
      INTEGER :: type = UNIFORM
      LOGICAL :: PersistInternal=.false.
      LOGICAL :: PersistInBoundaries(3,2)=.false.  !keep disk in each boundary                                                                                                                                                                                               
      INTEGER :: id
      TYPE(ShapeDef), POINTER :: Shape
      INTEGER :: ObjId
   END TYPE DiskDef

To use a disk, just create the object, specify the properties and then call the update routine

     USE Disks
     CALL CreateDisk(mydisk)
      mydisk%soft_length=soft_radius*radius/lScale
      mydisk%soft_function=soft_function
      mydisk%pressure=ddensity*dtemp/rScale/TempScale !cu                                                                                                                                                                                                                    
      mydisk%density=ddensity/rScale
      mydisk%velocity=velocity
      mydisk%theta=theta
      mydisk%phi=phi
      mydisk%position=xloc
      mydisk%thickness=4d0*sink_dx
      mydisk%radius=radius/lScale
      mydisk%height=height/lScale
      mydisk%central_mass=mass*mSolar/mScale
      CALL UpdateDisk(mydisk)

Disks determine the keplerian rotation profile using the actual gravitational force from the central object's mass, gravitational softening length and distance. Currently the softening function can be NoSoft=0, SplineSoft=1, and PlummerSoft=2.

Currently there are two disk models that are supported. Uniform=0, and Hydrostatic=1.

The Uniform disk is just a rotating cylinder or radius Disk%radius and disk height Disk%height and uniform density Disk%density and pressure Disk%pressure. The disk is not in hydrostatic equilibrium in the 'z' direction.

The Hydrostatic disk is has the following density profile for

and for

where

  • is the Disk%density
  • is the Disk%central_mass
  • is the sound speed associated with the Disk%pressure and Disk%density
  • is the Disk%radius
  • is the distance from the origin

Note that if the Disk%soft_function is Plummer Soft, then r, s_0, and s are all modified where is the softening length.

Also if the derived density is below the Disk%Background_Density, then the density is set equal to the background density and the angular velocity is set to zero.

In the hydrostatic case, the temperature is kept constant, so the pressure is just set from the density profile.

Note: See TracWiki for help on using the wiki.