ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 09 May 2023 19:51:27 +0200Problem with Geodesic Plottinghttps://ask.sagemath.org/question/68301/problem-with-geodesic-plotting/ The output of all this for me was an x-y plot with a p_0, but no curve. I'm noticing that there is a message at the bottom that maybe implies that ymax and xmax were forced to be 0. Does this have anything to do with why there is no curve visible?
%display latex
M = Manifold(3, 'M', structure='Lorentzian')
X.<t,x,y> = M.chart(r't:(-oo,+oo) x:(-oo,+oo) y:(-oo,+oo)')
X
R2 = Manifold(2, 'R^2', latex_name=r'\mathbb{R}^2')
X2.<x,y> = R2.chart()
to_R2 = M.diff_map(R2, {(X, X2): [x,y]})
to_R2.display()
r=sqrt((x-3*t)^2+y^2)
f=(tanh(r+4)-tanh(r-4))/(2*tanh(4))
g = M.metric()
g[0,0] = (9*f^2-1)
g[0,1] = -3*f
g[1,1] = 1
g[2,2] = 1
g.display()
p0 = M.point((0,0,0), name='p_0')
v0 = M.tangent_space(p0)((1.25, 5, 0), name='v_0')
v0.display()
s = var('s')
geod = M.integrated_geodesic(g, (s, 0, 5), v0); geod
sol = geod.solve()
interp = geod.interpolate()
graph = geod.plot_integrated(chart=X2, mapping=to_R2, plot_points=10,
thickness=2, label_axes=False)
graph += p0.plot(chart=X2, mapping=to_R2, size=4)
show(graph)
Integrated geodesic in the 3-dimensional Lorentzian manifold M
lsoda-- at t (=r1), too much accuracy requested
for precision of machine.. see tolsf (=r2)
in above, r1 = 0.5000000000000D-01 r2 = NaN
verbose 0 (2201: graphics.py, get_minmax_data) xmin was NaN (setting to 0)
verbose 0 (2201: graphics.py, get_minmax_data) xmax was NaN (setting to 0)
verbose 0 (2201: graphics.py, get_minmax_data) ymin was NaN (setting to 0)
verbose 0 (2201: graphics.py, get_minmax_data) ymax was NaN (setting to 0)
Launched png viewer for Graphics object consisting of 3 graphics primitivesJack ZuffanteTue, 09 May 2023 19:51:27 +0200https://ask.sagemath.org/question/68301/Simplifying when solving Einstein equationhttps://ask.sagemath.org/question/55475/simplifying-when-solving-einstein-equation/ Hello
I'm solving Einstein equation in vacuum. I already computed the Ricci tensor. For example, de first Ricci component is saved in the following variable eq1:
eq1=EE[0,0]
The denominator of the component should vanish since since the other part of the equation is zero. How can I extract numerator of the expression. I have tried:
eq1.denominator()
But it does not work.ThanksOmar MedbauWed, 27 Jan 2021 18:37:30 +0100https://ask.sagemath.org/question/55475/Extracting numerator of a Ricci tensor componenthttps://ask.sagemath.org/question/55479/extracting-numerator-of-a-ricci-tensor-component/ Hello
I'm solving Einstein equation in vacuum. I already computed the Ricci tensor. For example, de first Ricci component is saved in the following variable eq1:
eq1=EE[0,0]
The denominator of the component should vanish since since the other part of the equation is zero. How can I extract numerator of the expression. I have tried:
eq1.denominator()
But it does not work. Thanks
Omar MedbauWed, 27 Jan 2021 18:48:55 +0100https://ask.sagemath.org/question/55479/abstract index notation and differential geometryhttps://ask.sagemath.org/question/51632/abstract-index-notation-and-differential-geometry/I am wondering if there are ways to use abstract index notation in sage. For example, could I define the tensor:
$$C^c_{ab}=\frac{1}{2}g^{cd}(\tilde{\nabla_a} g_{bd}+\tilde{\nabla_b} g_{ad} - \tilde{\nabla_d} g_{ab})$$
this particular object describes the difference between two connections, $\nabla_a$ and $\tilde{\nabla}_b$. Can we define objects like this an manipulate them in Sage? My confusion comes from the common definition of the connection, a la
nabla = g.connection()
Which is not directly a 1-tensor. Specifically, I would like to define a metric, $g_{ab}$, and a conformal transformation $\tilde{g_{ab}}=\Omega^2 g_{ab}$, the corresponding connections, and determine the tensor $C^a_{bc}$ for this particular case. (and of course, we know the answer because this the standard approach to conformal transformations in GR).
cdustonFri, 29 May 2020 19:40:41 +0200https://ask.sagemath.org/question/51632/cosmological spacetimeshttps://ask.sagemath.org/question/47496/cosmological-spacetimes/ Hi,
I need an example on how to perform the Einstein Field Equations for a universe which is anisotropic and where the clustering of masses are aligned to an arbitrary axis (axial pole).
Just like the example given for Friedmann equations in the sagemanifolds examples website.
ThanksvickFri, 16 Aug 2019 09:29:54 +0200https://ask.sagemath.org/question/47496/Source for Principal Null Directions Kerr, Example Worksheethttps://ask.sagemath.org/question/47468/source-for-principal-null-directions-kerr-example-worksheet/ In the Worksheet "Walker-Penrose Killing tensor in Kerr spacetime" of the SageManifolds project, the sheet gives the principal null directions for Kerr spacetime in Boyer-Lindquist coordinates. I have difficulties verifying (with Mathematica) that this is indeed the case and would appreciate a source. horropieTue, 13 Aug 2019 14:43:40 +0200https://ask.sagemath.org/question/47468/Sagemanifold - Connection components from a tensor (not a metric)https://ask.sagemath.org/question/44572/sagemanifold-connection-components-from-a-tensor-not-a-metric/ Dear community.
This might sound *dump*, but I'm trying to determine whether a tensor satisfy the properties of a metric (under certain conditions). Of course it is a (0,2)-symmetric tensor, call it $S$, but I cannot (to my understanding) calculate the (Levi-Civita-like) connection components that would be associated to $S$... unless I declare it as a metric.
The way it is implemented makes sense... and it's solid!
## What I did...?
I defined like a metric and calculate the associated connection (and curvatures)
## Why should I do something else?
In the file `src/sage/manifolds/differentiable/metric.py` the metric is defined (as it should) to be symmetric, but it does not allow to consider extensions of General Relativity like say Einstein--Strauss model. Thus, I need an instance to calculate the *derived quantities* of a tensor that is a generalization of a metric.
### Question:
**Is this possible?**DoxTue, 04 Dec 2018 09:18:37 +0100https://ask.sagemath.org/question/44572/how to define the codomain of a symbolic functionhttps://ask.sagemath.org/question/40363/how-to-define-the-codomain-of-a-symbolic-function/Hi,
I'm perfoming some basic differential calculations in General Relativity.
I created a function a(t), where t is one of the chart coordinates:
> a = function('a')(t)
I do not want to define how it depends on t since I'm calculating stuff like Cristoffel symbols, Einstein equations, etc and I want to keep the resulting formulas independent from the functional behaviour of a(t).
This function appears to be a complex one (i.e. I see the bar over it sometimes - complex conjugate).
This is boring since the calculations does not simplify by themselves.
Is there a way to "assume" that the codomain of the function are the Real Numbers? It would be great also to specify only a range, like (0,+\infty).
ThanksscollovatiFri, 29 Dec 2017 23:15:57 +0100https://ask.sagemath.org/question/40363/