Skip to content

Output of the root-mean-square(rms) velocity in the example of channel3D

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics Output of the root-mean-square(rms) velocity in the example of channel3D

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #5663
    yx19971028
    Participant

    Dear everyone,

    I found comments that
    // Averages a functor value about a timespan and gives back the averaged value(TA)
    // and in 3*Dim the root mean square value(RMS) of the functorvalue in Dim in the operator
    // TA = SUM(functorvalue(iT)/SUM(iT))
    // RMS = SQRT( SUM( (functorvalue(iT) – TA)^2 / SUM(iT) ) ) on the function in the website
    in the website about the superLatticeTimeAveraged3D.h.
    I want to ask how to get the root-mean-square(rms) velocity in the example of channel3D.

    Regards,
    Xu Yang.

    #5681
    Marc
    Participant

    Dear Xu Yang,

    just check the last three entries of the SuperLatticeTimeAveragedF3D in Paraview, should be your RMS Velocity:

    for (int iDim = _sData.getDataSize(); iDim < _sData.getDataSize()*2; iDim++)
    if (_sDataP2.get(iCloc,input[1],input[2],input[3],(int) iDim-_sDataP2.getDataSize())/_ensembles – _sData.get(iCloc,input[1],input[2],input[3],(int) iDim-_sDataP2.getDataSize())*_sData.get(iCloc,input[1],input[2],input[3],(int) iDim-_sDataP2.getDataSize())/_ensembles/_ensembles<0) {
    output[iDim]=0;
    }
    else {
    output[iDim] = sqrt(_sDataP2.get(iCloc,input[1],input[2],input[3],(int) iDim-_sDataP2.getDataSize())/_ensembles – _sData.get(iCloc,input[1],input[2],input[3],(int) iDim-_sDataP2.getDataSize())*_sData.get(iCloc,input[1],input[2],input[3],(int) iDim-_sDataP2.getDataSize())/_ensembles/_ensembles);
    }

    Best,
    Marc

    • This reply was modified 2 years, 11 months ago by Marc.
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.