Changes between Version 3 and Version 4 of WindObjects
- Timestamp:
- 01/24/12 16:17:52 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WindObjects
v3 v4 11 11 12 12 {{{ 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 14 19 REAL(KIND=qPREC) :: density=1d0 15 REAL(KIND=qPREC) :: v(3)=0d0 16 REAL(KIND=qPREC) :: pressure=1d0 20 REAL(KIND=qPREC) :: temperature=1d0 17 21 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 20 28 }}} 21 29 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.30 The 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). 23 31 24 32 [[BR]] 25 33 == 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... 34 Firstly, 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... 28 35 29 36 {{{ 30 37 SUBROUTINE ProblemModuleInit() 31 TYPE( AmbientDef), POINTER :: Ambient38 TYPE(WindDef), POINTER :: Wind 32 39 33 CALL Create Ambient(Ambient)40 CALL CreateWind(Wind) 34 41 35 Ambient%density=1036 Ambient%pressure=10037 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 39 46 40 CALL AddTracer( Ambient%iTracer, 'AmbientTracer')47 CALL AddTracer(Wind%iTracer, 'Wind Tracer') 41 48 42 49 END SUBROUTINE ProblemModuleInit 43 50 }}} 44 51 45 Grids then will be initialized with the correct energy etc... before being passed into the various other grid initialization routines. 52 This 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.