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

keyword div((thermo:mu*dev2(T(grad(U))))) is undefined in dictionary

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

Like Tree1Likes
  • 1 Post By khedar

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 8, 2016, 14:23
Default keyword div((thermo:mu*dev2(T(grad(U))))) is undefined in dictionary
  #1
Senior Member
 
khedar
Join Date: Oct 2016
Posts: 111
Rep Power: 11
khedar is on a distinguished road
Hi all,
I get the following error after I modified my Turbulence model.
Code:
keyword div((thermo:mu*dev2(T(grad(U))))) is undefined in dictionary
This error comes only when I add RST terms to devRhoReff() and divDevRhoReff(U) terms.
Code:
tmp<volSymmTensorField> sBSLEARSMNew::devRhoReff() const
{
    return tmp<volSymmTensorField>
    (
        new volSymmTensorField
        (
            IOobject
            (
                "devRhoReff",
                runTime_.timeName(),
                mesh_,
                IOobject::NO_READ,
                IOobject::NO_WRITE
            ),
            rho_*R_+mu()*dev(twoSymm(fvc::grad(U_)))
        )
    );
}


tmp<fvVectorMatrix> sBSLEARSMNew::divDevRhoReff(volVectorField& U) const
{
    return
    (
        fvc::div(rho_*R_)
      - fvm::laplacian(muEff(), U) 
      - fvc::div(mu()*dev2(T(fvc::grad(U))))
    );
}
I have searched a lot but am not able to find the solution. My doubt is the "thermo:" before the mu term. I have never seen div scheme to contain such term. But when I add this to the div scheme i get a different error.

Code:
--> FOAM FATAL IO ERROR: 
attempt to read beyond EOF

file: /home/i6070205_/OpenFOAM/i6070205_-2.3.0/run/simple/2Round/4test/system/fvSchemes.divSchemes.div((rho*R)) at line 38.
my div schemes are:

Code:
divSchemes
{
    default            none;
    div(phi,T)         bounded Gauss upwind;
    div(U)          Gauss linear;
    div(phi,U)        bounded Gauss upwind;
    div(phi,k)         bounded Gauss upwind;
    div(phi,K)         bounded Gauss upwind;
    div(phi,omega)      bounded Gauss upwind;
    div((rho*R))        Gauss upwind;
    div(R)          Gauss upwind;
    div(phi,R)          Gauss upwind;
    div(phi,h)          bounded Gauss upwind;
    div((muEff*dev2(grad(U).T()))) Gauss linear;
    div(phi,Ekp)        bounded Gauss upwind;
    div(phi,e)          bounded Gauss upwind;
    div((mu*dev2(T(grad(U))))) Gauss upwind;
    div((nu*dev2(T(grad(U))))) Gauss upwind;
    div((muEff*dev2(T(grad(U)))))   Gauss linear;
    div((thermo:mu*dev2(T(grad(U))))) Gauss linear;

}
I am using OF2.3.1 and this turbulence model is based on kOmegaSSL.

It would be great if someone could help me out.

khedar
khedar is offline   Reply With Quote

Old   December 9, 2016, 09:38
Default
  #2
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,716
Blog Entries: 6
Rep Power: 53
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

I am not sure about your implementation and what you did but try,...
Code:
div((rho*R))    Gauss upwind grad(rho);
If it is like that, I am not sure if you did everything correct in the mathematical point of view. The thermo: keyword is fine because you used it in your function.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   December 9, 2016, 10:57
Default
  #3
Senior Member
 
khedar
Join Date: Oct 2016
Posts: 111
Rep Power: 11
khedar is on a distinguished road
Hi Tobi,
thanks for your reply. When i changed as you suggested i got a new error.

Code:
--> FOAM FATAL ERROR: 

    request for surfaceScalarField grad(rho) from objectRegistry region0 failed
    available objects of type surfaceScalarField are

2
(
ghf
phi
)
But when i tried to change to "Gauss linear", it worked. So probably it has something to do with type of scheme. But I don't know OF that much so can't understand why it would be so.

khedar
khedar is offline   Reply With Quote

Old   December 10, 2016, 20:31
Default
  #4
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,716
Blog Entries: 6
Rep Power: 53
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

Then use grad(phi).
However, this is not a good stuff. Just one question. What is R_ in your code?

Sent from my HTC One mini using CFD Online Forum mobile app
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   December 17, 2016, 09:35
Default
  #5
Senior Member
 
khedar
Join Date: Oct 2016
Posts: 111
Rep Power: 11
khedar is on a distinguished road
Hi, I tried using grad(Phi) also but then I get some other error. But with Gauss linear it works so I am sticking to that for the Moment..
R is the Reynolds Stress Tensor
khedar is offline   Reply With Quote

