Changes between Version 3 and Version 4 of WindObjects


Ignore:
Timestamp:
01/24/12 16:17:52 (13 years ago)
Author:
ehansen
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • WindObjects

    v3 v4  
    1111
    1212{{{
    13    TYPE AmbientDef
     13   INTEGER, PARAMETER :: NOWAVE = 0, SQUAREWAVE = 1, SINEWAVE = 2
     14
     15   TYPE WindDef
     16      INTEGER :: dir = 1
     17      INTEGER :: edge = 1
     18      REAL(KIND=qPREC) :: velocity = 0d0
    1419      REAL(KIND=qPREC) :: density=1d0
    15       REAL(KIND=qPREC) :: v(3)=0d0
    16       REAL(KIND=qPREC) :: pressure=1d0
     20      REAL(KIND=qPREC) :: temperature=1d0
    1721      REAL(KIND=qPREC) :: B(3) = 0d0
    18       INTEGER :: iTracer=0
    19    END TYPE AmbientDef
     22      REAL(KIND=qPREC) :: period = 0d0
     23      REAL(KIND=qPREC) :: amplitude = 0d0
     24      INTEGER :: waveform = NOWAVE
     25      INTEGER :: Type = 0
     26      INTEGER :: iTracer = 0
     27   END TYPE WindDef
    2028}}}
    2129
    22 The default values for density and pressure are both 1.  The velocity and magnetization vectors are 0 - and there is no ambient tracer.  To turn on an ambient tracer, the value of iTracer needs to be initialized to a valid tracer index using the AddTracer routine.
     30The default values for density and temperature are both 1.  The velocity and magnetization vectors are 0, and there is no wind tracer.  To turn on a wind tracer, the value of iTracer needs to be initialized to a valid tracer index using the AddTracer routine.  The dir and edge parameters define the direction of the wind and which boundary the wind comes from.  For dir: the x, y, z directions are 1, 2, 3 respectively.  For edge: the lower x, lower y, lower z, upper x, upper y, upper z boundaries are 1,2,3,4,5,6 respectively.  Period, amplitude, and waveform are all parameters used for a velocity perturbation.  Their default is 0 (i.e. no perturbation).
    2331
    2432[[BR]]
    2533== How to Use this Object ==
    26 
    27 This object is perhaps the simplest to use since it has no shape.  One only has to create the ambient object and modify its default values as necessary (and potentially add a tracer field) as follows...
     34Firstly, the {{{USE Winds}}} statement will be required at the top of the module.  Then, one just has to create the wind object and modify its default values as necessary (and potentially add a tracer field) as follows...
    2835
    2936{{{
    3037SUBROUTINE ProblemModuleInit()
    31   TYPE(AmbientDef), POINTER :: Ambient
     38  TYPE(WindDef), POINTER :: Wind
    3239
    33   CALL CreateAmbient(Ambient)
     40  CALL CreateWind(Wind)
    3441
    35   Ambient%density=10
    36   Ambient%pressure=100
    37   Ambient%B(:)=(/1d0, 0d0, 0d0/)
    38   Ambient%v(:)=(/0d0, 0d0, 0d0/)
     42  Wind%density=10
     43  Wind%temperature=100
     44  Wind%B(:)=(/1d0, 0d0, 0d0/)
     45  Wind%velocity=1d5
    3946
    40   CALL AddTracer(Ambient%iTracer, 'Ambient Tracer')
     47  CALL AddTracer(Wind%iTracer, 'Wind Tracer')
    4148
    4249END SUBROUTINE ProblemModuleInit
    4350}}}
    4451
    45 Grids then will be initialized with the correct energy etc... before being passed into the various other grid initialization routines.
     52This set up is your most basic constant, magnetized wind coming from the left boundary with the specified parameters.  Grids then will be initialized with the correct energy etc... before being passed into the various other grid initialization routines.