This is the parameter file, which is also found in
Definition of Stretching Functions
With stretching functions one can generate a mesh consisting of a boxes with a stretched element arrangement. Therefore two new parameters can be defined in the parameter file: factor and l0. Each one can used to stretch the elements of a box. Their meaning and connection is shown as one-dimensional case in picture 1.
In case of a stretched element arrangement the next element of a box is always stretched by a factor in the direction of the coordinate axis.Thereby the value of factor can have a positive or a negative sign. Here has either a negative and an absolute value or a positive sign and an abolute value . The length of the first element is called . All streched elements together has the length .
Building a Cartesian Box with Stretched Elements
To get a single cartesian box with a stretched element arrangement it is important to know that the parameters and are defined even before one define the stretching parameters factor and l0. The length is defined by the boundarys of the cartesian box and the number of elements per box in the direction of the cartesian coordinate axes, called in the following, was defined with the parameter nElems.
For a stretched element arrangement either the parameter factor or the parameter l0 has to be defined. The other missing parameter will be calculated internally by using the following equation:
The structure of both parameters are explained below. A description of all parameters of the parameterfile can be found in List of Parameters.
|factor||(/-1.75,1,-1.5/)|| Stretching factor of the elements in the direction of the cartesian coordinate axes. A value means an increase of the element size in the direction of the coordinate axis, however, a value of the intervall means a decrease. The Value 1 does not affect the element sizes just as the value 0 which means an deactivation of the stretching function for this axis. Furthermore the stretching behaviour can be mirrored by adding a negative sign to the values. A combination with the parameter l0 ignores the element number of the defined box.|
In case of (/-1.75,1,-1.5/) each following element in the direction of the x-axis is compressed by the factor -1.75 and in the direction of the z-axis by the factor -1.5. The element arrangement in the direction of the y-axis was not changed.
|l0||(/0,1,5,0/)|| The length of the first element of a stretched element arrangement of a cartesian box. Each component of the vector stands for an axis of the cartesian coordinate system. The value 0 means an deactivation of the stretching function for this axis. A negative sign defines the length of the first element of the other side of the box. A combination with the parameter factor ignores the element number of the defined box.|
Here the stretching function is deactivated for the x- and z-axis, whereas the first element in the direction of the y-axis has a size of .
Variable Definition of Stretching Functions
There are several ways to get a stretched element arrangement due to the two different stretching parameters factor and l0. These cases are:
- Defining of factor:
In this case the next element of a box is stretched by a factor in the direction of the coordinate axis. The parameter l0 will be calculated internally by the equation provided above. The number of elements which is defined by the parameter nElems is retained.
- Defining of l0:
In this case the length of the first element (or the last by using a negative sign) is defined in the direction of the coordinate axis. The parameter factor will be calculated internally by the equation provided above. The number of elements which is defined by the parameter nElems is retained.
- Defining of factor and l0:
In this case the parameters have to be defined by the equation provided above manually. Otherwise the stretched element arrangement will most likely not achieved the desired shape. In case of an inaccurate definition the parameter factor is adjusted to the parameter l0 which means that factor will changed internally. Furthermore, the number of elements which is defined by the parameter nElems is probably not retained. Instead, is rounded to nearest natural number.
These three different cases are presented below with a small cube with an edge length of one and with four elements per axis. For a better understanding just x- and y- values were changed und visualized.
Building Multiple Cartesian Boxes with Stretched Elements
For building a mesh consisting of multiple cartesian boxes with a stretched element arrangement at least one of the parameters factor and l0 has to be defined for each cartesian box. The reason for this is that if there shall be a contact between two boxes the surfaces' corner nodes have to coincide. This means that defining a stretch function to a cartesian box leads to a need of a stretch function of the adjacent cartesian box. A visualization of this issue one can see in the sketch of the tutorial's problem.
In the following an exemplary mesh of multiple cartesian boxes with a stretched element arrangement is presented. The belonging parameter file can be found in Parameterfile Stretching Functions. The arrangement of the cartesian boxes corresponds to the one of the tutorial Multiple Cartesian Boxes but instead of equidistant elements a stretched element arrangement is produced by inserting the parameters factor and l0. Furthermore the number of elements of each box were increased by changing the parameter nElems for a better visualization of the stretched element arrangement. The picture below shows the way the elements will be stretched.
It has to be taken into account that the picture above just demonstrates in which directions the elements are stretched respectively compressed. Wether the number of elements per box nor the cartesian boxes'sizes represented here corresponds to the parameters of the Parameterfile Stretching Functions.
If there is a need for assistance of visualizing the HOPR output visit Visualization.
These are visualizations of the cartbox_multiple_stretch_mesh.h5 file.