Provides random forcing for Alfven wave problem Originally by Hammett, Dorland and Quataert, Dec. 5, 2001
init_antenna should be called once per run antenna_amplitudes provides the necessary info per time step
added terms needed to calculate heating by antenna (apar_new)
two kinds of namelists should be added to the input file:
driver:
amplitude : RMS amplitude of | apar_antenna | w_antenna : frequency of driving, normalized to kpar v_Alfven Note: the imaginary part is the decorrelation rate nk_stir : Number of k modes that should be driven write_antenna: .true. for direct antenna output to runname.antenna default is .false.
stir: (stir_1, stir_2, stir_3, etc., one for each k we want to drive)
kx, ky, kz : each of size nk_stir (not larger!) : list of k components that are to be driven; integers travel : logical; choose false to make a standing wave : default value is .true.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
complex, | private | :: | w_antenna | ||||
complex, | private, | dimension(:), allocatable | :: | w_stir | |||
complex, | private, | dimension(:,:,:), allocatable | :: | apar_new | |||
complex, | private, | dimension(:,:,:), allocatable | :: | apar_old | |||
integer, | private, | dimension(:), allocatable | :: | kx_stir | |||
integer, | private, | dimension(:), allocatable | :: | ky_stir | |||
integer, | private, | dimension(:), allocatable | :: | kz_stir | |||
real, | private | :: | amplitude | ||||
real, | private | :: | t0 | ||||
real, | private | :: | w_dot | ||||
integer, | private | :: | nk_stir | ||||
integer, | private | :: | out_unit | ||||
logical, | private | :: | restarting | = | .false. | ||
logical, | public | :: | no_driver | = | .false. | ||
logical, | private | :: | write_antenna | = | .false. | ||
logical, | private, | dimension (:), allocatable | :: | trav | |||
real, | private | :: | beta_s | ||||
complex, | private | :: | wtmp | ||||
logical, | private | :: | initialized | = | .false. | ||
type(driver_config_type), | private | :: | driver_config | ||||
type(stir_config_type), | private, | dimension(:), allocatable | :: | stir_config |
Used to represent the input configuration of driver. See the documentation of the antenna module for more details.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | public | :: | exist | = | .false. |
Does the related namelist exist in the target input file? |
|
integer, | public | :: | index | = | 0 |
Used to hold the specific index of numbered namelists |
|
logical, | public | :: | skip_read | = | .false. |
Do we want to skip the read step in init? |
|
logical, | public | :: | skip_broadcast | = | .false. |
Do we want to skip the broadcast step in init? |
|
real, | public | :: | amplitude | = | 0.0 |
Amplitude of Langevin antenna. |
|
logical, | public | :: | ant_off | = | .false. |
Overrides all other options and turns off antenna if |
|
integer, | public | :: | nk_stir | = | 1 |
Number of independent Fourier modes driven by antenna. |
|
logical, | public | :: | restarting | = | .false. |
If |
|
real, | public | :: | t0 | = | -1.0 |
Sets the time at which the antenna frequency changes from
constant w_antenna to linearly varying, with linear piece
proprtional to w_dot multiplied by |
|
complex, | public | :: | w_antenna | = | (1.0, 0.0) |
Frequency of Langevin antenna. Sets the constant part of the complex antenna frequency. |
|
real, | public | :: | w_dot | = | 0.0 |
Sets the coefficient in front of the time varying antenna
frequency (real) component activated when |
|
logical, | public | :: | write_antenna | = | .false. |
Write antenna amplitudes to ASCII file for debugging. |
Used to represent the input configuration of stir. See the documentation of the antenna module for more details.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | public | :: | exist | = | .false. |
Does the related namelist exist in the target input file? |
|
integer, | public | :: | index | = | 0 |
Used to hold the specific index of numbered namelists |
|
logical, | public | :: | skip_read | = | .false. |
Do we want to skip the read step in init? |
|
logical, | public | :: | skip_broadcast | = | .false. |
Do we want to skip the broadcast step in init? |
|
real, | public | :: | a | = | -1.0 |
Initial amplitude of right-moving component. It is not necessary to set a and b unless you are doing restarts, which are rather clunky at the moment with the antenna included. |
|
real, | public | :: | b | = | -1.0 |
Initial amplitude of left-moving component. It is not necessary to set a and b unless you are doing restarts, which are rather clunky at the moment with the antenna included. |
|
integer, | public | :: | kx | = | 1 |
Mode number for stirring. |
|
integer, | public | :: | ky | = | 1 |
Mode number for stirring. |
|
integer, | public | :: | kz | = | 1 |
Mode number for stirring. |
|
logical, | public | :: | travel | = | .true. |
Launches traveling wave if |
FIXME : Add documentation
Gets the default name for this namelist
Gets the default requires index for this namelist
Gets the default name for this namelist
Gets the default requires index for this namelist
Get the array of module level config instances. If it isn't allocated, then return a zero-length array
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | report_unit |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | unit |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(driver_config_type), | intent(in), | optional | :: | driver_config_in | ||
type(stir_config_type), | intent(in), | optional, | dimension(:), allocatable | :: | stir_config_in |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(driver_config_type), | intent(in), | optional | :: | driver_config_in | ||
type(stir_config_type), | intent(in), | optional, | dimension(:), allocatable | :: | stir_config_in |
FIXME : Add documentation
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(out), | dimension (-ntgrid:,:,:) | :: | apar |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | dimension (-ntgrid:,:,:) | :: | kperp2 | ||
complex, | intent(out), | dimension (-ntgrid:,:,:) | :: | j_ext |
Calculate the external current in the antenna
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(inout), | dimension(:,:) | :: | j_ext |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(out), | dimension (-ntgrid:,:,:) | :: | A_ext_old | ||
complex, | intent(out), | dimension (-ntgrid:,:,:) | :: | A_ext_new |
FIXME : Add documentation
Set the module level config types Will abort if the module has already been initialised to avoid inconsistencies.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(driver_config_type), | intent(in), | optional | :: | driver_config_in | ||
type(stir_config_type), | intent(in), | optional, | dimension(:), allocatable | :: | stir_config_in |
Reads in the driver namelist and populates the member variables
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(driver_config_type), | intent(inout) | :: | self |
Writes out a namelist representing the current state of the config object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(driver_config_type), | intent(in) | :: | self | |||
integer, | intent(in), | optional | :: | unit |
Resets the config object to the initial empty state
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(driver_config_type), | intent(inout) | :: | self |
Broadcasts all config parameters so object is populated identically on all processors
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(driver_config_type), | intent(inout) | :: | self |
Reads in the stir namelist and populates the member variables
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(stir_config_type), | intent(inout) | :: | self |
Writes out a namelist representing the current state of the config object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(stir_config_type), | intent(in) | :: | self | |||
integer, | intent(in), | optional | :: | unit |
Resets the config object to the initial empty state
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(stir_config_type), | intent(inout) | :: | self |
Broadcasts all config parameters so object is populated identically on all processors
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(stir_config_type), | intent(inout) | :: | self |