Skip to content

Reply To: SuperLatticePhysWallShearStress3D() returns norm of wall shear stress tensor

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics SuperLatticePhysWallShearStress3D() returns norm of wall shear stress tensor Reply To: SuperLatticePhysWallShearStress3D() returns norm of wall shear stress tensor

#5490
jonathan
Participant

Hi Junwei,

wall shear stress is calculated from the stress tensor taking the wall normal vector into account.
The “general-purpose” stress tensor can be accessed on block level with:

sLattice.getBlockLattice(iC).computeStress(x, y, z, pi);,
where pi is your tensor.
To my knowledge there’s no functor implemented for that.
For just having the tensor components exposed to your application, you can iterate over every BlockLattice and use the above expression.

If you plan on using it as a functor a good starting point would be the SuperLatticePhysWallShearStress3D functor. Just copy it and remove anything to do with the normal vector calculation in the constructor of BlockLatticePhysWallShearStress3D and output the stress tensor directly. You will also see the computeStress there. Lastly you have to increase your functors output dimension to 6.

https://www.openlb.net/DoxyGen/html/db/d6f/classolb_1_1BlockLatticePhysWallShearStress3D.html
Hope this helps!

Best,
Jonathan