[Users] GlobalDerivative in spherical (multipatch) coordinates

Peter Diener diener at cct.lsu.edu
Thu Mar 21 11:42:49 CDT 2019


Hi Severin,

The globalDiff_gv routine you refer to under the hood calculates the 
derivatives with respect to whatever coordinates the current patch 
system is using within the current patch and then uses the Jacobian 
(passed in) to convert to global (hence the name) cartesian derivatives.

The Thornburg04 coordinate system consists of cubical patch (patch 0) 
and 6 spherical patches surrounding it (patches 1 to 6)

For the spherical patches the radial coordinate is the 3rd coordinate, 
so in order to get just radial derivatives you can simply calculate the 
derivative with respect to the 3rd coordinate. You can either write that 
yourself or use the calc_dc function used internally in globalDiff_gv. 
Of course if you use a radial stretch you'll have to take that into 
account.

Or you can just use the Cartesian derivatives as given by globalDiff_gv 
and apply the inverse Jacobian to get the radial derivative back. This 
you'd have to do anyway if you need the radial derivative on the central 
cubical patch.

Cheers,

   Peter


On Thursday 2019-03-21 06:21, Severin Frank wrote:

>Date: Thu, 21 Mar 2019 06:21:06
>From: Severin Frank <severin.frank at uni-tuebingen.de>
>To: users at einsteintoolkit.org
>Subject: [Users] GlobalDerivative in spherical (multipatch) coordinates
>
> Dear all,
>
> I want to solve a spherical problem within a multi patch environment, 
> using Llama and the Thornburg04 coordinates.
>
> For my equations I need several 1st and 2nd spatial derivatives in r 
> direction. The GlobalDerivative thorn (part of Llama) provides a 
> subroutine, that calculates the derivatives for certain directions:
>
> SUBROUTINE globalDiff_gv ( CCTK_POINTER_TO_CONST IN cctkGH, \
>                            CCTK_INT IN dir, \
>                            CCTK_REAL IN ARRAY var, \
>                            CCTK_REAL OUT ARRAY dvar, \
>                            CCTK_REAL IN ARRAY J_dadx, \
>                            CCTK_REAL IN ARRAY J_dbdx, \
>                            CCTK_REAL IN ARRAY J_dcdx, \
>                            CCTK_REAL IN ARRAY J_dady, \
>                            CCTK_REAL IN ARRAY J_dbdy, \
>                            CCTK_REAL IN ARRAY J_dcdy, \
>                            CCTK_REAL IN ARRAY J_dadz, \
>                            CCTK_REAL IN ARRAY J_dbdz, \
>                            CCTK_REAL IN ARRAY J_dcdz, \
>                            CCTK_INT IN table_handle )
>
>
> However, as far as I could see in the src code this only works for 
> Cartesian coordinates or did I miss something?
>
> Does anyone know if there is a nice way to calculate such derivatives in 
> r direction?
>
> Thanks a lot and best regards,
>
> Severin Frank
>
> _______________________________________________
> Users mailing list
> Users at einsteintoolkit.org
> http://lists.einsteintoolkit.org/mailman/listinfo/users


More information about the Users mailing list