# SpaceTimeFunctions

The SpaceTimeFunctions element is a location for writing user defined functions that specifically depend on the spatial and temporal variables x, y, z, and t. A space time function can use Parameters and Constants by just typing them directly in as a value of the property.

• User Defined.

This option is deprecated. Use expression instead.

• expression

This is the user-supplied expression that is a function of x, y, z, or t. It can include any pre-defined Constants, Parameters, or Functions, as well as real numbers.

For a list of supported functions that be included in the user-written expression for the function, see expression (STFunc).

• python

This space time function will allow access to a function defined in a Python file to be used in place of a user-defined function.

name

This is the name of the Python function to be accessed. The Python file must be in the same directory as the runspace.

• feedback

This space time function is used to take the value from a history and use that value in the next timestep, allowing feedback.

expression

The initial value to be used in the feedback loop. This expression will be multiplied from the value of the history in the previous output.

history

The name of the history from which to take values; pseudo-potential and absorbed particle current histories are supported.

history goal

The value of the history that should be obtained.

time constant

Defines how quickly the feedback responds to a difference in the measured and desired value. If too small, the measured value will oscillate near the desired value, if too large it will take a long time to reach the desired value.

• chirpWavePulse

Produces a plane wave modulated by a pulse envelope. For more information, see chirpWavePulse.

• cosineFlattop

Flat top function. See cosineFlattop.

• cosineRamp

Function for an initial ramp. See cosineRamp.

• gaussian

Produces a Gaussian function. See gaussian.

• gaussianPulse

Creates a sinusoidal pulse in the form of a Gaussian beam, modulated by a Gaussian envelope longitudinally. See gaussianPulse.

• halfSinePulse

Function for a sinusoidal pulse in the form of a Gaussian beam, modulated by a longitudinal half-sine function. See halfSinePulse.

• leakychannel

Function that is parabolic in radius, then drops linearly to zero. See leakychannel.

• planeWavePulse

Creates a plane wave that’s modulated by a Gaussian transversely and by a half-sine function longitudinally. See planeWavePulse.

Function for an initial ramp into a region of a channel. See radialCosChannel.

• sinePlaneWave

Generates a plane wave pulse that is based on a sine wave. See sinePlaneWave.

• sum function

This is the sum of two previously defined space time functions. The functions used must be defined before their use in the sum function. Sum functions may be nested. For example, you could have a second sum function that accepts a previously defined sum function in order to sum three or more space time functions.

sumFunction1

The first function to be summed.

sumFunction2

The second function to be summed.

• product function

This is the product of two previously defined space time functions. The functions used must be defined before their use in the product function. Product functions may be nested, for example, a second product function can be used to accept a previously defined product function in order to multiply three or more space time functions together.

prodFunction1

The first function to be summed.

prodFunction2

The second function to be summed.