- **OpenFOAM Post-Processing**
(*https://www.cfd-online.com/Forums/openfoam-post-processing/*)

- - **TurbForce term in liftDrag utility**
(*https://www.cfd-online.com/Forums/openfoam-post-processing/61453-turbforce-term-liftdrag-utility.html*)

Hello
I have a question on Hello
I have a question on the turbForce term in the liftDrag.C (../src/postprocessing/incompressible/liftDrag/liftDrag.C ). Laminar Flow -------------- In the laminar case the drag is the pressure drag + x_component of the wall shear stress . although i am not an expert in C++ , i could make out that -mu.value()*U.boundaryField()[patchLabel].snGrad()*mesh.magSf().boundaryField()[ patchLabel] is approximately meu*velocityGradient*area . Am i correct ? 2. turbulent drag -------------------- In turbulent flow the wall shear stress is (according to ferziger and peric) rho*(u_tau)^2. which equals rho*(C_meu)^0.25*k*sqrt(k)*vel_parallel_wall/(ln(n+E)) But the formulation given in liftDrag.C is totally different . first the laminar drag is found out ( even in turbulent case ) . then the turbulent drag is found ( this does not at all resemble the expression given by say ferziger , peric). then these 2 are added. could someone tell me why this procedure is adopted and where i am wrong ? i am stuck with my comparison. thanks a lot kumar |

Hello all,
Could someone coHello all,
Could someone comment on this post ? i am stuck with my results thanks in advance kumar |

Hi kumar,
I'm very sorry thHi kumar,
I'm very sorry that I can't help you, but maybe you can answer some of my questions? - where do I get the mu field from? - how do I have to change the code for a compressible fluid? - where do I have to write the code? - how can I actually use it? - where do I find the results thanks Anja |

Hi Kumar,
the difference beHi Kumar,
the difference between laminar and turbulent navier-stokes equations are the reynolds-stresses. So you can simply take the laminar forces and add the forces due to the reynolds-stresses. laminar: mu.value()*U.boundaryField()[patchLabel].snGrad()* mesh.magSf().boundaryField()[patchLabel] means: viscosity * velocity gradient normal to surface * area turbulent: - mesh.Sf().boundaryField()[patchLabel] & turbulence->R()().boundaryField()[patchLabel] means: surface vector(length equal to area) &(dot-product) reynolds stress tensor the calculation is general, given a stress tensor which is calculated from your choice of turbulence model regards markus |

Hi Anja,
Let me try to answHi Anja,
Let me try to answer your questions . 1. mu field ------------- the liftDrag utility uses nu ( mu/density ). this is set in the transportProperties in your case directory. 2. Compressible fluid since liftDrag utitlity uses nu , you may have to modify the utility itself. 3. writing the code. The liftDrag.C ( & associated codes ) code resides in /OpenFoam-1.2/application/utilities/postProcessing/miscellaneous/liftDrag/ . This program while executing calls another program also called liftDrag.C ( & associated programs ) in ../src/postProcessing/incompressible/liftDrag/ the liftDrag.C in /miscellaneous/../ calls createNu.H . createNu.H then opens transportProperties file ( this resides in the case directory )gets nu ( mu/rho ) . You can give a different nu by either modifying the transportProperties file . however you can also modify the later part of createNu.H to say for example read a certain different value , but here again , we are still talking about nu ( NOT mu) to modify the code . copy the code to your /applications directory and follow the instructions in user manual . also refer other wonderful posts ( search with liftDrag in openFoam ) Once you compile your program you are ready to go! hope this helps regards kumar |

Hi Markus
Thanks a lot for Hi Markus
Thanks a lot for your reply. i hope i can trouble you with one more question. In the case of ke models the reynolds shear stress are not calculated . this means that the wall shear stress given in liftDrag utility is an approximate formulation because in the turbulent case - while using ke model - the wall shear stress is (according to ferziger and peric) rho*(u_tau)^2. which equals rho*(C_meu)^0.25*k*sqrt(k)*vel_parallel_wall/(ln(n+E)) , but the utility does not calculate this and approximates with the laminar formulation. Am i correct ? regards kumar |

Hi Kumar,
if you look for tHi Kumar,
if you look for the k-eps model in src/turbulenceModels/incompressible/kEpsilon the reynolds stresses are calculated according to the boussinesq approximation common to all k-eps models. ((2.0/3.0)*I)*k_ - nut_*2*symm(fvc::grad(U_)) the turbulence viscosity nut is calculated like nut_ = Cmu*sqr(k_)/(epsilon_ + epsilonSmall_) with standard wall function approach to get the wall values for nut (wallViscosityI.H) with yPlusLam = 11.63 if (yPlus > yPlusLam_) { nutw[facei] = nuw[facei] *(yPlus*kappa_/log(E_*yPlus) - 1); } else { nutw[facei] = 0.0; } regards markus and pierre |

Hi Markus & Pierre
Thanks aHi Markus & Pierre
Thanks a lot for the replies regards kumar |

Hi all,
also thanks from my sHi all,
also thanks from my side. Anja |

Hi, I want to implement the viHi, I want to implement the viscous dissipation rate in my application. the term which im hopeing to get implemented is 1/2*1/Cp*(R()() & R ()())
on acount that R()() = tau/rho. However the implementation of the dot product of R()() is not accepted. Does anyone know how to do this? Thanks /erik |

Hi to everybody, does anybody know where this equation
nuw[facei] *(yPlus*kappa_/log(E_*yPlus) - 1); is coming from?? Thanks in advance |

Quote:
Thanks again ;) |

All times are GMT -4. The time now is 13:24. |