EugeneKalentev

85 Reputation

6 Badges

10 years, 130 days

MaplePrimes Activity


These are questions asked by EugeneKalentev

Hello.
Have a question for use Physics[TransformCoordinates] . For example, in a Cartesian coordinate system is an arbitrary tensor. As you know, in this case the covariant, contravariant and mixed components are the same. We have a coordinate transformation such as transforming our Cartesian coordinate system in the oblique coordinate system. In this simple example, correctly calculated the covariant, contravariant and mixed components (structure: covariant and contravariant), but other mixed components (structure: contravariant and covariant) are calculated is not correct. I checked by hand.



restart

with(Physics):

Setup(mathematicalnotation = true):

ds := dx[1]^2+dx[2]^2+dx[3]^2:

Setup(coordinates = (X = [x[1], x[2], x[3]]), dimension = 3, metric = ds, spacetimeindices = lowercaselatin, quiet):

g_[]:

A[a, b] = Matrix(3, 3, {(1, 1) = 2, (1, 2) = 1, (1, 3) = 3, (2, 1) = 2, (2, 2) = 3, (2, 3) = 4, (3, 1) = 1, (3, 2) = 2, (3, 3) = 1})

A[a, b] = (Matrix(3, 3, {(1, 1) = 2, (1, 2) = 1, (1, 3) = 3, (2, 1) = 2, (2, 2) = 3, (2, 3) = 4, (3, 1) = 1, (3, 2) = 2, (3, 3) = 1}))

(1)

Define(%):

`Defined objects with tensor properties`

(2)

A[]

A[a, b] = (Matrix(3, 3, {(1, 1) = 2, (1, 2) = 1, (1, 3) = 3, (2, 1) = 2, (2, 2) = 3, (2, 3) = 4, (3, 1) = 1, (3, 2) = 2, (3, 3) = 1}))

(3)

A[`~`]

A[`~a`, `~b`] = (Matrix(3, 3, {(1, 1) = 2, (1, 2) = 1, (1, 3) = 3, (2, 1) = 2, (2, 2) = 3, (2, 3) = 4, (3, 1) = 1, (3, 2) = 2, (3, 3) = 1}))

(4)

A[`~a`,b,matrix]

A[`~a`, b] = (Matrix(3, 3, {(1, 1) = 2, (1, 2) = 1, (1, 3) = 3, (2, 1) = 2, (2, 2) = 3, (2, 3) = 4, (3, 1) = 1, (3, 2) = 2, (3, 3) = 1}))

(5)

A[`a`,~b,matrix]

A[a, `~b`] = (Matrix(3, 3, {(1, 1) = 2, (1, 2) = 1, (1, 3) = 3, (2, 1) = 2, (2, 2) = 3, (2, 3) = 4, (3, 1) = 1, (3, 2) = 2, (3, 3) = 1}))

(6)

[y[1] = x[1]-x[2], y[2] = x[2]-x[3], y[3] = x[3]]

[y[1] = x[1]-x[2], y[2] = x[2]-x[3], y[3] = x[3]]

(7)

solve((7), {x[1], x[2], x[3]})

{x[1] = y[1]+y[2]+y[3], x[2] = y[2]+y[3], x[3] = y[3]}

(8)

OK

B[a,b] = TransformCoordinates((8), A[a, b], [y[1], y[2], y[3]], [x[1], x[2], x[3]], simplifier = `@`(`simplify/size`, simplify))

B[a, b] = (Matrix(3, 3, {(1, 1) = 2, (1, 2) = 3, (1, 3) = 6, (2, 1) = 4, (2, 2) = 8, (2, 3) = 15, (3, 1) = 5, (3, 2) = 11, (3, 3) = 19}))

(9)

OK

C[a,b] = TransformCoordinates((8), A[~a,~b], [y[1], y[2], y[3]], [x[1], x[2], x[3]], simplifier = `@`(`simplify/size`, simplify))

C[a, b] = (Matrix(3, 3, {(1, 1) = 2, (1, 2) = -1, (1, 3) = -1, (2, 1) = 0, (2, 2) = -2, (2, 3) = 3, (3, 1) = -1, (3, 2) = 1, (3, 3) = 1}))

