(* coordinate 벡터의 크기로 차원 결정한다: n=Length[vars]; *)

InverseMetric[g_] := Simplify[Inverse[g]]

ChristoffelSymbol[g_, vars_] := 
 Block[{n, ig, res}, n = Length[vars]; ig = InverseMetric[g];
  res = Table[(1/2) * Sum[ig[[i, s]] *

         (-D[g[[j, k]], vars[[s]]] + D[g[[j, s]], vars[[k]]] + D[g[[s, k]], vars[[j]]]), {s, 1, n}],

         {i, 1, n} , {j, 1, n} , {k, 1, n}];
  Simplify[res]]

RiemannTensor[g_, vars_] := 
 Block[{n, Chr, res}, n = Length[vars]; 
  Chr = ChristoffelSymbol[g, vars];
  res = Table[

    D[Chr[[i, k, m]], vars[[l]]] - D[Chr[[i, k, l]], vars[[m]]] + 
    Sum[Chr[[i, s, l]]*Chr[[s, k, m]], {s, 1, n}] - 
    Sum[Chr[[i, s, m]]*Chr[[s, k, l]], {s, 1, n}], 

     {i, 1, n} , {k, 1, n} , {l, 1, n} , {m, 1, n}];
  Simplify[res]]

RicciTensor[g_, vars_] := 
 Block[{n, Rie, res}, n = Length[vars]; Rie = RiemannTensor[g, vars];
  res = Table[
    Sum[Rie[[s, i, s, j]], {s, 1, n}], 

    {i, 1, n} , {j, 1, n}];
  Simplify[res]]

RicciScalar[g_, vars_] := 
 Block[{n, Ricci, ig, res}, n = Length[vars]; 
  Ricc = RicciTensor[g, vars]; ig = InverseMetric[g];
  res = Sum[ig[[s, i]] Ricc[[s, i]], {s, 1, n} , {i, 1, n}];
  Simplify[res]]

 

예제: 구대칭 metric

$$ds^2 = -e^{ 2\nu(r)} dt^2 + e^{2\lambda(r)} dr^2 + r^2 d\theta^2 + r^2 \sin^2 \theta d\varphi^2$$

 

vars = {t, r, \[Theta], \[Phi]};

g = {{-Exp[2 \[Nu][r]], 0, 0, 0}, {0, Exp[2 \[Lambda][r]], 0, 0}, {0, 
    0, r^2, 0}, {0, 0, 0, r^2 Sin[\[Theta]]^2}};

RicciTensor[g, vars]

 

결과:

 

 

728x90
Posted by helloktk
,

 

 

 

728x90
Posted by helloktk
,

Mathematica에서 shooting method를 이용해서 비선형 미분방정식의 해를 구하자. 

\begin{align}f' &= \frac{1}{x} (1-a) f \\ a'&=- \frac{x}{2} f^2 (f^2-1) \end{align}

경계조건은 $f(0)=0$, $f(\infty)\to 0$, $a(0)=0$을 만족시켜야 한다. $x$가 증가하면 $f(x)$는 빠르게 $1$로 수렴하므로 오른쪽 경계조건은 $f(15)\to1$로 잡아도 충분하다. $x=0$에서의 apparent singularity를 Mathematica가 처리할 수 있도록 방정식을 변형시켜주어야 한다.

 

 

 

728x90
Posted by helloktk
,

In relaxation methods ODEs are replaced by approximate finite difference equations (FDEs) on a grid or mesh of points that spans the domain of interest.

 

알고리즘 및 사용 예제 관련문서들:

NumericalRecipiesInC/c17-3.pdf

NumericalRecipiesInC/c17-4.pdf

 

Numerical Recipes 에서 얻을 수 있는 필요한 코드들:

1) solvde() : main routine; 

2) bksub ()  : supplementary routine

3) pinvs ()  : supplementary routine

4) red ()  : supplementary routine

5) difeq ()  : user supplied  routine in which differential equations, boundary conditions, and their jacobians are defined. called by solvde().

 

주의점: 경계조건 설정에서 주의해야 한다;

728x90
Posted by helloktk
,

별로 도움은 안되지만,
http://www.phys.huji.ac.il/~barak_kol/HDGR/proceedings/Brustein.pps 
  


f(R) gravity에서 Wald entropy 계산:
D.N. Vollick, Phys. Rev. D76 (2007) 124001, "Noether charge and black hole entropy in modified theories of gravity". http://arxiv.org/abs/0710.1859
 ==> based on the Palatini formalism. connection이 일반적으로 metric compatible 하지 않음. 따라서 covariant derivative에 compatible인 새로운 metric을 이용해서 connection을 표현해야 한다. 이 새로운 metric을 이용하면 metric formalism을 그대로 적용 가능함.


R. Brustein, D. Gorbonos, M. Hadad and A.J.M. Medved, Phys.Rev. D84 (2011) 064011, "Evaluating the Wald entropy from two-derivative terms in quadratic actions". http://arxiv.org/abs/1106.4394   

horizon에서 벗어난 영역에서의 Wald entropy 계산: 
R. Brustein, and A.J.M. Medved, "Gravitational entropy and thermodynamics away from the horizon", http://arxiv.org/abs/1201.5754

728x90
Posted by helloktk
,