Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Calculate characteristic properties for a generalized mapping between two coordinate systems
ResourceFunction["CoordinateMappingData"][mapping,property] gives the value of the specified property for the coordinate transformation mapping. | |
ResourceFunction["CoordinateMappingData"][mapping,property,{x1,x2,…,xn}] gives the value of the property evaluated at the point {x1,x2,…,xn}. |
| "CovariantBaseVectors" | covariant base vectors bi (tangential to the coordinates lines) |
| "ContravariantBaseVectors" | contravariant base vectors bj |
| "Metric" | components of the 2-rank covariant metric tensor bij=bi·bj |
| "InverseMetric" | components of the 2-rank contravariant metric tensor bkl=bk·bl, with |
| "VolumeFactor" | coefficient of the differential in volume (surface, line) integrals, |
| "LeviCivitaCovariant" | |
| "LeviCivitaContravariant" | |
| "MappingJacobian" | Jacobian matrix of the mapping |
| "MappingJacobianDeterminant" | determinant of the mapping Jacobian matrix |
| "InverseMappingJacobian" | inverse of the Jacobian matrix of the mapping |
| "UnitVectors" | False | whether the components of the basis should be normalized |
Define local covariant base vectors in cylindrical coordinates:
| In[1]:= | ![]() |
| Out[1]= |
Get covariant base vectors at point {r,ϕ,z}:
| In[2]:= | ![]() |
| Out[2]= |
Define a mapping and coordinate system:
| In[3]:= |
Calculate the associated covariant and contravariant base vectors:
| In[4]:= |
| Out[4]= |
| In[5]:= |
| Out[5]= |
Get normalized covariant and contravariant base vectors:
| In[6]:= |
| In[7]:= | ![]() |
| Out[7]= |
| In[8]:= | ![]() |
| Out[8]= |
Verify their inverse relationships:
| In[9]:= |
| Out[9]= |
Get the covariant metric of mapping to a cylindrical system:
| In[10]:= |
| In[11]:= |
| Out[11]= | ![]() |
Compare the result with the cataloged named system of CoordinateChartData:
| In[12]:= |
| Out[12]= | ![]() |
Do a similar computation to get the inverse metric:
| In[13]:= |
| Out[13]= | ![]() |
| In[14]:= |
| Out[14]= | ![]() |
Verify their inverse relationship:
| In[15]:= |
| Out[15]= |
Identify the volume factor of a mapping:
| In[16]:= |
| In[17]:= |
| Out[17]= |
Compare with CoordinateChartData:
| In[18]:= |
| Out[18]= |
Calculate the covariant components of the Levi-Civita tensor
:
| In[19]:= |
| Out[19]= |
Get the contravariant components of the Levi-Civita tensor
:
| In[20]:= |
| Out[20]= |
Find out which properties are available:
| In[21]:= |
| Out[21]= |
Use the contravariant Levi-Civita symbol to evaluate the cross product
:
| In[22]:= |
| In[23]:= | ![]() |
| Out[19]= |
Check the above result by calculating the cross product of contravariant base vectors b3=b1⨯b2:
| In[24]:= |
| Out[15]= |
Find out the properties of an affine coordinate transformation:
| In[25]:= |
| In[26]:= | ![]() |
| Out[18]= | ![]() |
Compute properties for polar coordinates:
| In[27]:= | ![]() |
| Out[26]= | ![]() |
Identify some metrics on the surface of a sphere:
| In[28]:= |
Get the tangent space (represented by the covariant vectors):
| In[29]:= |