Skip to content

adam_prism_ic_object ​

ADAM, PRISM Initial Conditions class definition, CPU backend.

Source: src/app/prism/common/adam_prism_ic_object.F90

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
INI_SECTION_NAMEcharacter(len=18)parameterINI (config) file section name containing IC configs.
IC_TYPE_VACUUMcharacter(len=6)parameterVacuum IC TYPE parameter.
IC_TYPE_RPcharacter(len=15)parameterRiemann Problem IC TYPE parameter.
IC_TYPE_PLANE_WAVEcharacter(len=10)parameterRiemann Problem IC TYPE parameter.
IC_TYPE_RMFcharacter(len=10)parameterRotating Magnetic Field IC TYPE parameter.
IC_TYPE_MAGNETIC_NOZZLEcharacter(len=15)parameterNozzle IC TYPE parameter.
IC_TYPE_RMF_NOZZLEcharacter(len=15)parameterRotating Magnetic Field Nozzle IC TYPE parameter.
IC_TYPE_UNIFORM_FIELDcharacter(len=13)parameterUniform field IC type parameter
IC_TYPE_GAUSSIAN_PULSEcharacter(len=14)parameterGaussian pulse IC TYPE parameter.
IC_TYPE_GAUSSIAN_DERIVATIVE_PULSEcharacter(len=25)parameterGaussian-derivative pulse.
IC_TYPES_ACCEPTEDcharacter(len=*)parameterTypes the IC applies.

Derived Types ​

prism_ic_object ​

Initial Conditions class definition, CPU backend.

Components ​

NameTypeAttributesDescription
amr_iterationsinteger(kind=I4P)Number of AMR iterations imposing IC.
ic_typecharacter(len=:)allocatableIC type.
regions_numberinteger(kind=I4P)Number of IC regions.
qreal(kind=R8P)allocatablePrimitive variables (Dx,Dy,Dz,Bx,By,Bz,Jx,Jy,Jz).
eminreal(kind=R8P)allocatableIC regions bounding box.
emaxreal(kind=R8P)allocatableIC regions bounding box.
kxreal(kind=R8P)Plane wave number in x direction.
kyreal(kind=R8P)Plane wave number in y direction.
kzreal(kind=R8P)Plane wave number in z direction.
lambdareal(kind=R8P)Plane wave wavelength.
B0real(kind=R8P)Plane wave/Gaussian pulse background magnetic field amplitude.
B_xreal(kind=R8P)Unifom field value
B_yreal(kind=R8P)Unifom field value
B_zreal(kind=R8P)Unifom field value
D_xreal(kind=R8P)Unifom field value
D_yreal(kind=R8P)Unifom field value
D_zreal(kind=R8P)Unifom field value
RMF_frequencyreal(kind=R8P)Rotating magnetic field frequency.
RMF_B_amplitudereal(kind=R8P)Rotating magnetic field amplitude.
RMF_rotation_axischaracter(len=99)Rotating magnetic field rotation axis (X, Y, Z).
alphainteger(kind=I4P)RMF rotation axis coordinate 1
betainteger(kind=I4P)RMF rotation axis coordinate 2
gammainteger(kind=I4P)RMF rotation axis coordinate 3
pulse_directioncharacter(len=2)
r0real(kind=R8P)reference point for gaussian pulse at t0
k0real(kind=R8P)wave number for the gaussian pulse
sigmareal(kind=R8P)standard deviation for the gaussian pulse

Type-Bound Procedures ​

NameAttributesDescription
descriptionpass(self)Return pretty-printed object description.
initializepass(self)Initialize IC.
load_from_filepass(self)Load config from file.
set_initial_conditionspass(self)Set initial conditions on PRISM fields.

Subroutines ​

initialize ​

Initialize the equation.

fortran
subroutine initialize(self, file_parameters)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_ic_object)inoutIC.
file_parameterstype(file_ini)inSimulation parameters ini file handler.

Call graph

load_from_file ​

Load config from file.

