# strainrate()

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

 September 23, 2013, 04:18 strainrate() #1 Senior Member   Dongyue Li Join Date: Jun 2012 Location: Torino, Italy Posts: 675 Rep Power: 8 Hi guys, This is a piece of code in viscosity.C Code: Foam::tmp Foam::viscosityModel::strainRate() const { return sqrt(2.0)*mag(symm(fvc::grad(U_))); } Mathematically, it is 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::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: 178 Rep Power: 6 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: Torino, Italy
Posts: 675
Rep Power: 8
Quote:
 Originally Posted by vonboett 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?

 September 30, 2013, 09:35 #4 Senior Member   Albrecht vBoetticher Join Date: Aug 2010 Location: Zürich, Swizerland Posts: 178 Rep Power: 6 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.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

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

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