Grid 1D, Grid 2D, and Grid 3D
Adding a Grid 1D (), Grid 2D (), or Grid 3D node () from the More Datasets, More 2D Datasets, or More 3D Datasets submenus creates a dataset that can evaluate functions or other datasets on a domain with a grid, including global functions also where there is no domain mesh; for example, you can evaluate BEM and far-field operators. All functions in the same list as the selected function can be evaluated. The domain is an interval for Grid 1D, a rectangle for Grid 2D, and a block for Grid 3D. The domain does not need to have the same dimension as the number of arguments to the function. To plot functions, use a line graph in 1D, for example, by pointing to the Grid 1D dataset in a 1D Plot Group (or similarly for Grid 2D and Grid 3D). Grid datasets always use the spatial frame when evaluating outside the meshed domain.
Click the Plot button () to visualize the grid dataset in a plot.
Data
From the Source list, select Dataset (the default) to evaluate an expression based on a solution dataset or select Function to evaluate a function.
For datasets, select an available solution dataset from the Dataset list, or select None to not use any dataset. It is only possible to evaluate globally defined expressions and expressions that depend on spatial coordinates. Using the ati operator with the extra argument 'mi', you can also access domain variables defined on domains where the grid points are located.
For functions, select the function to create a dataset for from the Function list: None, All, or any of the defined functions in the model. Select All to make the Grid dataset point to all functions in the list rather than to a specific function, which can be useful, for example, to plot several functions together in the same plot group.
For functions, there is also a Refresh button that you can click to update the source for functions that read files (Elevation, Image, and Interpolation).
The plot of the grid data uses the number of points specified in the Resolution section below, mixing uniformly distributed points with points taken from the function, including local minima and maxima.
Parameter Bounds
Available fields are based on the dimension of the Grid dataset. Enter a name for the parameter in the Name field. The First parameter, Second parameter (Grid 2D and Grid 3D), and Third parameter (Grid 3D only) default names are x, y, and z, respectively. For each parameter, enter a Minimum lower bound (the defaults are 0) and a Maximum upper bound (the defaults are 1) for the first; first and second; or first, second, and third dimension of the domain depending on the dimension.
Grid
Enter a Resolution (Grid 1D), x resolution and y resolution (Grid 2D), or x resolution, y resolution, and z resolution (Grid 3D). The resolution is the number of points into which each dimension is discretized. The defaults are 1000 (Grid 1D), 100 (Grid 2D), and 30 (Grid 3D), and the valid range is between 2 and 1,000,000 points.
A high resolution might require significant computational resources. For Grid 1D nodes, the Adaptive checkbox is selected by default to enable downsampling of 1D datasets by removing unnecessary evaluation points, which can improve graph plots in some cases.
From the Point distribution list, select Uniform (the default) for a uniform, linear point distribution, select Exponential for an exponential point distribution, or select Mixed uniform/exponential, which is an exponential distribution (uniform in logarithmic space) followed by a uniform distribution. The mixed distribution guarantees that the maximum relative distance between consecutive evaluation points is small regardless of whether the x-axis is linear or logarithmic.
Advanced
In this section, you can define auxiliary variables and their units. The auxiliary variables have the same value ranges as the parameters in the dataset, but it is possible to control their units explicitly. If activated, you can choose an auxiliary variable from the Insert Expression and Replace Expression menus for the x-axis expression in a Function plot, for example.
Select the Define auxiliary variables checkbox to define auxiliary variable for a grid dataset. Then enter names and units in the Auxiliary variable and associated Unit fields, under First parameter and Second parameter for Grid 2D datasets and under First parameter, Second parameter, and Third parameter for Grid 3D datasets.,
For an example of a 1D grid dataset and with the AC/DC Module, see A Geoelectrical Forward Problem: Application Library path ACDC_Module/Devices,_Resistive/geoelectrics.