(10)

OK

D[a,b] = TransformCoordinates((8), A[a,~b], [y[1], y[2], y[3]], [x[1], x[2], x[3]], simplifier = `@`(`simplify/size`, simplify))NULL

D[a, b] = Matrix(%id = 4452149890)

(11)

Bug

E[a, b] = TransformCoordinates((8), A[~a,b], [y[1], y[2], y[3]], [x[1], x[2], x[3]], simplifier = `@`(`simplify/size`, simplify))NULLNULL

E[a, b] = Matrix(%id = 4452139458)

(12)

should be

LinearAlgebra:-Transpose(rhs((12)))

Matrix(3, 3, {(1, 1) = 0, (1, 2) = -2, (1, 3) = -3, (2, 1) = 1, (2, 2) = 2, (2, 3) = 5, (3, 1) = 1, (3, 2) = 3, (3, 3) = 4})

(13)

``



Download Transformation_tensor_components.mw

Hello. Earlier, I asked about it, (see http://www.mapleprimes.com/questions/203573-How-To-Do-Simple-Operations-On-Tensors). However, not all I was able to understand. Below I will give a try, and maybe you'll show me where I'm wrong.

Also, I'm interested in how you can determine the components of the tensor in a different coordinate system connected with the original in any conversion. Thank for your help.

restart; with(Physics); with(DifferentialGeometry)

ds := Physics:-`^`(dx__1, 2)+Physics:-`^`(dx__2, 2)+Physics:-`^`(dx__3, 2)

dx__1^2+dx__2^2+dx__3^2

(1)

Physics:-Setup(coordinates = (X = [x__1, x__2, x__3]), dimension = 3, metric = ds, quiet)

[coordinatesystems = {X}, dimension = 3, metric = {(1, 1) = 1, (2, 2) = 1, (3, 3) = 1}]

(2)

g_[]

g_[mu, nu] = (Matrix(3, 3, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (2, 2) = 1, (2, 3) = 0, (3, 3) = 1}, storage = triangular[upper], shape = [symmetric]))

(3)

``

u__1 := Physics:-`*`(Physics:-`*`(P, Physics:-`^`(Physics:-`*`(Physics:-`*`(4, Pi), G), -1)), Physics:-`*`(x__3, Physics:-`*`(x__1, Physics:-`^`(Physics:-`^`(r, 3), -1)))-Physics:-`*`(Physics:-`*`(1-Physics:-`*`(2, nu), x__1), Physics:-`^`(Physics:-`*`(r, r+x__3), -1))):u__2 := Physics:-`*`(Physics:-`*`(P, Physics:-`^`(Physics:-`*`(Physics:-`*`(4, Pi), G), -1)), Physics:-`*`(x__2, Physics:-`*`(x__3, Physics:-`^`(Physics:-`^`(r, 3), -1)))-Physics:-`*`(Physics:-`*`(1-Physics:-`*`(2, nu), x__2), Physics:-`^`(Physics:-`*`(r, r+x__3), -1))):u__3 := Physics:-`*`(Physics:-`*`(P, Physics:-`^`(Physics:-`*`(Physics:-`*`(4, Pi), G), -1)), Physics:-`*`(Physics:-`*`(2, 1-nu), Physics:-`^`(r, -1))+Physics:-`*`(Physics:-`^`(x__3, 2), Physics:-`^`(Physics:-`^`(r, 3), -1))):

`e__1,1` := diff(u__1, x__1):`e__2,2` := diff(u__2, x__2):`e__3,3` := diff(u__3, x__3):

`e__1,2` := Physics:-`*`(Physics:-`^`(2, -1), diff(u__1, x__2)+diff(u__2, x__1)):`e__1,3` := Physics:-`*`(Physics:-`^`(2, -1), diff(u__1, x__3)+diff(u__3, x__1)):`e__2,3` := Physics:-`*`(Physics:-`^`(2, -1), diff(u__2, x__3)+diff(u__3, x__2)):

`e__2,1` := `e__1,2`:

`e__3,1` := `e__1,3`:

