You are currently browsing the tag archive for the ‘Laplaciano curvilineas’ tag.

Supongamos que tenemos el Laplaciano expresado en un sistema de coordenadas curvilineas cualesquiera:

\bigg [ c_1 \frac{\partial^2}{\partial x_1^2} + c_2 \frac{\partial}{\partial x_1} +c_3 \frac{\partial^2}{\partial x_2^2} + c_4 \frac{\partial}{\partial x_2} + c_5 \frac{\partial^2}{\partial x_3^2} + c_6 \frac{\partial}{\partial x_3} \bigg ] u(x_1,x_2,x_3).

La expresión correspondiente en diferencias finitas, utilizando las aproximaciones para las primeras y segundas derivadas de este post, nos queda:

c_{1_{i,j,k}}\frac{1}{h_{x_1}^2} (u_{i-1,j,k} - 2 u_{i,j,k} + u_{i+1,j,k}) + c_{2_{i,j,k}} \frac{1}{2h_{x_1}}(u_{i+1,j,k}-u_{i-1,j,k}) +

+ c_{3_{i,j,k}}\frac{1}{h_{x_2}^2} (u_{i,j-1,k} - 2 u_{i,j,k} + u_{i,j+1,k}) + c_{4_{i,j,k}} \frac{1}{2h_{x_2}}(u_{i,j+1,k}-u_{i,j-1,k}) +

+ c_{5_{i,j,k}}\frac{1}{h_{x_3}^2} (u_{i,j,k-1} - 2 u_{i,j,k} + u_{i,j,k+1}) + c_{6_{i,j,k}} \frac{1}{2h_{x_3}}(u_{i,j,k+1}-u_{i,j,k-1}),

que, agrupando por términos, podemos reescribir como:

(c_{1_{i,j,k}} \frac{1}{h_{x_{1}}^2} - c_{2_{i,j,k}} \frac{1}{2h_{x_{1}}}) u_{i-1,j,k} + (c_{1_{i,j,k}} \frac{1}{h_{x_{1}}^2} + c_{2_{i,j,k}} \frac{1}{2h_{x_{1}}}) u_{i+1,j,k} +

+ (c_{3_{i,j,k}} \frac{1}{h_{x_{2}}^2} - c_{4_{i,j,k}} \frac{1}{2h_{x_{2}}}) u_{i,j-1,k} + (c_{3_{i,j,k}} \frac{1}{h_{x_{2}}^2} + c_{4_{i,j,k}} \frac{1}{2h_{x_{2}}}) u_{i,j+1,k} +

+ (c_{5_{i,j,k}} \frac{1}{h_{x_{3}}^2} - c_{6_{i,j,k}} \frac{1}{2h_{x_{3}}}) u_{i,j,k-1} + (c_{5_{i,j,k}} \frac{1}{h_{x_{3}}^2} + c_{6_{i,j,k}} \frac{1}{2h_{x_{3}}}) u_{i,j,k+1} -

-2 (c_{1_{i,j,k}} \frac{1}{h_{x_{1}}^2} + c_{3_{i,j,k}} \frac{1}{h_{x_{2}}^2} + c_{5_{i,j,k}} \frac{1}{h_{x_{3}}^2}) u_{i,j,k}.

He escrito un modulo en Mathematica que, a partir de los coeficientes del Laplaciano y de las distancias para la discretización nos generan automáticamente estos coeficientes:

finDif

Los anteriores ejemplos corresponden al caso de cilíndricas, esféricas y esféricas compactificadas.

Anuncios

El operador Laplaciano en coordenadas cartesianas es:

\Delta u = \frac{\partial^2}{\partial x^2} u + \frac{\partial^2}{\partial y^2} u + \frac{\partial^2}{\partial z^2} u = \frac{\partial^2}{(\partial x^i)^2} u.

¿Qué pasa cuando queremos expresarlo en otro sistema de coordenadas curvilineas tal que

x=x(q^1,q^2,q^3) = x(q^i), y=y(q^i), z = z(q^i)

cualesquiera? Pues despues de un poco de trabajo, se puede llegar a la expresión:

\boxed{\frac{1}{h_1 h_2 h_3} \frac{\partial}{\partial q^i} (\frac{h_1 h_2 h_3}{h_i^2} \frac{\partial}{\partial q^i} u)},

donde, si definimos el cambio de coordenadas

\boxed{\phi(q^i) := (x(q^i),y(q^i),z(q^i))},

tenemos que

\boxed{h_i = |\frac{\partial}{\partial q^i} \phi|}.

Para ver como funciona la formula, vamos a calcular el Laplaciano en coordenadas cilíndricas y en esféricas.

En el primer caso, tenemos que

\phi(r,\theta,z) = (r \cos \theta, r \sin \theta, z) con

