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

#5497
jonathan
Participant

Hi Junwei,

@1.d.: Record a ParaView Python macro for the output, clean it up and it won’t be inconvenient for further usage.
This would be the fast, but dirty solution.

I usually avoid AnalyticalFfromSuperF3D when outputting discrete fields if I don’t need the interpolation.
I’m not aware of a standalone class for your purpose, but a long-term solution would be writing your output interface manually.

These are the relevant function calls I would use in a 1D scenario:

T minX = superGeometry.getStatistics().getMinPhysR(2)[0];
T maxX = superGeometry.getStatistics().getMaxPhysR(2)[0];
for(T iX = minX; iX < (maxX + converter.getPhysDeltaX()*0.5); iX+=converter.getPhysDeltaX()){
	T pos_tmp[3] = {iX, somey, somez};
	superGeometry.getCuboidGeometry().getLatticeR(latticeR, pos_tmp); //get lattice coordinates for wss output
	superGeometry.getCuboidGeometry().getPhysR(pos_tmp, latticeR); //convert lattice coordinates into physical coordinates
	WSS(output,latticeR);
        //write output and pos_tmp to disk with fstream...
} 

Add a barrier and some reduceAndBcasts depending on your MPI usage via singleton::mpi()… (maybe thats whats causing 0 outside the plane?)

Best
Jonathan