Hello Dear all,

Inspired by Arjen Markus’ talk at FortranCon 2020, I created a library named flop for describing partial differential equations, especially incompressible Navier-Stokes equation using user-defined operators. (README and all comments are still in Japanese)

The library consists of unary/binary operators and classes for extending the behavior of the operators. A solving procedure using the Fractional Step method for a well-known two-dimensional lid-driven cavity flow can be described as follows:

```
! solving top lid driven cavity flow
u = .init.(u .on. grid)
p = .init.(p .on. grid)
BC_u = BC_u .set. (Dirichlet([ 0d0, 0d0]) .on. B1) &
.set. (Dirichlet([ 0d0, 0d0]) .on. B2) &
.set. (Dirichlet([ 0d0, 0d0]) .on. B3) &
.set. (Dirichlet([U_wall, 0d0]) .on. B4)
BC_p = BC_p .set. (Neumann(0d0) .on. B1) &
.set. (Neumann(0d0) .on. B2) &
.set. (Neumann(0d0) .on. B3) &
.set. (Neumann(0d0) .on. B4)
do n = 1, Nt
u_aux = (u + dt*(-(.l.(u.dot.nabla).r.u) + kvisc*.laplacian.u)) &
.impose. BC_u
! (.l.(u.dot.nabla).r.u) can be rewritten in (.div. (u .times. u))
p = .inverse.(( &
(laplacian(p).with.BC_p) .results. (dens/dt*.div.u_aux)) &
.until. below_criterion &
)
u = (u_aux - dt/dens*.grad.p) .impose. BC_u
end do
```

(I’m embarrassed if I made a mistake in choosing verbs, prepositions, etc.)

I feel that the flexible definition of user-defined operators is one of the advantages of Fortran, and it may be better to use operators more to hide gruesome details of numerical methods and promote their effectiveness.

As Arjen Markus presented, I think that some contributions to user-defined operators have been made. If anyone has more information, good practices, or tips for performance improvement, I would be grateful if you could let me know.

Thanks.