I have a grid that I plan to discretize in 1D. It extends from 0 to L using N nodes, and I need to refine it at each end. I plan to have something that looks as follows:
I have tried the to specify these two parameters:
- growth rate (r)
- initial node spacing (dx1)
Then the x points are calculated in a series such as the following:
x(i) = dx1 * r ^ x(i-1)
This works fine if I know N, and specify r and dx1. But ideally, I would need r and dx1 to be functions of N to properly scale the grid when N increases. I.e. with N = 10, r should be about 1.7 but when N = 100, r should be about 1.1 to have the same "shape". Similar problem with dx1. Anyone know how to make those two parameters functions of N that will scale with it?
