Interpolating local velocity and local shear rate

Hi all,

I am running an application using Palabos where I solve for the velocity field using lattice boltzmann method, and use my velocity field as an input to another solver. For this purpose, I need to be able to interpolate between grids, and so I was wondering if Palabos has any inbuilt function to interpolate the local velocity and shear rate at a given point in space within the geometry.

TIA

2 Likes

Hello,

just to be sure I understand what you want to do correctly. You want to provide a set of points (on aribitrary positions) and interpolate any value on them? also what should be the order of the interpolation you need?

Thanks orestis for the reply. Yes, that is exactly what I am looking to do.
Any weighted linear interpolation technique should be good enough.

you are welcome.

in the file dataProcessors/dataAnalysisWrapper3D.h you will find a function named

std::vector<Array<T,3> > velocitySingleProbes (
        MultiBlockLattice3D<T,Descriptor>& lattice,
        std::vector<Array<T,3> > const& positions );

This function takes a vector of positions and returns a list of velocities at the given positions performing a trilinear interpolation. Would this be ok for you?

I guess you can inspire yourself by this function and add the shear rate too. Then do not forget to make a merge request and be a happy Palabos contributor :smiley:

If you need any further guidance do not hesitate to ask.

2 Likes

That is exactly the kind of thing I was looking for. Thanks a lot!

1 Like

Hi orestis,

Please find the link to the code that implements shear stress interpolation using the same interpolation scheme for velocitySingleProbes. Let me know what I have to do to contribute the same to the Palabos library.

Right now, this functional can be implemented simply by including shearStressWrapper3D.h in the main program, along with palabos3D.h

https://github.com/kaushikns/plb_shear.git

Nice!

To contribute first read the contributing instructions.

To summarize, here you should create a fork of Palabos, add your modifications to the relevant files (for example your wrappers should go in dataProcessors/dataAnalysisWrapper3D.h).

Then do a merge request.