`e__3,2` := `e__2,3`:

  E := matrix(3, 3, proc (i, j) options operator, arrow; e[i, j] end proc)

Matrix(3, 3, {(1, 1) = e[1, 1], (1, 2) = e[1, 2], (1, 3) = e[1, 3], (2, 1) = e[2, 1], (2, 2) = e[2, 2], (2, 3) = e[2, 3], (3, 1) = e[3, 1], (3, 2) = e[3, 2], (3, 3) = e[3, 3]})

(4)

Physics:-Define(E[i, j])

{gamma[mu], E[i, j], sigma[mu], Physics:-d_[mu], Physics:-g_[mu, nu], delta[mu, nu], epsilon[alpha, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(5)

Physics:-TensorArray(%)

{E[i, j], Array(1..3, 1..3, 1..3, {(1, 1, 1) = 0, (1, 1, 2) = 0, (1, 1, 3) = 0, (1, 2, 1) = 0, (1, 2, 2) = 0, (1, 2, 3) = 0, (1, 3, 1) = 0, (1, 3, 2) = 0, (1, 3, 3) = 0, (2, 1, 1) = 0, (2, 1, 2) = 0, (2, 1, 3) = 0, (2, 2, 1) = 0, (2, 2, 2) = 0, (2, 2, 3) = 0, (2, 3, 1) = 1, (2, 3, 2) = 1, (2, 3, 3) = 1, (3, 1, 1) = 0, (3, 1, 2) = 0, (3, 1, 3) = 0, (3, 2, 1) = -1, (3, 2, 2) = -1, (3, 2, 3) = -1, (3, 3, 1) = 0, (3, 3, 2) = 0, (3, 3, 3) = 0}), Array(1..3, {(1) = x__1, (2) = x__2, (3) = x__3}), Array(1..3, {(1) = Physics:-Psigma[1], (2) = Physics:-Psigma[2], (3) = Physics:-Psigma[3]}), Array(1..3, {(1) = Physics:-d_[1], (2) = Physics:-d_[2], (3) = Physics:-d_[3]}), Array(1..3, {(1) = Physics:-Dgamma[1], (2) = Physics:-Dgamma[2], (3) = Physics:-Dgamma[3]}), Matrix(3, 3, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 1, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1}), Matrix(3, 3, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 1, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1})}

(6)

``

Physics:-Setup(dimension)

[dimension = 3]

(7)

NULL

Physics:-Define(E[i, j], query)

[E, [0, 0, 0], 0]

(8)

DifferentialGeometry:-DGsetup([y__1, y__2, y__3], M):

Phi1 := DifferentialGeometry:-Transformation(N, M, [y__1 = Physics:-`*`(Physics:-`^`(sqrt(6), -1), x__1)+Physics:-`*`(Physics:-`*`(2, Physics:-`^`(sqrt(6), -1)), x__2)+Physics:-`*`(Physics:-`^`(sqrt(6), -1), x__3), y__2 = Physics:-`*`(Physics:-`^`(sqrt(2), -1), x__1)-Physics:-`*`(Physics:-`^`(sqrt(3), -1), x__2)+Physics:-`*`(Physics:-`^`(sqrt(3), -1), x__3), y__3 = Physics:-`*`(Physics:-`^`(sqrt(2), -1), x__1)-Physics:-`*`(Physics:-`^`(sqrt(2), -1), x__3)]):

NULL

 

Download 1.mw

Hello. I am engaged in independent study of tensor calculus (in the annex to the theory of elasticity) and package Maple. Currently engaged in the action of a solution of the normal point force on elastic half-space (Boussinesq problem, for example, see http://solidmechanics.org/Text/Chapter5_4/Chapter5_4.php#Sect5_4_4). The point is this: you need to create a vector displacement field U, differentiate and create a strain tensor, and then using Hooke's law to obtain the stress tensor. Actually only started to understand and immediately raised the question. Creating vector displacement field using the VectorField package VectorCalculus or any team or package DifferentialGeometry Physic? How then create a tensor with components equal to the partial derivatives of the displacement vector? My attempts Boussinesq_problem.mw. Thanks for your help.

1 2 3 Page 3 of 3