discretización cartesianas

You are currently browsing articles tagged discretización cartesianas.

En la discretización que hicimos teníamos dos sistemas acoplados, uno para las $latex X^i$ y otro para las $latex beta^i$. Procedemos ahora a desacoplarlos.

Para empezar, tomamos la divergencia (plana) del sistema:

$latex Delta X^i = 8 pi f^{ij} S^*_j – frac{1}{3}mathcal{D}^i mathcal{D}_j X^j$

y, teniendo en cuenta que $latex mathcal{D}$ conmuta con $latex Delta$ (métrica plana), tenemos:

$latex Delta (mathcal{D}_i X^i) = 8 pi mathcal{D}^j S^*_j – frac{1}{3} Delta (mathcal{D}_j X^j)$,

por lo que:

$latex Delta (mathcal{D}_i X^i) = frac{3}{4} 8 pi mathcal{D}^j S^*_j$.

De esta manera, si definimos $latex Theta_X := mathcal{D}_i X^i$, nos queda:

$latex Delta Theta_X = frac{3}{4} 8 pi mathcal{D}^j S^*_j = 6 pi (partial_x S^*_x + partial_y S^*_y +partial_z S^*_z )$,

que discretizado queda:

$latex frac{(Theta_X)_{i-1,j,k}-2(Theta_X)_{i,j,k}+(Theta_X)_{i+1,j,k}}{h_x^2} + $

$latex frac{(Theta_X)_{i,j-1,k}-2(Theta_X)_{i,j,k}+(Theta_X)_{i,j+1,k}}{h_y^2} + $

$latex frac{(Theta_X)_{i,j,k-1}-2(Theta_X)_{i,j,k}+(Theta_X)_{i,j,k+1}}{h_z^2} = $

$latex = 6 pi (partial_x S^*_x + partial_y S^*_y +partial_z S^*_z )_{i,j,k} $,

donde inicialmente:

$latex (S^*_a)_{i,j,k} = (psi^6)_{i,j,k}rho_{i,j,k}h_{i,j,k}w^2_{i,j,k}(v_a)_{i,j,k}$,

$latex (partial_x S^*_x + partial_y S^*_y +partial_z S^*_z )_{i,j,k} = $

$latex frac{(S^*_x)_{i+1,j,k}-(S^*_x)_{i-1,j,k}}{2h_x} + frac{(S^*_x)_{i,j+1,k}-(S^*_x)_{i,j-1,k}}{2h_y} + frac{(S^*_x)_{i,j,k+1}-(S^*_x)_{i,j,k-1}}{2h_z}$

y que es lineal.

El primer sistema acoplado de ecuaciones quedaría ahora:

$latex partial_{xx} X^x + partial_{yy} X^x + partial_{zz} X^x = 8 pi S^*_x – frac{1}{3} partial_x Theta_X approx $

$latex approx frac{X^x_{i-1,j,k}-2X^x_{i,j,k}+X^x_{i+1,j,k}}{h_x^2} + frac{X^x_{i,j-1,k}-2X^x_{i,j,k}+X^x_{i,j+1,k}}{h_y^2} + frac{X^x_{i,j,k-1}-2X^x_{i,j,k}+X^x_{i,j,k+1}}{h_z^2} = $

$latex = 8 pi (S^*_x)_{i,j,k} – frac{1}{3} (partial_x Theta_X)_{i,j,k}$,

¡que vuelve a ser lineal!

Continuamos con:

$latex partial_{xx} X^y + partial_{yy} X^y + partial_{zz} X^y = 8 pi S^*_y – frac{1}{3} partial_y Theta_X approx $

$latex approx frac{X^y_{i-1,j,k}-2X^y_{i,j,k}+X^y_{i+1,j,k}}{h_x^2} + frac{X^y_{i,j-1,k}-2X^y_{i,j,k}+X^y_{i,j+1,k}}{h_y^2} + frac{X^y_{i,j,k-1}-2X^y_{i,j,k}+X^y_{i,j,k+1}}{h_z^2} = $

$latex = 8 pi (S^*_y)_{i,j,k} – frac{1}{3} (partial_y Theta_X)_{i,j,k}$

y, finalmente:

$latex partial_{xx} X^z + partial_{yy} X^z + partial_{zz} X^z = 8 pi S^*_z – frac{1}{3} partial_z Theta_X approx $

$latex approx frac{X^z_{i-1,j,k}-2X^z_{i,j,k}+X^z_{i+1,j,k}}{h_x^2} + frac{X^z_{i,j-1,k}-2X^z_{i,j,k}+X^z_{i,j+1,k}}{h_y^2} + frac{X^z_{i,j,k-1}-2X^z_{i,j,k}+X^z_{i,j,k+1}}{h_z^2} = $

