Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

STensor

Guides

  • Get Started

Tech Notes

  • Basic Tensor Computation
  • ComputationWithMetric

Symbols

  • ChristoffelSymbol
  • CreateTensor
  • EinsteinTensor
  • Inverse
  • IsMetric
  • LineElement
  • RicciScalar
  • RicciTensor
  • RiemannTensor
  • SCoordinateTransform
  • STensor
  • STensorQ
  • Symmetrize
  • TensorRank
  • TensorSymmetry
  • Tr
  • VolumeElement
  • WeylTensor
BowenPing`STensor`
WeylTensor
​
WeylTensor
[metric]
returns the Weyl Tensor of metric.
​
Details and Options

Examples  
(6)
Basic Examples  
(1)
Given the Schwarzschild metric :
In[1]:=
g=
CreateTensor
"g",{t,r,θ,ϕ},DiagonalMatrix-1-
2M
r
,
-1
1-
2M
r
,
2
r
,
2
r
2
Sin[θ]
,
IsMetric
True;​​wy=
WeylTensor
[g]
Out[1]=
STensor
Symbol: Weyl(g)
Rank: {0,4}

Show all simplified components in MatrixForm:
In[2]:=
wy["Components"]//Simplify//MatrixForm
Out[2]//MatrixForm=
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
-
2M
3
r
0
0
2M
3
r
0
0
0
0
0
0
0
0
0
0
0
0
0
M(-2M+r)
2
r
0
0
0
0
0
M(2M-r)
2
r
0
0
0
0
0
0
0
0
0
0
M(-2M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,3,3,2

M
1-
2M
r
r
Weyl(g)
2,4,2,4

M
2
Sin[θ]
2M-r
Weyl(g)
2,4,4,2

M
2
Sin[θ]
1-
2M
r
r
Weyl(g)
3,1,1,3
-
M(-2M+r)
2
r
Weyl(g)
3,1,3,1
-
M-1+
2M
r

r
Weyl(g)
3,2,2,3
-
M
2M-r
Weyl(g)
3,2,3,2
-
M
1-
2M
r
r
Weyl(g)
3,4,3,4
2Mr
2
Sin[θ]
Weyl(g)
3,4,4,3
-2Mr
2
Sin[θ]
Weyl(g)
4,1,1,4
-
M(-2M+r)
2
Sin[θ]
2
r
Weyl(g)
4,1,4,1
-
M-1+
2M
r

2
Sin[θ]
r
Weyl(g)
4,2,2,4
-
M
2
Sin[θ]
2M-r
Weyl(g)
4,2,4,2
-
M
2
Sin[θ]
1-
2M
r
r
Weyl(g)
4,3,3,4
-2Mr
2
Sin[θ]
Weyl(g)
4,3,4,3
2Mr
2
Sin[θ]

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com