- **OpenFOAM Programming & Development**
(*https://www.cfd-online.com/Forums/openfoam-programming-development/*)

- - **curvature correction term, material derivative of a tensor**
(*https://www.cfd-online.com/Forums/openfoam-programming-development/74492-curvature-correction-term-material-derivative-tensor.html*)

curvature correction term, material derivative of a tensorHi,
I'm planning to implement a curvature correction term to an explicit algebraic reynolds stress model based on the existing k-e-model of Launder and Sharma in order to sensitize the Launder-Sharma-model to streamline curvature. The curvature correction term is to be implemented according to P.E. Smirnov and F.R. Menter "Sensitization of the SST Turbulence Model to Rotation and Curvature by Applying the Spalart-Shur Correction Term". I ran into problems quite fast. There is a term, which is the material derivative of the shear strain tensor. The implementation is not straight-forward, especially in tensor notation. Either one has somehow to implement a summing over all faces of a control volume or to evaluate the gradient of the shear strain tensor, which leads to a tensor of third order. And right now, I do not see a way to get rid of this problem. Does anyone has already tried to implement a curvature correction or has any experience on that? Or even know how to implement a material derivative of a tensor? I'm glad for any hint. Greets, volker |

I have try RC correction as you mentioned in ref paper. you can send me a mail. if interesting.
my email address: waynezw0618@163.com |

Gradient of a second order tensorI am attempting to add a term to a Reynolds stress transport model which involves taking the gradient of the Reynolds stress tensor, which should result in a tensor of rank three.
Even a simple attempt fails: Code:
`volTensorField test = fvc::grad(R);` Code:
`error: no type named ‘type’ in ‘class Foam::typeOfRank<double, 3>’` Any ideas or help would be appreciated! |

hi michael,
I had exactly the same problem, though I found it kind of surprising because OpenFOAM is supposed to handle tensors of rank three. But the gradient seems to be restricted to tensors of rank one. I hope that there might be a workaround. hope someone can help us. cheers, volker |

Hi Volker. I have discussed this problem with some of my colleagues here and we agree that this would be non-trivial to implement. I am going to try, and I'll keep you posted on my progress. Feel free to contact me through http://www.ecs.umass.edu/~mmartell if you'd like.
FYI, I have tried not assigning the gradient to a particular type by simple putting Code:
`fvc::grad(R);` Cheers, Mike |

would be great, if you would come up with something new.
keep me posted! |

hi michael,
did you manage to implement the gradient of a tensor? cheers, volker |

1 Attachment(s)
Hi Volker,
I managed to do what I needed "by hand" but it is sloppy and not generic. I'll attach the source for it. It has no external dependencies (you can ignore the inclusion of OEC.H) and it doesn't need to be cast in the incompressible or RASModels name space - I simply took it right from my existing code. In my case, I needed something like fvc::grad(kINT) & fvc::grad(RINT) with kINT being a volScalarField and RINT being a volSymmTensorField. Note that this inner product (of grad(kINT), a vector, and grad(RINT), a rank 3 tensor) results in a rank 2 symmetric tensor. I know this isn't exactly what you were looking for, but the structure is there. Let me know if you need any help :) Mike |

All times are GMT -4. The time now is 00:55. |