Hi,
I’m working on an equation for a complex field A on the surface of a sphere, and I need to transform the operator \partial_x + i \partial_y to spherical coordinates. To do this, I tried defining the spherical coordinate derivative to get a transformation from the cartesian coordinates (also, pondered with some trigonometric functions of phi and theta) (also weighted with trigonometric functions of phi and theta for a consistent transformation) as follows:
dphi = lambda B: d3.Differentiate(B, coords_sph['phi'])
dtheta = lambda B: d3.Differentiate(B, coords_sph['theta'])
However, this approach raises the following error: NotImplementedError: No subclasses of <class 'dedalus.core.operators.Differentiate'> found for the supplied arguments: (<Field 5239994848>, <dedalus.core.coords.Coordinate object at 0x13862bd40>), {}
I also tried using components of a gradient as an alternative, with:
Comp1 = lambda B: d3.AngularComponent(d3.Gradient(B, coords))
Comp2 = lambda B: d3.AzimuthalComponent(d3.Gradient(B, coords))
But this resulted in: ValueError: Not supported
Here are my definitions for the basis and field A:
dealias = 3/2
stop_sim_time = 100
timestepper = d3.RK222
timestep = 2e-3
dtype = np.complex128
# Bases and domain
coords = d3.S2Coordinates('phi', 'theta')
dist = d3.Distributor(coords, dtype=dtype)
basis = d3.SphereBasis(coords, (Nphi, Ntheta), radius=R, dealias=dealias, dtype=dtype)
# Fields
A = dist.Field(name='A', bases=basis)
I would really appreciate any guidance on how to correctly implement these derivatives in spherical coordinates.
Thanks,
Martin RS
--
You received this message because you are subscribed to the Google Groups "Dedalus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dedalus-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dedalus-users/1afcf16a-06df-4420-9022-030fe5768102n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dedalus-users/CADZXxBhwTkCqysqfbuXt-AJz_81%2BHehastdzk8HumOn8HkOXGQ%40mail.gmail.com.