$latex = 8 pi (S^*_z)_{i,j,k} – frac{1}{3} (partial_z Theta_X)_{i,j,k}$,

donde calculamos al principio:

$latex (partial_x Theta_X)_{i,j,k} = frac{(Theta_X)_{i+1,j,k}-(Theta_X)_{i-1,j,k}}{2h_x}$

$latex (partial_y Theta_X)_{i,j,k} = frac{(Theta_X)_{i,j+1,k}-(Theta_X)_{i,j-1,k}}{2h_y}$

$latex (partial_z Theta_X)_{i,j,k} = frac{(Theta_X)_{i,j,k+1} – (Theta_X)_{i,j,k-1}}{2h_z}$

A continuación, discretizamos las siguientes ecuaciones:

$latex hat{A}^{xx} = 2 partial_x X^x – frac{2}{3} (partial_x X^x + partial_y X^y + partial_z X^z) approx$

$latex approx frac{2}{3}frac{X^x_{i+1,j,k}-X^x_{i-1,j,k}}{h_x} -frac{1}{3} frac{X^y_{i,j+1,k}-X^y_{i,j-1,k}}{h_y} – frac{1}{3} frac{X^z_{i,j,k+1}-X^z_{i,j,k-1}}{h_z}) = hat{A}^{xx}_{i,j,k}$,

$latex hat{A}^{xy} = hat{A}^{yx}= partial_x X^y + partial_y X^x approx $

$latex approx frac{X^y_{i+1,j,k}-X^y_{i-1,j,k}}{2h_x} + frac{X^x_{i,j+1,k}-X^x_{i,j-1,k}}{2h_y} = hat{A}^{xy}_{i,j,k} = hat{A}^{yx}_{i,j,k}$,

$latex hat{A}^{xz} = hat{A}^{zx} = partial_x X^z + partial_z X^x approx $

$latex approx frac{X^z_{i+1,j,k}-X^z_{i-1,j,k}}{2h_x} + frac{X^x_{i,j,k+1}-X^x_{i,j,k-1}}{2h_z} = hat{A}^{xz}_{i,j,k} = hat{A}^{zx}_{i,j,k}$,

$latex hat{A}^{yy} = 2 partial_y X^y – frac{2}{3} (partial_x X^x + partial_y X^y + partial_z X^z) approx $

$latex approx -frac{1}{3}frac{X^x_{i+1,j,k}-X^x_{i-1,j,k}}{h_x} +frac{2}{3} frac{X^y_{i,j+1,k}-X^y_{i,j-1,k}}{h_y} – frac{1}{3} frac{X^z_{i,j,k+1}-X^z_{i,j,k-1}}{h_z}) = hat{A}^{yy}_{i,j,k}$,

$latex hat{A}^{yz} = hat{A}^{zy} = partial_y X^z + partial_z X^y approx $

$latex approx frac{X^z_{i,j+1,k}-X^z_{i,j-1,k}}{2h_y} + frac{X^y_{i,j,k+1}-X^y_{i,j,k-1}}{2h_z} = hat{A}^{yz}_{i,j,k} = hat{A}^{zy}_{i,j,k}$,

$latex hat{A}^{zz} = 2 partial_z X^z – frac{2}{3} (partial_x X^x + partial_y X^y + partial_z X^z) approx $

$latex approx -frac{1}{3}frac{X^x_{i+1,j,k}-X^x_{i-1,j,k}}{h_x} -frac{1}{3} frac{X^y_{i,j+1,k}-X^y_{i,j-1,k}}{h_y} + frac{2}{3} frac{X^z_{i,j,k+1}-X^z_{i,j,k-1}}{h_z}) = hat{A}^{zz}_{i,j,k}$.

Por tanto, la siguiente ecuación:

$latex Delta psi = -2 pi psi^{-1} E^* – psi^{-7} frac{(hat{A}^{xx})^2+(hat{A}^{yy})^2+(hat{A}^{zz})^2+2(hat{A}^{xy})^2+2(hat{A}^{xz})^2+2(hat{A}^{yz})^2}{8}$

queda:

$latex approx frac{psi_{i-1,j,k}-2psi_{i,j,k}+psi_{i+1,j,k}}{h_x^2} + frac{psi_{i,j-1,k}-2psi_{i,j,k}+psi_{i,j+1,k}}{h_y^2} + frac{psi_{i,j,k-1}-2psi_{i,j,k}+psi_{i,j,k+1}}{h_z^2} = $

$latex =-2 pi psi^{-1}_{i,j,k} E^*_{i,j,k} – $

