Implementation of flux continuity across interface in NVIDIA Modulus

I am working on a physics problem which involves diffusive fluxes. At a certain location of defined geometry, flux continuity across interface must be imposed, i.e. the diffusive fluxes at the right and the left of interface must be the same. Following figure illustrates the problem that I am trying to handle.

image

I tried using the parameterization option in PointwiseBoundaryConstraint() to specify the location of interface. But this option cannot be used for equating fluxes at two sides of an interface. Is there an elegant way to implement this constraint in Modulus?

Hi @shubhamsp2195

Is this interface aligned along an axis (say the normal of this interface is the x-axis as in the picture). Then does it make sense to impose u__x__x = 0 so pointwise the gradient of u_x is zero in the interface normal direction? Alternatively could you consider using a integral constraint to represent continuity here (we use this in incompressible problems)?

Otherwise I think you would have to create a custom constraint to impose points on the left side of the line are equal to the right. This should not be too difficult, in fact we had tried something like that in the past. But go with the second-order gradient first if possible.

Hi @ngeneva
My problem domain involves arbitrarily aligned interfaces. So I may need to specify a custom constraint. Thank you for suggesting possible solutions to my query.