epfl-ecps / channelflow

Channelflow is a software system for numerical analysis of the incompressible fluid flow in channel geometries, written in C++ and MPI-parallelized.
GNU General Public License v2.0
65 stars 29 forks source link

allow different theta for wall motion and dP/ds, bulk vel #7

Open johnfgibson opened 5 years ago

johnfgibson commented 5 years ago

Is your feature request related to a problem? Please describe. We currently have one angle, theta, for changing the orientation of the wall velocity and imposed pressure gradient or bulk velocity relative to the computational box. However, there's no reason these shouldn't be independent.

Describe the solution you'd like I propose splitting -theta into -thetaWall and -thetaBulk, and applying them as follows in dnsflags.cpp

    ulowerwall = -Uwall_ * cos(thetaWall_);
    uupperwall = Uwall_ * cos(thetaWall_);
    wlowerwall = -Uwall_ * sin(thetaWall_);
    wupperwall = Uwall_ * sin(thetaWall_);
    Vsuck = Vsuck_;
    rotation = rotation_;
    dPdx = dPds_ * cos(thetaBulk_);
    dPdz = dPds_ * sin(thetaBulk_);
    Ubulk = Ubulk_ * cos(thetaBulk_);
    Wbulk = Ubulk_ * sin(thetaBulk_);

This issue came up as I started documenting the base/fluctuation decomposition in the channelflow-2 paper. I have a feeling that our nomenclature and input parameters have evolved organically from a simple unidirectional beginning, and will end up needing some revisions to really clarfiy the relation of the input parameters to the math.

Perhaps also we could allow for different frames of reference with respect to moving walls. I found myself wanting this for ASBL, to have a lower wall with speed 0 at y=0 and an upper wall with speed 1 at y=H. Granted this is transformation is pretty trivial, but I think it would still be nice for direct comparisons between near-wall dynamics between channel and ASBL.

Comments?

johnfgibson commented 5 years ago

It was complicated enough to figure out and implement the general laminar solution to arbitrary combinations of wall speeds, positions, suction velocity, pressure gradient and bulk constraint, assuming alignment of wall motion and pressure gradient (https://github.com/epfl-ecps/channelflow/pull/9). Adding this generalization might not be that much more complicated, but I think I'll let someone who needs it do it.