$latex – frac{psi^{-7}_{i,j,k}}{8} ( (hat{A}^{xx}_{i,j,k})^2+(hat{A}^{yy}_{i,j,k})^2+(hat{A}^{zz}_{i,j,k})^2+2(hat{A}^{xy}_{i,j,k})^2+2(hat{A}^{xz}_{i,j,k})^2+2(hat{A}^{yz}_{i,j,k})^2 ) $,

con:

$latex partial_{psi_{i,j,k}} F(psi_{i,j,k}) = -2 ( frac{1}{h_x^2} + frac{1}{h_y^2} + frac{1}{h_z^2} ) -2 pi psi_{i,j,k}^{-2} E^*_{i,j,k} – $

$latex – frac{7}{8} psi^{-8}_{i,j,k} ( (hat{A}^{xx}_{i,j,k})^2+(hat{A}^{yy}_{i,j,k})^2+(hat{A}^{zz}_{i,j,k})^2+2(hat{A}^{xy}_{i,j,k})^2+2(hat{A}^{xz}_{i,j,k})^2+2(hat{A}^{yz}_{i,j,k})^2 )$,

donde:

$latex E^*_{i,j,k} = psi^{6}_{i,j,k} (D_{i,j,k}+tau_{i,j,k})$

y la ecuación:

$latex Delta (alphapsi) = (alpha psi) (2 pi psi^{-2} (E^*+2S^*) + $

$latex + frac{7}{8} psi^{-8} ((hat{A}^{xx})^2+(hat{A}^{yy})^2+(hat{A}^{zz})^2+2(hat{A}^{xy})^2+2(hat{A}^{xz})^2+2(hat{A}^{yz})^2) )$

como:

$latex approx frac{(alphapsi)_{i-1,j,k} – 2(alphapsi)_{i,j,k}+(alphapsi)_{i+1,j,k}}{h_x^2} + $

$latex + frac{(alphapsi)_{i,j-1,k}-2(alphapsi)_{i,j,k}+(alphapsi)_{i,j+1,k}}{h_y^2} + $

$latex + frac{(alphapsi)_{i,j,k-1}-2(alphapsi)_{i,j,k}+(alphapsi)_{i,j,k+1}}{h_z^2} = $

$latex = (alpha psi)_{i,j,k} (2 pi psi^{-2}_{i,j,k} (E^*_{i,j,k}+2S^*_{i,j,k}) + $

$latex + frac{7}{8} psi^{-8}_{i,j,k} ((hat{A}^{xx}_{i,j,k})^2+(hat{A}^{yy}_{i,j,k})^2+(hat{A}^{zz}_{i,j,k})^2+2(hat{A}^{xy}_{i,j,k})^2+2(hat{A}^{xz}_{i,j,k})^2+2(hat{A}^{yz}_{i,j,k})^2) )$,

donde:

$latex partial_{(alpha psi)_{i,j,k}} F((alpha psi)_{i,j,k}) = -2 ( frac{1}{h_x^2} + frac{1}{h_y^2} + frac{1}{h_z^2} ) – 2 pi psi^{-2}_{i,j,k} (E^*_{i,j,k}+2S^*_{i,j,k}) + $

$latex – frac{7}{8} psi^{-8}_{i,j,k} ((hat{A}^{xx}_{i,j,k})^2+(hat{A}^{yy}_{i,j,k})^2+(hat{A}^{zz}_{i,j,k})^2+2(hat{A}^{xy}_{i,j,k})^2+2(hat{A}^{xz}_{i,j,k})^2+2(hat{A}^{yz}_{i,j,k})^2) )$

con:

$latex S^*_{i,j,k} = psi^6_{i,j,k}(rho_{i,j,k}h_{i,j,k}(w^2_{i,j,k}-1) + 3 p_{i,j,k})$.

Finalmente, tenemos el otro sistema acoplado:

$latex Delta beta^i = mathcal{D}_j(2 alpha psi^{-6} hat{A}^{ij}) – frac{1}{3} mathcal{D}^i(mathcal{D}_j beta^j)$,

con el que procedemos de igual manera que con las $latex X^i$:

$latex Delta(mathcal{D}_i beta^i) = mathcal{D}_i (mathcal{D}_j (2 alpha psi^{-6} hat{A}^{ij})) – frac{1}{3} Delta (mathcal{D}_i beta^i)$,

de manera que:

$latex Delta Theta_beta = frac{3}{4} mathcal{D}^i (mathcal{D}_j (2 alpha psi^{-6} hat{A}^{ij})) =$

