Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

I Contravariant components and classic values into code

  1. Jan 5, 2017 #1
    Hello,

    I made a small application that simulates the transport a vector on a spherical sphere. The goal is to check the following general equation :

    $$\text{D}v^{i}= \text{d}v^{i} +v^{k}\Gamma_{jk}^{i}\text{d}y^{j} = 0$$

    with $$v^{i}$$ the contravariant components of vector.

    Into my case, I use the variables $$\theta$$ and $$\phi$$.

    Following the definition above, I get the 2 following relations :

    $$\text{D}v^{\theta} = \text{d}v^{\theta} - v^{\varphi}\sin\theta\,\cos\theta\,\text{d}\varphi=0$$

    $$\text{D}v^{\phi} = \text{d}v^{\varphi} + \cot\theta\,(v^{\theta}\text{d}\varphi + v^{\varphi}\text{d}\theta)=0$$

    Here's a capture of initial situation on this link : http://imgur.com/a/b6fSP

    You can see transported vector which is cyan color and in yellow the geodesic. Basis vectors (which define the tangential plane shadowed) are in pink color (vertical = e_theta and horizontal = e_phi).

    My problem is that in code, I use classical values for the transported vector, I mean like I would use basis vectors normalized. But actually, for checking these above equations, I need to use contravariant components knowing that norm of e_theta and e_phi of local basis is not equal to 1 ( norm(e_theta) = R and norm(e_phi)=R sin(theta).

    To circumvent this issue, I have applied these factors to the classical components that I use in my code :

    $$\vec{V} = \alpha \vec{e_{\theta}}_{Normalized}+\beta \vec{e_{\phi}}_{Normalized}$$

    so I have the norm of my vector V equal to :

    $$||(\vec{V})|| = \sqrt{\alpha^2+\beta^2}$$

    Knowing the norm of e_theta and e_phi, I think I have to take :

    $$\vec{V} = \alpha/R \vec{e_\theta}+\beta/(R \sin(\theta)) \vec{e_\phi}$$

    Then in my code, I replace "alpha" and "beta" (which are used initially and which enable to reproduce the transport) by :

    $$v^{\theta} = \alpha/R$$

    and

    $$v^{\phi} = \beta/(R \sin(\theta))$$

    All of this in order to check the 2 relations at the top.

    Unfortunately, I can't get a value equal to zero for these 2 top equations, even with the factors 1/R and 1/(R si(theta)). On the other hand, I have to make notice that transport is well reproduced at the animation, the only issue is that I have not the vanishing of these 2 equations.

    Do you think this conversion between components used into the code (alpha and beta) and contravariant components (v^{\theta} and v^{\phi}) is good and justified ?

    Right now, I don't know how to fix this problem.

    Thanks
     
    Last edited: Jan 5, 2017
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted



Similar Discussions: Contravariant components and classic values into code
Loading...