Curl of a vector field in the zhat direction

29 views
Skip to first unread message

amélie ch

unread,
Nov 17, 2025, 11:11:00 AMNov 17
to Dedalus Users
Hi all, 

I'm working on a 2D shallow water mhd simulation and I was wondering if there was any way in Dedalus that I could define the substitution (or something of the form):
B = 1/h * curl(A zhat) where B=B(x,y,t) is a vector field, h=h(x,y,t) is a field, A=A(x,y,t) is a field and zhat is the z unit vector.  This is how I want to implement it into my equations (see attachment below).

Thanks, 

Amélie


swmhd_code.png

Daniel Lecoanet

unread,
Nov 17, 2025, 12:29:24 PMNov 17
to Dedalus Users
Hi Amelie,

I believe you want to use -d3.skew(d3.grad(A)). But you should check the sign.

Daniel

--
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/f9e5ed12-5bb9-4d36-98e4-5ac0b666c751n%40googlegroups.com.
<swmhd_code.png>

Reply all
Reply to author
Forward
0 new messages