Parameter Calculation and saving 2D slice

Hello,

I am a new user of channelflow and I would like to thank the members of the developing team for making this code available with MPI.

I had a couple of small queries:

  1. Calculation of wall shear - In the code for calculation of wall shear (in diffops.cpp) the value of the viscosity of the fluid is not taken into account. Is this deliberately left out ?

  2. Saving of a slice - In the code for saving a slice (flowfield.cpp ; saveslice) it says that the function is not MPI safe. I was wondering if you had any other functions for saving only the velocity field on a 2D plane ? Preferably in a binary format (flowfield.cpp ; saveslice is in ascii) ?

Thank You,

Regards,

Pavan

Hi Pavan,

thanks for using Channelflow!!! About your questions:

  1. The wall shear, like all quantities in Channelflow, is non-dimensional. The nondimensionalization is pretty standard. Half-gap width of the channel is H, wall or centerline velocity is U. Together with viscosity nu, they form Re=UH/nu. This makes the wall shear of e.g. laminar PCF equal to 1. Check Gibson et al. 2008 as a reference for this.
    Due to the nondimensionalization, there must not be a viscosity in the code. The fact that there is a viscosity in some places in the code, is because we use “nu” as an alias for 1/Re. That is probably equally convenient as it is confusing. Once you get used to it, you appreciate the convenience of this.

  2. We are very sorry but there is no slice saving with MPI yet. We understand the convenience of such a feature for some applications and it is a feature we have on our list of upcoming development.

I hope this helps a bit. All the best,
Florian

Hello Florian,

Thank you for the clarifications.

The ability to save a slice would have been very helpful indeed. I was working on trying to write a small function to do the same and was testing it. My tests have shown that the code I have written works correctly. It can save a slice(XZ plane) at any Y-coordinate which is given as user input in terms of the factor of the height i.e 0.5 is the mid plane. The only drawback of my code is that it uses the FlowField class with only 1 Y-coordinate. Thus, the Y-coordinate value is calculated as NaN because channelflow will see it as cos(inf). But this has no bearing on the data stored apart from the fact that it cannot be loaded directly onto Paraview for visualization. Matlab/Python can easily read the data.

I am posting it here as I hope that it may help others as well. Since only images can be attached, I am posting the code in 2 parts. I incorporated this as part of the simulateflow.cpp propgram.

I hope this helps and I look forward to your comments.

Thank you,

Regards,

Pavan