Non uniform coordinate spacing #399
-
What is the name of the non-uniform grid spacing being used called? and where does definition come from? I wrote out the equation defined in I have seen definitions for logarithmic spacing, geometric spacing, and I guess there could be extensions to lagrange polynomials, or any other mapping, but I am not sure how that affects the solution given what is mentioned in the wiki. the wiki says:
Examples I would be interested in understanding would be clustering at the edges or clustering at the interior. What complications should I expect when trying to generalize the nonuniform mesh spacing? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
The grid is always perfectly geometric in cell widths (i.e. differences in adjacent face-centered coordinates). Let's say there are n cells with a ratio of r. Call the faces x0, ..., xn and the cell widths Δ0, ..., Δn-1. Then Δi = Δ0 ri and so xi = x0 + Δ0 ∑j=0i-1 rj. We also have the boundary conditions x0 = xmin and xn = xmax. To see the connection to logarithmic spacing, suppose the faces were uniformly log-spaced: ℓ(xi) = ℓxmin + i ℓΔ for ℓΔ = (ℓxmax - ℓxmin) / n. Then xi = xmin Δi, and we have xi+1 / xi is a constant, Δ. In this case, though, we also have Δi = xi+1 - xi = xmin Δi (Δ - 1), and so Δi+1 / Δi is the constant Δ. That is, this is also geometric in cell widths with the association Δ0 = xmin (Δ - 1) and r = Δ. Thus to get logarithmically spaced faces for given xmin, xmax, and n, choose r = (xmax / xmin)1/n. If you choose an r less than this value (i.e., closer to 1), the grid will be more uniformly spaced (less centrally concentrated). Conversely, larger r results in a more centrally concentrated grid. You could also choose r < 1 to make the grid concentrated toward xmax, though I've never seen anyone do this. All that said, the |
Beta Was this translation helpful? Give feedback.
The grid is always perfectly geometric in cell widths (i.e. differences in adjacent face-centered coordinates).
Let's say there are n cells with a ratio of r. Call the faces x0, ..., xn and the cell widths Δ0, ..., Δn-1. Then Δi = Δ0 ri and so xi = x0 + Δ0 ∑j=0i-1 rj. We also have the boundary conditions x0 = xmin and xn = xmax.
To see the connection to logarithmic spacing, suppose the faces were uniformly log-spaced: ℓ(xi) = ℓxmin + i ℓΔ for ℓΔ = (ℓxmax - ℓxmin) / n. Then xi = xmin Δi, and we have xi+1 / xi is a constant, Δ. In this case, though, we also have Δi = xi+1 - xi = xmin Δi (Δ - 1), and so Δi+1 / Δi is the constant Δ. That is, this is also geometric in cell widths with the ass…