% 6_vzdalenosti/AST023_6_vzdalenosti.tex
% Astrofyzika pro fyziky, 6. kapitola o vzd�lenostech.
% Miroslav Broz (miroslav.broz@email.cz), Jan 2nd 2007

\input ../povetron.tex
\input ../kurzmac.tex

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\overfullrule=0pt

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\sect* Numerick� �e�en� HDE ve 3D

\sect* FDM

metoda kone�n�ch diferenc�

derivace \-> rozd�ly

hodnoty fce v diskr�tn�ch bodech

siln� formulace?

jednoduch� v kart�zsk�ch sou�adnic�ch (strukturovan� s��):

$${\partial u\over\partial t} = D \left({\partial^2u\over\partial x^2} + {\partial^2u\over\partial y^2} + {\partial^2u\over\partial z^2}\right)$$

$${u_{i,j,k}^{n+1} - u_{i,j,k}^n \over \Delta t} = D \left[
{u_{i+1}^n - 2u_i^n + u_{i-1}^n \over (\Delta x)^2} +
{u_{j+1}^n - 2u_j^n + u_{j-1}^n \over (\Delta y)^2} +
{u_{k+1}^n - 2u_k^n + u_{k-1}^n \over (\Delta z)^2}
\right]$$

nestrukturovan� s�� \-> fitov�n� {\em paraboloidu\/} na n�kolik okoln�ch bod�
  metodou LSM (kv�li 2.~derivac�m)

je jedno, jak�m po�ad� se body po��taj�, p�i explicitn� metod�
v�dy po��t�m ze star�ch $u^n$ nov� $u^{n+1}$
a �asov� krok (tzn.~p�i�azen� $u^{n+1}\rightarrow u^n$)
provedu a� po skon�en� v�po�tu $u^{n+1}$

(p�i implicitn� ale m��e vzniknout p�kn� \uv{hnusn�} ��dk� ne-tridiagon�ln� matice)

pro polynomy 2. stupn� je toto diferen�n� sch�ma p�esn�
(odpov�d� Taylorov� rozvoji)

OBR hde5


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\sect* FVM

metoda kone�n�ch objem�

integrov�n� HDE p�es mal� objem a Gauss�v teor�m,
toky veli�iny p�es st�ny objem�

hodnoty fce jako pr�m�ry v objemov�ch elementech

integr�ln� formulace?

nemus� b�t strukturovan� s��

$${\partial u\over\partial t} = \nabla\cdot(D\nabla u)$$

$$\int_V {\partial u\over\partial t} \d V
= \int_V \nabla\cdot(D\nabla u) \d V
= \int_S D\nabla u \d S$$

$$V {\bar u^{n+1}-\bar u^n\over \Delta t} = \sum_{{\rm st�ny}} D S {\Delta\bar u^n\over \Delta x}$$

pro 1-D \uv{objemov�} elementy to {\em p�esn�\/} odpov�d� FDM :)

$${\bar u^{n+1}-\bar u^n\over \Delta t} = D\! \overbrace{S\over V}^{\textstyle {1\over\Delta x}}\! {1\over\Delta x}\, [ \overbrace{(\bar u^n_{j+1} - \bar u^n_j) + (\bar u^n_{j-1} - \bar u^n_j)}^{\bar u^n_{j+1} - 2\bar u^n_j + \bar u^n_{j-1}} ]$$


po�et objemov�ch element� ve FVM versus po�et diskr�tn�ch bod� ve FDM;

ot�zka porovn�n� z hlediska po�tu stup�� volnosti

vyu��v� se Delaunyovy triangulace (4-st�ny)

a Voronoiovy s�t� (du�ln� k Delaunyov�)


OBR tetgen


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\sect* FEM

metoda kone�n�ch prvk�

aproximace �e�en� $u$ pro PDE ${\cal L}(u)$ v�enou sumou b�zov�ch fc�:

$$\hat u = \sum_{j=1}^M \overbrace{u_j}^{\rm nezn�m�~koeficienty} \cdot \overbrace{N_j(x)}^{\rm b�zov�~fce}$$

a minimalizace rezidua $R(u_1, u_2, \dots, u_M, x) = {\cal L}(\hat u)$

slab� formulace

(PDE nemus� b�t po dosazen� $\hat u$ spln�na v~ur�it� s�ti bod�,
ale $\hat u$ je optim�ln�m �e�en�m na cel�m intervalu $x$)

snadno se implementuj� nestrukturovan� s�t�

{\em metody minimalizace\/} $R$:

\myitem{metoda nejmen��ch �tverc�} (LSM) ---
tzn.~parci�ln� derivace sumy kvadr�t� $R$ podle koeficient� $u_j$ polo��m = 0:

$${\partial\over\partial u_i} \int_\Omega R^2\d\Omega
= \int_\Omega 2R{\partial R\over\partial u_i}\d\Omega
= 0 \quad i = 1, \dots, M$$

\=> soustava rovnic pro $u_j$

P��klad pro Poissonovu rci:
${\cal L}(u) = u''(x) + f(x)$,
$\Omega = (0,1)$,
$u(0) = u(1) = 0$

$\hat u = \sum_{j=1}^M u_j N_j(x)$
\=>
$R = f(x) + \sum u_j N_j''(x)$

$${\partial R\over u_i} = {\partial\over\partial u_i} \sum_{j=1}^M u_j N_j''(x) = N_i''(x)$$

$$\int_0^1 R{\partial R\over\partial u_i} \d x
= \int_0^1 \left[ f(x) + \sum_{j=1}^M u_j N_j''(x) \right] N_i''(x) \d x
= 0$$

$$\overbrace{-\sum_{j=1}^M \left[ \int_0^1 N_i''(x) N_j''(x) \d x \right]}^{A_{ij}} \, u_j = \overbrace{\int_0^1 f(x) N_i''(x) \d x}^{b_i}$$

\=> takto vznikaj� soustavy rovnic (matice), kter� mus�m �e�it (invertovat)

\myitem{metoda v�en�ch rezidu�} (WRM):

$$\int_\Omega W_i R \d\Omega = 0 \quad i = 1, \dots, M$$

\myitem{koloka�n� metoda}: $W_i = \delta(x-x^{[i]})$;
$\delta$-fce, $x^{[i]}$ jsou koloka�n� body

(toto vlastn� odpov�d� FDM!)

\myitem{Galerkinova metoda}: $W_i = N_i$ (v�hy jsou p��mo b�zov� fce)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\bigskip

existuj� i dal�� metody, nap�.~spektr�ln�, \dots

bakal��ka nebo diplomka\dots


\end



