Dear OpenLB users and developers,
I am performing simulations for external flows over an infinite wing.
After completing a stable simulation setup, I now want to obtain temporally averaged flow fields, particularly velocity fields.
The current case also uses a wall model, so I am referring to the “channel3d” case. However, the data are not contained in the output VTK files.
The relevant code lines are attached below.
using DESCRIPTOR = D3Q19<POROSITY,VELOCITY,TENSOR,AVERAGE_VELOCITY>;
.....
int iTstartAvg = converter.getLatticeTime( maxPhysT*0.4 );
if (iT == iTstartAvg) {
SuperLatticePhysVelocity3D<T,DESCRIPTOR> latticeVelocity(sLattice, converter);
sLattice.defineField<AVERAGE_VELOCITY>(superGeometry.getMaterialIndicator({1}), latticeVelocity);
}
if (iT < iTstartAvg) {
sLattice.setParameter<descriptors::LATTICE_TIME>(2);
}
else {
sLattice.setParameter<descriptors::LATTICE_TIME>(iT - iTstartAvg + 1);
}
SuperLatticePhysExternalVectorField3D<T,DESCRIPTOR,AVERAGE_VELOCITY> sAveragedVel(sLattice, converter.getConversionFactorVelocity(),"aVel");
vtmWriter.addFunctor( sAveragedVel );
......
If anyone can correct my mistakes or suggest some guidance, I would deeply appreciate it.
Sincerely,