fortran
subroutine load_from_file(self, file_parameters, go_on_fail)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_ic_object)inoutIC.
file_parameterstype(file_ini)inSimulation parameters ini file handler.
go_on_faillogicalinoptionalGo on if load fails.

Call graph

set_initial_conditions ​

Set initial conditions on PRISM fields.

fortran
subroutine set_initial_conditions(self, physics, field, grid, q)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_ic_object)inIC.
physicstype(prism_physics_object)inFluids physiscs.
fieldtype(field_object)inField object.
gridtype(grid_object)intargetGrid (sibling realm component, threaded in).
qreal(kind=R8P)inoutField cell centered variables.

Call graph

set_gaussian_wave_pulse ​

Set a linearly polarized Gaussian-modulated electromagnetic wave packet. Propagation along +/-x: E_y, B_z. Propagation along +/-y: E_z, B_x. Propagation along +/-z: E_x, B_y.

fortran
subroutine set_gaussian_wave_pulse(x, i_dir, k0, x0, B0, sigma, q)

Arguments

NameTypeIntentAttributesDescription
xreal(kind=R8P)inSpatial coordinates.
i_dirinteger(kind=I4P)inPropagation direction: +/-1, +/-2, +/-3.
k0real(kind=R8P)inCentral wave number.
x0real(kind=R8P)inInitial packet center along propagation direction.
B0real(kind=R8P)inMagnetic-field amplitude.
sigmareal(kind=R8P)inGaussian standard deviation.
qreal(kind=R8P)inoutElectromagnetic state: D(1:3), B(1:3).

Call graph

set_gaussian_derivative_pulse ​

Set a linearly polarized pulse, the derivative of a Gaussian vector potential, with an optional carrier.

Along +x: A_y = A0 exp(-s^2/(2 sigma^2)) cos(k0 s), s = x - x0, and B_z = dA_y/dx, E_y = c B_z:

B_z = -A0 exp(-s^2/(2 sigma^2)) [(s/sigma^2) cos(k0 s) + k0 sin(k0 s)], A0 = B0/sqrt(k0^2 + 1/(e sigma^2)).

Without carrier (k0 = 0) it is the single-cycle pulse, A0 = B0 sigma e^(1/2), max|B| = B0 at s = -/+sigma; its power spectrum peaks at k sigma = 1 with a relative width of order one. With a carrier the spectrum is k [G(k - k0) + G(k + k0)], G Gaussian of width 1/sigma: a packet around k0 of relative width ~1/(k0 sigma), and A0 -> B0/k0 makes B0 the envelope amplitude for k0 sigma >> 1; max|B|/B0 is 1 at k0 = 0, 0.79 at k0 sigma = 1, 0.93 at 4, 0.98 at 8.

A_y vanishes on both sides, so the profile has zero area and no zero-frequency content for any k0: no net momentum to free particles, no quasi-static field in an absorbing layer. The sampled area is zero to round-off for sigma above a couple of cells (Poisson summation), so the profile is not truncated: a cut would leave a jump and an area of the order of the cut tail. Propagation along +/-x: E_y, B_z. Propagation along +/-y: E_z, B_x. Propagation along +/-z: E_x, B_y.

fortran
subroutine set_gaussian_derivative_pulse(x, i_dir, k0, x0, B0, sigma, q)

Arguments

NameTypeIntentAttributesDescription
xreal(kind=R8P)inSpatial coordinates.
i_dirinteger(kind=I4P)inPropagation direction: +/-1, +/-2, +/-3.
k0real(kind=R8P)inCarrier wave number (0: no carrier).
x0real(kind=R8P)inInitial pulse center along the propagation direction.
B0real(kind=R8P)inPeak (k0 = 0) or envelope (k0 sigma >> 1) magnetic field.
sigmareal(kind=R8P)inStandard deviation of the Gaussian vector potential.
qreal(kind=R8P)inoutElectromagnetic state: D(1:3), B(1:3).

Call graph

Functions ​

description ​

Return a pretty-formatted object description.

Attributes: pure

Returns: character(len=:)

fortran
function description(self) result(desc)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_ic_object)inIC.

Call graph