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

Describing div terms in fvSchemes

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By santiagomarquezd
  • 2 Post By santiagomarquezd

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 28, 2011, 22:36
Default Describing div terms in fvSchemes
  #1
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 24
santiagomarquezd will become famous soon enough
Hi FOAMers, I have a solver with this code:

Code:
    fvVectorMatrix UEqn
    (
        fvm::ddt(rhom, U)
      + fvm::div(phi, U)
      + fvc::div
        (
            alpha*rhop*Vdrp*Vdrp,
            "div(phiVdrp,Vdrp)"
        )
      - fvm::laplacian(mum, U, "laplacian(mum,U)")
    );
when I run the solver I obtain this error:

Code:
--> FOAM FATAL IO ERROR:
keyword div(phiVdrp,Vdrp) is undefined in dictionary "/home/santiago/OpenFOAM/santiago-1.6.x/run/tankBubbles/system/fvSchemes::divSchemes"

file: /home/santiago/OpenFOAM/santiago-1.6.x/run/tankBubbles/system/fvSchemes::divSchemes from line 30 to line 32.

    From function dictionary::lookupEntry(const word&, bool, bool) const
    in file db/dictionary/dictionary.C at line 396.

FOAM exiting
then if I add this:

Code:
divSchemes
{
    div(phi,U)  Gauss upwind; //limitedLinearV 1;
    div(rhop*phi,alpha) Gauss upwind;
    div(phiVdrp,alpha) Gauss upwind;
    div(phiVdrp,Vdrp) Gauss upwind;
}
to my system/fvSchemes dictionary I still get an error, but a different one:

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

file: /home/santiago/OpenFOAM/santiago-1.6.x/run/tankBubbles/system/fvSchemes::divSchemes::div(phiVdrp,Vdrp) at line 33.

From function ITstream::read(token& t)
in file db/IOstreams/Tstreams/ITstream.C at line 84.

FOAM exiting
Any clues about that?, I've checked some similar threads without success.

Regards.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Old   March 1, 2011, 05:57
Default
  #2
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
The divergence schemes in fvSchemes apply to convective terms like fvm::div(phi, X), but your term in the equation seems to be a simple explicit divergence of a scalar field, so why not just write it in the following way?
Code:
 fvVectorMatrix UEqn
    (
        fvm::ddt(rhom, U)
      + fvm::div(phi, U)
      + fvc::div
        (
            alpha*rhop*Vdrp*Vdrp
        )
      - fvm::laplacian(mum, U, "laplacian(mum,U)")
    );
akidess is offline   Reply With Quote

Old   March 1, 2011, 13:06
Default
  #3
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 24
santiagomarquezd will become famous soon enough
Anton, I took this notation from settlingFoam, but on the other hand I'd tried you suggested with same results:

Code:
    fvVectorMatrix UEqn
    (
        fvm::ddt(rhom, U)
      + fvm::div(phi, U)
      + fvc::div
        (
            alpha*rhop*Vdrp*Vdrp
        )
      - fvm::laplacian(mum, U, "laplacian(mum,U)")
    );
error obtained at runtime:

Code:
--> FOAM FATAL IO ERROR:
keyword div((((alpha*rhop)*Vdrp)*Vdrp)) is undefined in dictionary "/home/santiago/OpenFOAM/santiago-1.6.x/run/tankBubbles/system/fvSchemes::divSchemes"

file: /home/santiago/OpenFOAM/santiago-1.6.x/run/tankBubbles/system/fvSchemes::divSchemes from line 30 to line 32.

    From function dictionary::lookupEntry(const word&, bool, bool) const
    in file db/dictionary/dictionary.C at line 396.

FOAM exiting
adding corresponding line in system/fvSchemes

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

file: /home/santiago/OpenFOAM/santiago-1.6.x/run/tankBubbles/system/fvSchemes::divSchemes::div((((alpha*rhop)*Vdrp)*Vd rp)) at line 34.

From function ITstream::read(token& t)
in file db/IOstreams/Tstreams/ITstream.C at line 84.

FOAM exiting
Regards.
Kummi likes this.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Old   March 1, 2011, 14:03
Default
  #4
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
Ah, you are right, looking at fvcDiv.* it is indeed possible to name even an explicit term and force usage of a certain divergence scheme instead of plainly calling surfaceIntegrate. I'm sorry I don't really have other ideas what could cause the problem. Hopefully someone else will notice this thread and have an answer.
akidess is offline   Reply With Quote

Old   March 1, 2011, 16:15
Default
  #5
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 24
santiagomarquezd will become famous soon enough
Anton, the correct entry in fvSchemes is:

Code:
divSchemes
{
    div(phi,U)  Gauss upwind; //limitedLinearV 1;
    div(phi,alpha) Gauss upwind;
    div(phiVdrp,alpha) Gauss upwind;
   div(phiVdrp,Vdrp) Gauss upwind phiVdrp;
}
it's necessary to explicitly write the flux which will be used in order to interpolate the values at faces. Early alberto shown me the wording to include the flux properly.

Regards.
kiddmax and Stratos_ like this.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar
santiagomarquezd 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
Implicit treatment of advection terms and pressure correction nikosb Main CFD Forum 0 January 17, 2010 17:07
Using source terms jsm Main CFD Forum 4 August 20, 2009 07:44
Question in definition of terms in solve titio OpenFOAM Running, Solving & CFD 0 March 19, 2009 17:02
Source terms for additional variable transport eqn Nandini Rohilla CFX 0 February 6, 2004 14:38
K-Epsilon model? Brindaban Ghosh Main CFD Forum 2 June 24, 2000 05:22


All times are GMT -4. The time now is 13:59.