|
[Sponsors] |
September 23, 2013, 04:18 |
strainrate()
|
#1 |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 840
Rep Power: 17 |
Hi guys,
This is a piece of code in viscosity.C Code:
Foam::tmp<Foam::volScalarField> Foam::viscosityModel::strainRate() const { return sqrt(2.0)*mag(symm(fvc::grad(U_))); } but how can I get the magnitude of a tensor? and why isn't this strainrate a tensor but a scalar? Shouldnt it be: Code:
Foam::tmp<Foam::volTensorField> Foam::viscosityModel::strainRate() const { return symm(fvc::grad(U_)); } Last edited by sharonyue; September 26, 2013 at 04:16. |
|
September 24, 2013, 03:27 |
|
#2 |
Senior Member
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 237
Rep Power: 16 |
mag(D) = sqrt(D_ij D_ij ) = norm of strain rate tensor in OpenFOAM, where D_ij = 1/2 ((grad(U)+grad(U)^T) = symm(grad(U)) = 2*DR and that is a scalar. There are several definitions of the norm, this is one wideley used to calculate a kind of "magnitude" of the tensors components
|
|
September 26, 2013, 03:41 |
|
#3 |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 840
Rep Power: 17 |
||
September 30, 2013, 09:35 |
|
#4 |
Senior Member
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 237
Rep Power: 16 |
Sorry, more precise: norm(D) = sqrt{trace(D^2)}, so if I am correct Dij above would be: Dij = 0.5*(du_i/dx_j + du_j/dx_i) + 0.5(du_i/dx_j - du_j/dx_i).
Please check if I messed with the indices, du_/dx_ stands for the corresponding derivative of the velocity. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
StrainRate definition 141 vs 15 | floooo | OpenFOAM Running, Solving & CFD | 19 | June 27, 2017 13:36 |
Plotting strainRate | Studi | OpenFOAM Programming & Development | 10 | July 22, 2015 20:24 |