r \in \mathbb{R}^+, \theta \in [0,2 \pi], z \in \mathbb{R},

por lo que tenemos

h_r = | \frac{\partial}{\partial r} \phi| = \sqrt{(\cos \theta, \sin \theta, 0) \cdot (\cos \theta, \sin \theta, 0)} = 1,

h_\theta = |\frac{\partial}{\partial \theta} \phi| = \sqrt{(-r \sin \theta, r \cos \theta, 0) \cdot (-r \sin \theta, r \cos \theta, 0)} = r,

h_z = |\frac{\partial}{\partial z} \phi| = \sqrt{(0,0,1) \cdot (0,0,1)} = 1.

y entonces, al aplicar nuestra fórmula, obtenemos:

\frac{1}{r} \bigg [ \frac{\partial}{\partial r} ( r \frac{\partial}{\partial r} u ) + \frac{\partial}{\partial \theta} ( \frac{1}{r} \frac{\partial}{\partial \theta} u ) + \frac{\partial}{\partial z} ( r \frac{\partial}{\partial z} u ) \bigg ] =

= \frac{1}{r} (1 \frac{\partial}{\partial r} + r \frac{\partial^2}{\partial r^2}) u + \frac{1}{r^2} \frac{\partial^2}{\partial \theta^2} u + \frac{\partial^2}{\partial z^2} u =

= \boxed{\frac{\partial^2}{\partial r^2} u + \frac{1}{r} \frac{\partial}{\partial r} u + \frac{1}{r^2} \frac{\partial^2}{\partial \theta^2} u + \frac{\partial^2}{\partial z^2} u}.

Ahora, en el caso de esféricas, tenemos:

\phi(r,\theta,\varphi) = (r \sin \theta \cos \varphi, r \sin \theta \sin \varphi, r \cos \theta) con

r \in \mathbb{R}^+, \theta \in [0,\pi] y \varphi \in [0,2\pi],

de manera que (el cuadrado hace referencia al producto escalar):

h_r = |\frac{\partial}{\partial r} \phi| = \sqrt{(\sin \theta \cos \varphi, \sin \theta \sin \varphi, \cos \theta)^2} =

= \sqrt{\sin^2 \theta \cos^2 \varphi + \sin^2 \theta \sin^2 \varphi + \cos^2 \theta} = 1

h_\theta = |\frac{\partial}{\partial \theta} \phi| = \sqrt{(r \cos \theta \cos \varphi, r \cos \theta \sin \varphi, - r \sin \theta)^2} =

= \sqrt{r^2 \cos^2 \theta \cos^2 \varphi + r^2 \cos^2 \theta \sin^2 \varphi + r^2 \sin^2 \theta} = r

h_\varphi = |\frac{\partial}{\partial \varphi} \phi| = \sqrt{(-r \sin \theta \sin \varphi,r \sin \theta \cos \varphi,0)^2} =

= \sqrt{r^2 \sin^2 \theta \sin^2 \varphi + r^2 \sin^2 \theta \cos^2 \varphi + 0} = r \sin \theta,

por lo que, con la fórmula, tenemos:

\frac{1}{r^2 \sin \theta} \bigg [ \frac{\partial}{\partial r} (r^2 \sin \theta \frac{\partial}{\partial r}u) + \frac{\partial}{\partial \theta} (\sin \theta \frac{\partial}{\partial \theta}u) + \frac{\partial}{\partial \varphi} (\frac{1}{\sin \theta} \frac{\partial}{\partial \varphi}u) \bigg ] =

= \frac{1}{r^2} \frac{\partial}{\partial r} (r^2 \frac{\partial}{\partial r}u) + \frac{1}{r^2 \sin \theta} \frac{\partial}{\partial \theta} (\sin \theta \frac{\partial}{\partial \theta}u) + \frac{1}{r^2 \sin^2 \theta} \frac{\partial^2}{\partial \varphi^2} u =

= \frac{1}{r^2}(2r \frac{\partial}{\partial r} + r^2 \frac{\partial^2}{\partial r^2})u + \frac{1}{r^2 \sin \theta}(\cos \theta \frac{\partial}{\partial \theta} + \sin \theta \frac{\partial^2}{\partial \theta^2})u + \frac{1}{r^2 \sin^2 \theta} \frac{\partial^2}{\partial \varphi^2}u =

=\boxed{ \frac{\partial^2}{\partial r^2}u + \frac{2}{r} \frac{\partial}{\partial r}u + \frac{1}{r^2} \frac{\partial^2}{\partial \theta^2}u + \frac{\cot \theta}{r^2} \frac{\partial}{\partial \theta}u + \frac{\csc^2 \theta}{r^2} \frac{\partial^2}{\partial \varphi^2}u}

septiembre 2017
L M X J V S D
« Ago    
 123
45678910
11121314151617
18192021222324
252627282930