Dear all,
I’m trying to solve the Reynolds-Averaged Navier Stokes (RANS) equations in a channel with periodic hills (see Figure below).
The hill geometry is defined by a third order polynomial, here assumed to be computed in the function shape_hill(x). Is it possible to use the present symbolic function shape_hill(x) to define the parameters domains ?
# Parameters
@parameters x, y
@variables u(..), v(..), uu(..), uv(..), vv(..), p(..)
rho = 1.2
nu = 0.000015
# 2D RANS Partial Differential Equations
Dx = Differential(x)
Dxx = Differential(x)^2
Dy = Differential(y)
Dyy = Differential(y)^2
eqs = [u(x,y)*Dx(u(x,y)) + v(x,y)*Dy(u(x,y)) + (1/rho)*Dx(p(x,y)) - nu*(Dxx(u(x,y)) + Dyy(u(x,y))) + Dx(uu(x,y)) + Dy(uv(x,y)) ~ 0. ,
u(x,y)*Dx(v(x,y)) + v(x,y)*Dy(v(x,y)) + (1/rho)*Dy(p(x,y)) - nu*(Dxx(v(x,y)) + Dyy(v(x,y))) + Dx(uv(x,y)) + Dy(vv(x,y)) ~ 0. ,
Dx(u(x,y)) + Dy(v(x,y)) ~ 0.0]
function shape_hill(x)
...
end
domains = [x ∈ [0.,9.], y ∈ [shape_hill(x),3.]]
If yes, could it also be used for the boundary conditions (e.g zero velocity on the ground) ?
Something like:
bcs = [u(x,shape_hill(x)) ~ 0., v(x,shape_hill(x)) ~ 0.]
When I tried to use shape_hill(x) for the domain definition I had the following error message TypeError: non-boolean (Num) used in boolean context.
Thanks in advance!