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

is tr(A) in dev(A) mathematically appropriate?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 26, 2020, 13:21
Question is tr(A) in dev(A) mathematically appropriate?
  #1
Member
 
Rishikesh
Join Date: Apr 2016
Posts: 63
Rep Power: 10
mrishi is on a distinguished road
My question is, is it accurate to use Subtracting 1/3 * trace(A)*I from matrix A, and call it deviatoric part of the matrix?


The solution to UEqn.H leads to turbulence->divDevRhoReff (or divDevReff depending on solver). Here, the deviatoric part of stress tensor is calculated using the dev() or dev2() operators on gradU. These are defined in OpenFOAM/primitives/TensorI.H where it makes use of trace.

Code:
//- Return the deviatoric part of a tensor

template<class Cmpt>
inline Tensor<Cmpt> dev(const Tensor<Cmpt>& t)
{
    return t - SphericalTensor<Cmpt>::oneThirdI*tr(t);
}


//- Return the deviatoric part of a tensor
template<class Cmpt>
inline Tensor<Cmpt> dev2(const Tensor<Cmpt>& t)
{
    return t - SphericalTensor<Cmpt>::twoThirdsI*tr(t);
}
If I understand correctly, the definition for i,j th element of deviatoric matrix should be \partial_{i}u_{j} - \delta_{ij}\partial_{i}u_{i}. (I know technically there is another term, namely \partial_j u_i which comes from gradU vs Transpose(gradU) but it gets absorbed as laplacian and we are considering the Transpose(gradU) as matrix A here.)

However, since there is a divergence operator subsequent to all of this, the final result, after summation over indices, becomes equivalent to 1/3*tr(gradU). But is it mathematically correct to have the definition of diagonal matrix as 1/3*trace(A)*I?


Or in a simpler question of equivalence

Is the matrix
1 0 0
0 5 0
0 0 6

equivalent to
4 0 0
0 4 0
0 0 4



I would really appreciate if someone with mathematical, or openfoam knowledge can help me understand this.
mrishi is offline   Reply With Quote

Reply

Tags
divdevreff, trace, ueqn


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference Between CFD Simulation and Mathematically Calculated Porous Media Results trhn Main CFD Forum 0 June 21, 2019 05:12
Is a single layer sigma-coordinate equation, mathematically equivalent to 2D-SWE? nima_jedari_attari_1987 Main CFD Forum 0 August 13, 2015 23:10
Mathematically tie two blades together SSP221 ANSYS 0 November 5, 2012 21:49
Sequential calculation of Temperature and mass tra J.W.Ryu FLUENT 7 June 18, 2002 08:12


All times are GMT -4. The time now is 15:57.