$latex frac{3}{2}(partial_{xx}(alpha psi^{-6} hat{A}^{xx}) + partial_{yy}(alpha psi^{-6} hat{A}^{yy}) + partial_{zz}(alpha psi^{-6} hat{A}^{zz})$,

con:

$latex Theta_beta := mathcal{D}_i beta^i$,

que discretizada queda:

$latex frac{(Theta_beta)_{i-1,j,k}-2(Theta_beta)_{i,j,k}+(Theta_beta)_{i+1,j,k}}{h_x^2} + $

$latex frac{(Theta_beta)_{i,j-1,k}-2(Theta_beta)_{i,j,k}+(Theta_beta)_{i,j+1,k}}{h_y^2} + $

$latex frac{(Theta_beta)_{i,j,k-1}-2(Theta_beta)_{i,j,k}+(Theta_beta)_{i,j,k+1}}{h_z^2} = $

$latex frac{3}{2}((partial_{xx}(alpha psi^{-6} hat{A}^{xx}))_{i,j,k} + (partial_{yy}(alpha psi^{-6} hat{A}^{yy}))_{i,j,k} + (partial_{zz}(alpha psi^{-6} hat{A}^{zz})_{i,j,k})$,

De esta manera, tenemos:

$latex Delta beta^x = partial_x (2 alpha psi^{-6} hat{A}^{xx}) + partial_y (2 alpha psi^{-6} hat{A}^{xy}) + partial_z (2 alpha psi^{-6} hat{A}^{xz}) – frac{1}{2} partial_x Theta_beta approx $

$latex approx frac{beta^x_{i-1,j,k}-2beta^x_{i,j,k}+beta^x_{i+1,j,k}}{h_x^2} + frac{beta^x_{i,j-1,k}-2beta^x_{i,j,k}+beta^x_{i,j+1,k}}{h_y^2} + frac{beta^x_{i,j,k-1}-2beta^x_{i,j,k}+beta^x_{i,j,k+1}}{h_z^2} = $

$latex = (partial_x (2 alpha psi^{-6} hat{A}^{xx}))_{i,j,k} + (partial_y (2 alpha psi^{-6} hat{A}^{xy}))_{i,j,k} + (partial_z (2 alpha psi^{-6} hat{A}^{xz}) )_{i,j,k} – $

$latex – frac{1}{3} (partial_x Theta_beta)_{i,j,k}$.

De la misma manera:

$latex Delta beta^y = partial_x (2 alpha psi^{-6} hat{A}^{yx}) + partial_y (2 alpha psi^{-6} hat{A}^{yy}) + partial_z (2 alpha psi^{-6} hat{A}^{yz}) – frac{1}{3} partial_y Theta_beta approx $

$latex approx frac{beta^y_{i-1,j,k}-2beta^y_{i,j,k}+beta^y_{i+1,j,k}}{h_x^2} + frac{beta^y_{i,j-1,k}-2beta^y_{i,j,k}+beta^y_{i,j+1,k}}{h_y^2} + frac{beta^y_{i,j,k-1}-2beta^y_{i,j,k}+beta^y_{i,j,k+1}}{h_z^2} = $

$latex = (partial_x (2 alpha psi^{-6} hat{A}^{yx}))_{i,j,k} + (partial_y (2 alpha psi^{-6} hat{A}^{yy}))_{i,j,k} + (partial_z (2 alpha psi^{-6} hat{A}^{yz}) )_{i,j,k} – $

$latex – frac{1}{3} (partial_y Theta_beta)_{i,j,k}$.

Y, por último:

$latex Delta beta^z = partial_x (2 alpha psi^{-6} hat{A}^{zx}) + partial_y (2 alpha psi^{-6} hat{A}^{zy}) + partial_z (2 alpha psi^{-6} hat{A}^{zz}) – frac{1}{3} partial_z Theta_beta approx $

$latex approx frac{beta^z_{i-1,j,k}-2beta^z_{i,j,k}+beta^z_{i+1,j,k}}{h_x^2} + frac{beta^z_{i,j-1,k}-2beta^z_{i,j,k}+beta^z_{i,j+1,k}}{h_y^2} + frac{beta^z_{i,j,k-1}-2beta^z_{i,j,k}+beta^z_{i,j,k+1}}{h_z^2} = $

$latex = (partial_x (2 alpha psi^{-6} hat{A}^{zx}))_{i,j,k} + (partial_y (2 alpha psi^{-6} hat{A}^{zy}))_{i,j,k} + (partial_z (2 alpha psi^{-6} hat{A}^{zz}) )_{i,j,k} – $

$latex – frac{1}{3} (partial_z Theta_beta)_{i,j,k}$.

Parece que, del sistema no lineal acoplado inicial, hemos llegado a un sistema de diez ecuaciones desacopladas donde ocho de ellas son lineales y solo dos son no linales. No pinta mal. Ya escribiremos próximamente sobre las condiciones de contorno…

Tags: , , , ,