Solving Advection/Diffusion like equation on non-rectangular domain.

7 views
Skip to first unread message

Cyril Gadal

unread,
Jan 16, 2025, 12:53:55 PMJan 16
to claw-users
Dear all,

I am trying to solve the following equation:

 d_phi/d_t + nabla . (phi*vec{u}) -  d(Fphi*(1-phi))/d_z = nabla . (D grad{phi}),

where:

- phi is a scalar, vec{u} and vec{F}  are vector fields
- D and F are coefficients that can be taken constant, but that will probably become functions of phi but also x and z.

The domain is bounded by two parabolas  (red and brown) :
domain.png
 and the black lines represent streamlines of the advection field vec{u}.
The boundary conditions are non-flux through the boundaries.

Is ClawPack the right tool for this? I am especially interested in solving the equation from D = 0 (purely hyperbolic) to very large values of D.

Also, as the domain is not rectangular, I was planning on using a triangular mesh, but I could not find any mention of non-cartesian grids for ClawPack ?

Thanks a lot !

Kyle Mandli

unread,
Jan 17, 2025, 11:06:17 AMJan 17
to claw-...@googlegroups.com
Hi Cyril,

Clawpack can be used to solve advection-diffusion problems, usually by using operator splitting.  That being said, this is generally ok for small values of D but larger values you almost certainly would be better off using a finite difference approach like Crank-Nicholson.  On top of that, Clawpack only can do logically rectangular grids, not fully unstructured ones.  The domain you showed may be able to be mapped but it may produce a grid that is not ideal.

If you can get the domain to map, it may be worthwhile setting up the D=0 case in Clawpack and use a Crank-NIcholson or other, implicit method for the rest as a good comparison.

Kyle
On Jan 16, 2025 at 12:53 PM -0500, Cyril Gadal <cyril...@gmail.com>, wrote:
Dear all,

I am trying to solve the following equation:

 d_phi/d_t + nabla . (phi*vec{u}) -  d(Fphi*(1-phi))/d_z = nabla . (D grad{phi}),

where:

- phi is a scalar, vec{u} and vec{F}  are vector fields
- D and F are coefficients that can be taken constant, but that will probably become functions of phi but also x and z.

The domain is bounded by two parabolas  (red and brown) :
<domain.png>
 and the black lines represent streamlines of the advection field vec{u}.
The boundary conditions are non-flux through the boundaries.

Is ClawPack the right tool for this? I am especially interested in solving the equation from D = 0 (purely hyperbolic) to very large values of D.

Also, as the domain is not rectangular, I was planning on using a triangular mesh, but I could not find any mention of non-cartesian grids for ClawPack ?

Thanks a lot !

--
You received this message because you are subscribed to the Google Groups "claw-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to claw-users+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/claw-users/1405493f-6107-470d-9e27-b8baf334f0ben%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages