CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

strainrate()

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   September 23, 2013, 04:18
Default strainrate()
  #1
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Torino, Italy
Posts: 675
Rep Power: 8
sharonyue is on a distinguished road
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_)));
}
Mathematically, it is\gamma  = \sqrt 2  \cdot \left| {\frac{1}{2}\left( {\nabla u + \nabla {u^T}} \right)} \right|

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.
sharonyue is offline   Reply With Quote

Old   September 24, 2013, 03:27
Default
  #2
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 178
Rep Power: 6
vonboett is on a distinguished road
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
vonboett is offline   Reply With Quote

Old   September 26, 2013, 03:41
Default
  #3
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Torino, Italy
Posts: 675
Rep Power: 8
sharonyue is on a distinguished road
Quote:
Originally Posted by vonboett View Post
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.
Sorry. Are you sure this is a scalar?
sharonyue is offline   Reply With Quote

Old   September 30, 2013, 09:35
Default
  #4
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 178
Rep Power: 6
vonboett is on a distinguished road
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.
vonboett is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Plotting strainRate Studi OpenFOAM Programming & Development 10 July 22, 2015 20:24
StrainRate definition 141 vs 15 floooo OpenFOAM Running, Solving & CFD 12 August 18, 2014 01:40


All times are GMT -4. The time now is 09:20.