|
[Sponsors] |
April 10, 2016, 22:25 |
Add viscous stress term to sonicFoam
|
#1 |
Member
Hilbert
Join Date: Aug 2015
Location: Australia
Posts: 50
Rep Power: 11 |
Dear Foamers,
I am trying to add the viscous stress term to sonicFoam. Some people on this forum claimed that this has already been done. I have not been able to find it and therefore thought I would start a new thread. The term that needs to be added to the energy equation is div(tau,U). I have read on this forum that the stress tensor tau should be directly available in the form of 'DevRhoReff'. if I try to add the following term to the energy equation Code:
fvc::div(DevRhoReff,U) Code:
DevRhoReff was not declared in this scope If I work the stress term out for the energy equation I come to the following: Code:
-fvc::div((turbulence->muEff()*(fvc::grad(U)) + turbulence->muEff()*dev2(fvc::grad(U)().T()))& U) |
|
April 11, 2016, 07:13 |
|
#2 |
Senior Member
Hassan Kassem
Join Date: May 2010
Location: Germany
Posts: 242
Rep Power: 18 |
Hello,
This variable, DevRhoRef, isn't available in the solver scope but you can get it from the turbulence object as follows; Code:
turbulence->divDevRhoReff() For more details about the governing equations in OF, please check this post http://www.cfd-online.com/Forums/ope...tml#post555624. Also, you can check the source code here [LINK]. Bw, Hassan |
|
April 11, 2016, 21:15 |
|
#3 |
Member
Hilbert
Join Date: Aug 2015
Location: Australia
Posts: 50
Rep Power: 11 |
Hi Hassan,
Thanks for your reply. My case is compressible. Looking at the compressible turbulence models the stress tensor is not available. (Or i am missing it). I guess the only option is to write the terms out and put that in. Cheers, Hilbert |
|
April 14, 2016, 02:53 |
|
#5 |
Member
Hilbert
Join Date: Aug 2015
Location: Australia
Posts: 50
Rep Power: 11 |
Good point, thanks.
after a bit of playing with it I think I got it. The term I came up with is: Code:
fvc::div(turbulence->devRhoReff()&U) |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Add a source term to UEqn.H | KeiJun | OpenFOAM Programming & Development | 6 | December 2, 2022 23:55 |
[PyFoam] and paraview | eelcovv | OpenFOAM Community Contributions | 28 | May 30, 2016 09:23 |
Add a source term (body force) in icoFoam | hisham007 | OpenFOAM Running, Solving & CFD | 1 | January 29, 2016 04:21 |
How to add a sink term to the transport equation for the volume fraction | ASLAN_1987 | STAR-CCM+ | 2 | September 14, 2015 21:57 |
how to add turbulent dispersion term in twoPhaseEulerFoam? | Yucheng Fu | OpenFOAM Running, Solving & CFD | 2 | April 28, 2015 00:04 |