(parameters:Prescribed_20Stokes_20solution)=
# Prescribed Stokes solution
## **Subsection:** Prescribed Stokes solution
(parameters:Prescribed_20Stokes_20solution/Model_20name)=
### __Parameter name:__ Model name
**Default value:** unspecified
**Pattern:** [Selection ascii data|circle|function|unspecified ]
**Documentation:** Select one of the following models:
‘ascii data’: Implementation of a model in which the velocity is derived from files containing data in ascii format. Note the required format of the input data: The first lines may contain any number of comments if they begin with ‘#’, but one of these lines needs to contain the number of grid points in each dimension as for example ‘# POINTS: 3 3’. The order of the data columns has to be ‘x’, ‘y’, ‘v${}_x$’ , ‘v${}_y$’ in a 2d model and ‘x’, ‘y’, ‘z’, ‘v${}_x$’ , ‘v${}_y$’ , ‘v${}_z$’ in a 3d model. Note that the data in the input files need to be sorted in a specific order: the first coordinate needs to ascend first, followed by the second and the third at last in order to assign the correct data to the prescribed coordinates. If you use a spherical model, then the data will still be handled as Cartesian, however the assumed grid changes. ‘x’ will be replaced by the radial distance of the point to the bottom of the model, ‘y’ by the azimuth angle and ‘z’ by the polar angle measured positive from the north pole. The grid will be assumed to be a latitude-longitude grid. Note that the order of spherical coordinates is ‘r’, ‘phi’, ‘theta’ and not ‘r’, ‘theta’, ‘phi’, since this allows for dimension independent expressions.
‘circle’: This value describes a vector field that rotates around the z-axis with constant angular velocity (i.e., with a velocity that increases with distance from the axis). The pressure is set to zero.
‘function’: This plugin allows to prescribe the Stokes solution for the velocity and pressure field in terms of an explicit formula. The format of these functions follows the syntax understood by the muparser library, see Section~\ref{sec:muparser-format}.
(parameters:Prescribed_20Stokes_20solution/Ascii_20data_20model)=
## **Subsection:** Prescribed Stokes solution / Ascii data model
(parameters:Prescribed_20Stokes_20solution/Ascii_20data_20model/Data_20directory)=
### __Parameter name:__ Data directory
**Default value:** $ASPECT_SOURCE_DIR/data/prescribed-stokes-solution/
**Pattern:** [DirectoryName]
**Documentation:** The name of a directory that contains the model data. This path may either be absolute (if starting with a ‘/’) or relative to the current directory. The path may also include the special text ‘$ASPECT_SOURCE_DIR’ which will be interpreted as the path in which the ASPECT source files were located when ASPECT was compiled. This interpretation allows, for example, to reference files located in the ‘data/’ subdirectory of ASPECT.
(parameters:Prescribed_20Stokes_20solution/Ascii_20data_20model/Data_20file_20name)=
### __Parameter name:__ Data file name
**Default value:** box_2d.txt
**Pattern:** [Anything]
**Documentation:** The file name of the model data.
(parameters:Prescribed_20Stokes_20solution/Ascii_20data_20model/First_20point_20on_20slice)=
### __Parameter name:__ First point on slice
**Default value:** 0.0,1.0,0.0
**Pattern:** [Anything]
**Documentation:** Point that determines the plane in which the 2d slice lies in. This variable is only used if ’Slice dataset in 2d plane’ is true. The slice will go through this point, the point defined by the parameter ’Second point on slice’, and the center of the model domain. After the rotation, this first point will lie along the (0,1,0) axis of the coordinate system. The coordinates of the point have to be given in Cartesian coordinates.
(parameters:Prescribed_20Stokes_20solution/Ascii_20data_20model/Scale_20factor)=
### __Parameter name:__ Scale factor
**Default value:** 1.
**Pattern:** [Double -MAX_DOUBLE...MAX_DOUBLE (inclusive)]
**Documentation:** Scalar factor, which is applied to the model data. You might want to use this to scale the input to a reference model. Another way to use this factor is to convert units of the input files. For instance, if you provide velocities in cm/yr set this factor to 0.01.
(parameters:Prescribed_20Stokes_20solution/Ascii_20data_20model/Second_20point_20on_20slice)=
### __Parameter name:__ Second point on slice
**Default value:** 1.0,0.0,0.0
**Pattern:** [Anything]
**Documentation:** Second point that determines the plane in which the 2d slice lies in. This variable is only used if ’Slice dataset in 2d plane’ is true. The slice will go through this point, the point defined by the parameter ’First point on slice’, and the center of the model domain. The coordinates of the point have to be given in Cartesian coordinates.
(parameters:Prescribed_20Stokes_20solution/Ascii_20data_20model/Slice_20dataset_20in_202D_20plane)=
### __Parameter name:__ Slice dataset in 2D plane
**Default value:** false
**Pattern:** [Bool]
**Documentation:** Whether to use a 2d data slice of a 3d data file or the entire data file. Slicing a 3d dataset is only supported for 2d models.
(parameters:Prescribed_20Stokes_20solution/Compaction_20pressure_20function)=
## **Subsection:** Prescribed Stokes solution / Compaction pressure function
(parameters:Prescribed_20Stokes_20solution/Compaction_20pressure_20function/Function_20constants)=
### __Parameter name:__ Function constants
**Default value:**
**Pattern:** [Anything]
**Documentation:** Sometimes it is convenient to use symbolic constants in the expression that describes the function, rather than having to use its numeric value everywhere the constant appears. These values can be defined using this parameter, in the form ‘var1=value1, var2=value2, ...’.
A typical example would be to set this runtime parameter to ‘pi=3.1415926536’ and then use ‘pi’ in the expression of the actual formula. (That said, for convenience this class actually defines both ‘pi’ and ‘Pi’ by default, but you get the idea.)
(parameters:Prescribed_20Stokes_20solution/Compaction_20pressure_20function/Function_20expression)=
### __Parameter name:__ Function expression
**Default value:** 0
**Pattern:** [Anything]
**Documentation:** The formula that denotes the function you want to evaluate for particular values of the independent variables. This expression may contain any of the usual operations such as addition or multiplication, as well as all of the common functions such as ‘sin’ or ‘cos’. In addition, it may contain expressions like ‘if(x>0, 1, -1)’ where the expression evaluates to the second argument if the first argument is true, and to the third argument otherwise. For a full overview of possible expressions accepted see the documentation of the muparser library at http://muparser.beltoforion.de/.
If the function you are describing represents a vector-valued function with multiple components, then separate the expressions for individual components by a semicolon.
(parameters:Prescribed_20Stokes_20solution/Compaction_20pressure_20function/Variable_20names)=
### __Parameter name:__ Variable names
**Default value:** x,y,t
**Pattern:** [Anything]
**Documentation:** The names of the variables as they will be used in the function, separated by commas. By default, the names of variables at which the function will be evaluated are ‘x’ (in 1d), ‘x,y’ (in 2d) or ‘x,y,z’ (in 3d) for spatial coordinates and ‘t’ for time. You can then use these variable names in your function expression and they will be replaced by the values of these variables at which the function is currently evaluated. However, you can also choose a different set of names for the independent variables at which to evaluate your function expression. For example, if you work in spherical coordinates, you may wish to set this input parameter to ‘r,phi,theta,t’ and then use these variable names in your function expression.
(parameters:Prescribed_20Stokes_20solution/Fluid_20pressure_20function)=
## **Subsection:** Prescribed Stokes solution / Fluid pressure function
(parameters:Prescribed_20Stokes_20solution/Fluid_20pressure_20function/Function_20constants)=
### __Parameter name:__ Function constants
**Default value:**
**Pattern:** [Anything]
**Documentation:** Sometimes it is convenient to use symbolic constants in the expression that describes the function, rather than having to use its numeric value everywhere the constant appears. These values can be defined using this parameter, in the form ‘var1=value1, var2=value2, ...’.
A typical example would be to set this runtime parameter to ‘pi=3.1415926536’ and then use ‘pi’ in the expression of the actual formula. (That said, for convenience this class actually defines both ‘pi’ and ‘Pi’ by default, but you get the idea.)
(parameters:Prescribed_20Stokes_20solution/Fluid_20pressure_20function/Function_20expression)=
### __Parameter name:__ Function expression
**Default value:** 0
**Pattern:** [Anything]
**Documentation:** The formula that denotes the function you want to evaluate for particular values of the independent variables. This expression may contain any of the usual operations such as addition or multiplication, as well as all of the common functions such as ‘sin’ or ‘cos’. In addition, it may contain expressions like ‘if(x>0, 1, -1)’ where the expression evaluates to the second argument if the first argument is true, and to the third argument otherwise. For a full overview of possible expressions accepted see the documentation of the muparser library at http://muparser.beltoforion.de/.
If the function you are describing represents a vector-valued function with multiple components, then separate the expressions for individual components by a semicolon.
(parameters:Prescribed_20Stokes_20solution/Fluid_20pressure_20function/Variable_20names)=
### __Parameter name:__ Variable names
**Default value:** x,y,t
**Pattern:** [Anything]
**Documentation:** The names of the variables as they will be used in the function, separated by commas. By default, the names of variables at which the function will be evaluated are ‘x’ (in 1d), ‘x,y’ (in 2d) or ‘x,y,z’ (in 3d) for spatial coordinates and ‘t’ for time. You can then use these variable names in your function expression and they will be replaced by the values of these variables at which the function is currently evaluated. However, you can also choose a different set of names for the independent variables at which to evaluate your function expression. For example, if you work in spherical coordinates, you may wish to set this input parameter to ‘r,phi,theta,t’ and then use these variable names in your function expression.
(parameters:Prescribed_20Stokes_20solution/Fluid_20velocity_20function)=
## **Subsection:** Prescribed Stokes solution / Fluid velocity function
(parameters:Prescribed_20Stokes_20solution/Fluid_20velocity_20function/Function_20constants)=
### __Parameter name:__ Function constants
**Default value:**
**Pattern:** [Anything]
**Documentation:** Sometimes it is convenient to use symbolic constants in the expression that describes the function, rather than having to use its numeric value everywhere the constant appears. These values can be defined using this parameter, in the form ‘var1=value1, var2=value2, ...’.
A typical example would be to set this runtime parameter to ‘pi=3.1415926536’ and then use ‘pi’ in the expression of the actual formula. (That said, for convenience this class actually defines both ‘pi’ and ‘Pi’ by default, but you get the idea.)
(parameters:Prescribed_20Stokes_20solution/Fluid_20velocity_20function/Function_20expression)=
### __Parameter name:__ Function expression
**Default value:** 0; 0
**Pattern:** [Anything]
**Documentation:** The formula that denotes the function you want to evaluate for particular values of the independent variables. This expression may contain any of the usual operations such as addition or multiplication, as well as all of the common functions such as ‘sin’ or ‘cos’. In addition, it may contain expressions like ‘if(x>0, 1, -1)’ where the expression evaluates to the second argument if the first argument is true, and to the third argument otherwise. For a full overview of possible expressions accepted see the documentation of the muparser library at http://muparser.beltoforion.de/.
If the function you are describing represents a vector-valued function with multiple components, then separate the expressions for individual components by a semicolon.
(parameters:Prescribed_20Stokes_20solution/Fluid_20velocity_20function/Variable_20names)=
### __Parameter name:__ Variable names
**Default value:** x,y,t
**Pattern:** [Anything]
**Documentation:** The names of the variables as they will be used in the function, separated by commas. By default, the names of variables at which the function will be evaluated are ‘x’ (in 1d), ‘x,y’ (in 2d) or ‘x,y,z’ (in 3d) for spatial coordinates and ‘t’ for time. You can then use these variable names in your function expression and they will be replaced by the values of these variables at which the function is currently evaluated. However, you can also choose a different set of names for the independent variables at which to evaluate your function expression. For example, if you work in spherical coordinates, you may wish to set this input parameter to ‘r,phi,theta,t’ and then use these variable names in your function expression.
(parameters:Prescribed_20Stokes_20solution/Pressure_20function)=
## **Subsection:** Prescribed Stokes solution / Pressure function
(parameters:Prescribed_20Stokes_20solution/Pressure_20function/Function_20constants)=
### __Parameter name:__ Function constants
**Default value:**
**Pattern:** [Anything]
**Documentation:** Sometimes it is convenient to use symbolic constants in the expression that describes the function, rather than having to use its numeric value everywhere the constant appears. These values can be defined using this parameter, in the form ‘var1=value1, var2=value2, ...’.
A typical example would be to set this runtime parameter to ‘pi=3.1415926536’ and then use ‘pi’ in the expression of the actual formula. (That said, for convenience this class actually defines both ‘pi’ and ‘Pi’ by default, but you get the idea.)
(parameters:Prescribed_20Stokes_20solution/Pressure_20function/Function_20expression)=
### __Parameter name:__ Function expression
**Default value:** 0
**Pattern:** [Anything]
**Documentation:** The formula that denotes the function you want to evaluate for particular values of the independent variables. This expression may contain any of the usual operations such as addition or multiplication, as well as all of the common functions such as ‘sin’ or ‘cos’. In addition, it may contain expressions like ‘if(x>0, 1, -1)’ where the expression evaluates to the second argument if the first argument is true, and to the third argument otherwise. For a full overview of possible expressions accepted see the documentation of the muparser library at http://muparser.beltoforion.de/.
If the function you are describing represents a vector-valued function with multiple components, then separate the expressions for individual components by a semicolon.
(parameters:Prescribed_20Stokes_20solution/Pressure_20function/Variable_20names)=
### __Parameter name:__ Variable names
**Default value:** x,y,t
**Pattern:** [Anything]
**Documentation:** The names of the variables as they will be used in the function, separated by commas. By default, the names of variables at which the function will be evaluated are ‘x’ (in 1d), ‘x,y’ (in 2d) or ‘x,y,z’ (in 3d) for spatial coordinates and ‘t’ for time. You can then use these variable names in your function expression and they will be replaced by the values of these variables at which the function is currently evaluated. However, you can also choose a different set of names for the independent variables at which to evaluate your function expression. For example, if you work in spherical coordinates, you may wish to set this input parameter to ‘r,phi,theta,t’ and then use these variable names in your function expression.
(parameters:Prescribed_20Stokes_20solution/Velocity_20function)=
## **Subsection:** Prescribed Stokes solution / Velocity function
(parameters:Prescribed_20Stokes_20solution/Velocity_20function/Function_20constants)=
### __Parameter name:__ Function constants
**Default value:**
**Pattern:** [Anything]
**Documentation:** Sometimes it is convenient to use symbolic constants in the expression that describes the function, rather than having to use its numeric value everywhere the constant appears. These values can be defined using this parameter, in the form ‘var1=value1, var2=value2, ...’.
A typical example would be to set this runtime parameter to ‘pi=3.1415926536’ and then use ‘pi’ in the expression of the actual formula. (That said, for convenience this class actually defines both ‘pi’ and ‘Pi’ by default, but you get the idea.)
(parameters:Prescribed_20Stokes_20solution/Velocity_20function/Function_20expression)=
### __Parameter name:__ Function expression
**Default value:** 0; 0
**Pattern:** [Anything]
**Documentation:** The formula that denotes the function you want to evaluate for particular values of the independent variables. This expression may contain any of the usual operations such as addition or multiplication, as well as all of the common functions such as ‘sin’ or ‘cos’. In addition, it may contain expressions like ‘if(x>0, 1, -1)’ where the expression evaluates to the second argument if the first argument is true, and to the third argument otherwise. For a full overview of possible expressions accepted see the documentation of the muparser library at http://muparser.beltoforion.de/.
If the function you are describing represents a vector-valued function with multiple components, then separate the expressions for individual components by a semicolon.
(parameters:Prescribed_20Stokes_20solution/Velocity_20function/Variable_20names)=
### __Parameter name:__ Variable names
**Default value:** x,y,t
**Pattern:** [Anything]
**Documentation:** The names of the variables as they will be used in the function, separated by commas. By default, the names of variables at which the function will be evaluated are ‘x’ (in 1d), ‘x,y’ (in 2d) or ‘x,y,z’ (in 3d) for spatial coordinates and ‘t’ for time. You can then use these variable names in your function expression and they will be replaced by the values of these variables at which the function is currently evaluated. However, you can also choose a different set of names for the independent variables at which to evaluate your function expression. For example, if you work in spherical coordinates, you may wish to set this input parameter to ‘r,phi,theta,t’ and then use these variable names in your function expression.