[Users] About the thorn Einstein exact
Ian Hinder
ian.hinder at aei.mpg.de
Thu Nov 9 04:32:27 CST 2017
On 7 Nov 2017, at 17:37, Nisa Amir <nisaamir at math.qau.edu.pk> wrote:
> I am just trying to add this spacetime, I dont want to use it in some other thorns of the toolkit. and I am not familiar with xAct package.
Hi,
The below patch modifies EinsteinExact so that it is able to generate thorns from metrics which are in spherical polar coordinates. It achieves this by mapping the polar coordinate r,th,ph to the CartGrid3D x,y,z required by ADMBase. You can use this to generate the existing Schwarzschild metric from the Metrics package. Note that this means that your x, y, z coordinates in the simulation are really r, th and ph, and that much of the rest of the toolkit will not know how to deal with this, but if you really don't want to use any other thorns, then that shouldn't be a problem.
diff --git a/m/EinsteinExact.m b/m/EinsteinExact.m
index 80eaff2..93b7fff 100644
--- a/m/EinsteinExact.m
+++ b/m/EinsteinExact.m
@@ -247,11 +247,12 @@ idThorn[spacetime_, thorn_] :=
Print["Generating thorn ", thorn, " for ", spacetime, " spacetime."];
(* Load the spacetime: coordinates, metric, inverse metric *)
- coordRule = {t -> T, x -> X, y -> Y, z -> Z, None -> {}};
+ coordRule = {t -> T, x -> X, y -> Y, z -> Z, None -> {},
+ r -> X, \[Theta] -> Y, \[Phi] -> Z};
coords = MetricProperty[spacetime, "Coordinates"] /. coordRule;
If[coords =!= {T, X, Y, Z},
- Throw["Error, only metrics in Cartesian coordinates are supported"];
+ Throw["Error, only metrics in Cartesian or spherical polar coordinates are supported"];
];
spatialCoords = coords[[2;;]];
@@ -456,7 +457,8 @@ g_{ab} =
StringForm[doctext]
]
-spacetimes = {"GaugeWave", "KerrSchild", "Minkowski", "ShiftedGaugeWave", "Vaidya", "ModifiedSchwarzschildBL"};
+(* spacetimes = {"GaugeWave", "KerrSchild", "Minkowski", "ShiftedGaugeWave", "Vaidya", "ModifiedSchwarzschildBL"}; *)
+spacetimes = {"Schwarzschild"};
thornNameRules = {"Vaidya" -> "Vaidya2"};
thorns = spacetimes /. thornNameRules;
--
Ian Hinder
http://members.aei.mpg.de/ianhin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/users/attachments/20171109/b0746579/attachment.html
More information about the Users
mailing list