1
$\begingroup$

I'm having two sets of grids. One is uniform and another one is not uniform. I will calculate the derivative in uniform grid points and I like to transfer(map) the derivative to the non-uniform grid points. I have the relationship between uniform and non-uniform grid points.

A similar question was already asked. I'd like to get one answer with an example. For the time sake, I consider the following simple example.

The relation between my uniform and the non-uniform grid is $$x= \zeta^2$$ Let $y(x)$ be the function for which I'd like to calculate the derivative on the non-uniform grid and $y = x^2$. So, $\frac{dy}{dx} =2x$

The uniform grid and derivative information are given, as follows:

uniform grid and derivative

The non-uniform grid: figure.

I want to find the derivative information in the non-uniform grid by mapping.

$\endgroup$
0

1 Answer 1

2
$\begingroup$

Use the chain rule to get the derivative on the non-uniform grid, $\frac{dy}{d\zeta}$:

$$ \begin{align} \frac{dy}{d\zeta} &= \frac{dy}{dx} \frac{dx}{d\zeta}\\ &= \frac{dy}{dx} \cdot 2 \zeta \\ &= \frac{dy}{dx} \cdot 2 \sqrt{x} \\ \end{align} $$

So if you have a way of computing $\frac{dy}{dx}$ on the uniform grid, you can simply scale it by $2\sqrt{x}$ to get the corresponding $\frac{dy}{d\zeta}$ derivative.

$\endgroup$
6
  • $\begingroup$ I think I didn't ask this much easy question! I want to a map function such that, that is a straight line in the second graph. Please note that the function you provided can't be a straight line! $\endgroup$
    – AGN
    Commented Dec 14, 2018 at 16:49
  • $\begingroup$ In that case, it's not quite clear from your question what you are trying to achieve. Are you looking for some function $f(x)$ which gives a straight line when plotted against $\xi$? If so, what is the straight line you want? Tell us more about the quantities you already have, and what you are trying to calculate. $\endgroup$
    – Savithru
    Commented Dec 14, 2018 at 18:38
  • $\begingroup$ It is quite common in computation, we solve our partial differential equations in a uniform grid (computational plane) and transform that to a non-uniform grid (physical plane). I want to know whether any existing approaches available to transform the derivative from one plane to another. $\endgroup$
    – AGN
    Commented Dec 15, 2018 at 10:31
  • $\begingroup$ In the non-uniform plane, only grids are clustered at some point but domain remains same. I'm looking for a map that makes the one-to-one relation between uniform to non-uniform grids. Sorry for confusing that with Jacobian transformation. In CFD books, use Jacobian transformation to transfer variable. I would like to know, whether the derivative is transformable? $\endgroup$
    – AGN
    Commented Dec 15, 2018 at 10:35
  • $\begingroup$ The method I have shown is exactly how you transfer the derivative from the uniform computational grid to the non-uniform physical grid. The Jacobian of the mapping function $x(\xi)$ definitely shows up. This is essentially the same approach that's shown in the other answer, I just substituted your particular $x(\xi)$ relationship. You can read more on this in Section 4.3 of these notes. Eq. 4.3 is consistent with what I have given. $\endgroup$
    – Savithru
    Commented Dec 15, 2018 at 16:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.