Old   December 17, 2016, 10:31
Default
  #6
Senior Member
 
khedar
Join Date: Oct 2016
Posts: 111
Rep Power: 11
khedar is on a distinguished road
I have one more doubt regarding a term in the kOmegaSST model as implemented in OF.

Code:
// Turbulent frequency equation
    tmp<fvScalarMatrix> omegaEqn
    (
        fvm::ddt(rho_, omega_)
      + fvm::div(phi_, omega_)
      - fvm::laplacian(DomegaEff(F1), omega_)
     ==
        rhoGammaF1
       *min
        (
            GbyMu,
            (c1_/a1_)*betaStar_*omega_*max(a1_*omega_, b1_*F23()*sqrt(S2))
        )
      - fvm::SuSp((2.0/3.0)*rhoGammaF1*divU, omega_)
      - fvm::Sp(rho_*beta(F1)*omega_, omega_)
      - fvm::SuSp
        (
            rho_*(F1 - scalar(1))*CDkOmega/omega_,
            omega_
        )
    );
When I compare it to the original model, I don't understand from where the following term comes from.
Code:
      - fvm::SuSp((2.0/3.0)*rhoGammaF1*divU, omega_)
madgeogr likes this.
khedar is offline   Reply With Quote

Old   December 18, 2016, 04:56
Default
  #7
Senior Member
 
khedar
Join Date: Oct 2016
Posts: 111
Rep Power: 11
khedar is on a distinguished road
I think I understand where the source term with 2/3 in the previous post comes from. It is from the production term.



When the production term is evaluated we get three terms and the last term with k turns out to be the source term.

But when we do this and seeing by the way Gbymu is calculated,

Code:
    volScalarField GbyMu((tgradU() && dev(twoSymm(tgradU()))));
I think Production is not correctly estimated, since it does not contain all the terms (Only the first two terms in the stress tensor). And applying the production limiter to this term seems incorrect also.
khedar is offline   Reply With Quote

Old   December 26, 2016, 06:29
Default
  #8
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,716
Blog Entries: 6
Rep Power: 53
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
The term 2/3 rho k is not there because it goes to the pressure.

Sent from my HTC One mini using CFD Online Forum mobile app
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   December 26, 2016, 07:22
Default
  #9
Senior Member
 
khedar
Join Date: Oct 2016
Posts: 111
Rep Power: 11
khedar is on a distinguished road
But then what is this following term in the omega and k equation.?
Quote:
Originally Posted by khedar View Post
When I compare it to the original model, I don't understand from where the following term comes from.
Code:
      - fvm::SuSp((2.0/3.0)*rhoGammaF1*divU, omega_)
khedar is offline   Reply With Quote

Old   December 30, 2016, 05:58
Default
  #10
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,716
Blog Entries: 6
Rep Power: 53
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Oh, I was talking about the buossinesq eddy viscosity approximation and the momentum equations, not about the turbulence models itself.

Sent from my HTC One mini using CFD Online Forum mobile app
__________________
Keep foaming,
Tobias Holzmann

Last edited by Tobi; January 18, 2017 at 06:27.
Tobi is offline   Reply With Quote

Old   January 15, 2017, 10:08
Default
  #11
Senior Member
 
khedar
Join Date: Oct 2016
Posts: 111
Rep Power: 11
khedar is on a distinguished road
The term which i referred to in my previous post comes indeed from the Production term.

See here:
http://caefn.com/openfoam/keqn-sgs-model

In this blog post(although explained for k-sgs model but k equation treatment is more or less same.), the author derives how the 2/3 term comes from production. The reason for doing this way is answered on the same post. I quote here.

My question:
Quote:
Why the source code contains two terms instead of one for the production. In other words why do we need to separate it into two? (Refer your equation 6.)
Authors answer:
Quote:
Hi Khedar,

Thanks for your question.
I think the reason why the production term is divided into two part is that the SGS kinetic energy ksgs is only in the 1st term of the R.H.S. of Eq. (6). This term can take both positive and negative values so the SuSp operator is used in order to create diagonally dominant matrix.
khedar is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
LEMOS InflowGenerator r_gordon OpenFOAM Running, Solving & CFD 103 December 18, 2018 01:58
OpenFOAM 1.6-ext git installation on Ubuntu 11.10 x64 Attesz OpenFOAM Installation 45 January 13, 2012 13:38
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51
G95 + CGNS Bruno Main CFD Forum 1 January 30, 2007 01:34


All times are GMT -4. The time now is 16:17.