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

volTensorField

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 23, 2021, 10:53
Default volTensorField
  #1
Member
 
Join Date: Dec 2020
Posts: 38
Rep Power: 5
ulugbey is on a distinguished road
Hi,

I have the following code in OpenFoam:
Quote:
volTensorField tauMC("tauMC", (!inviscid)*turbulence->muEff()*dev2(fvc::grad(U)().T())); // Deviatoric Part of Stress Tensor
I can't understand how I should interpret this expression? Could you please explain the terms in this expression?

Best regards

Last edited by ulugbey; June 23, 2021 at 17:11.
ulugbey is offline   Reply With Quote

Old   June 24, 2021, 09:24
Default
  #2
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 734
Rep Power: 14
Tobermory will become famous soon enough
Okay, let's break it down. The main part of the line is:
Code:
volTensorField tauMC("tauMC", <expression>);
This is declaring a volTensorField object tauMC, and initialising it with its name and its contents, where the latter is calculated from the <expression>.

The <expression> is made up as follows: firstly, the deviatoric strain rate (see https://cpp.openfoam.org/v8/TensorI_8H_source.html)
Code:
dev2(fvc::grad(U)().T()))
multiplied by the effective (laminar + turbulent) viscosity
Code:
turbulence->muEff()
multiplied by an expression that is either zero if the flow is inviscid or 1 if the flow is not inviscid:
Code:
(!inviscid)
So overall, it calculates the shear stress, setting it to zero if the inviscid flag is set.
Tobermory is offline   Reply With Quote

Old   June 24, 2021, 15:43
Default
  #3
Member
 
Join Date: Dec 2020
Posts: 38
Rep Power: 5
ulugbey is on a distinguished road
Thanks a lot for the detailed explanation. I have now follow-up questions.


Where can I set muEff()?
What is the difference between nuEff() and muEff()?
Why does Temperature(T) appear in the following formulation of deviatoric strain rate?
Code:
dev2(fvc::grad(U)().T()))
Best regards
ulugbey is offline   Reply With Quote

Old   June 24, 2021, 18:56
Default
  #4
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 734
Rep Power: 14
Tobermory will become famous soon enough
Ok, you have a huge amount of reading to do, and to get anywhere with OpenFOAM you are going to have to learn to do your own research. Google is always useful, but also try and get to grips with the Doxygen pages, eg
https://cpp.openfoam.org/v8/. Search on there, and you will quickly find what muEff and nuEff are.

Tracking down the .T() will be more difficult, but I already gave you a link to the Tensor.H class ... maybe take a look in there?

I can easily answer your questions (time pernmitting) ... but it's a better strategy all round to help you answer your own questions, so take this as a challenge - any good luck my friend.
Tobermory is offline   Reply With Quote

Reply


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
--> FOAM FATAL ERROR:request for volTensorField sigmap caoxuxiang OpenFOAM Running, Solving & CFD 2 November 16, 2018 01:12
create volTensorField in rhoCentralFoam SKLee OpenFOAM Running, Solving & CFD 1 December 30, 2012 04:36
inversion of volTensorField doesn't work Cyp OpenFOAM Programming & Development 2 January 19, 2012 03:42
flux limiter involving tensor : How to use fvc::flux() with volTensorField ? Cyp OpenFOAM Programming & Development 2 January 21, 2011 05:36
Transformation of volSymmTensorField to volTensorField svens OpenFOAM 2 November 19, 2009 06:47


All times are GMT -4. The time now is 21:22.