CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

How to set fvOptions

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

Like Tree5Likes
  • 2 Post By yurifrey
  • 3 Post By olivierG

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 5, 2013, 04:52
Default How to set fvOptions
  #1
New Member
 
Yuri Frey
Join Date: Jul 2013
Posts: 13
Rep Power: 12
yurifrey is on a distinguished road
Hello!

I want to set a porous zone using fvOptions in OF 2.2.x, but it seems that the solver doesn't read the file.. I created a mesh with two separate zones and this is the first part of the cellZones file:

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       regIOobject;
    location    "constant/polyMesh";
    object      cellZones;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

2
(
zone2
{
    type cellZone;
cellLabels      List<label> 
500
(
0
1
I create a file named fvOptions into the system folder with:

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvOptions;
}

porosity
{
    type          explicitPorositySource;
    active        yes;
    selectionMode cellZone;
    cellZone      zone2;

    explicitPorositySourceCoeffs
    {
        type DarcyForchheimer;

        DarcyForchheimerCoeffs
        {
              d    d [0 -2 0 0 0 0 0] (5e7 -1000 -1000);
              f    f [0 -1 0 0 0 0 0] (0 0 0);

              coordinateSystem
              {
                  e1    (1 0 0);
                  e2    (0 1 0);
              }
        }
    }
}
following what is said here:
HTML Code:
http://www.openfoam.org/version2.2.0/fvOptions.php
but the solver (icoFoam) is unable to read it (if I change the values of the coefficients nothing changes in the solution..).

Do I need to specify something more?

Thank you,
Yuri
yurifrey is offline   Reply With Quote

Old   August 7, 2013, 08:39
Default
  #2
New Member
 
Yuri Frey
Join Date: Jul 2013
Posts: 13
Rep Power: 12
yurifrey is on a distinguished road
This is the answer I had from fredo490:

Quote:
Hello,
I don't have any machine running openfoam next to me now so it's a bit hard to answer.

My guess is that icoFoam has not been updated to consider the fvOption files. The best way to check is to go to the icoFoam source code and check if you find any "+ fvOption" or something similar in one of the equation solved.

I have some source code on my computer but only simpleFoam and pimplefoam are up to date. If you look at the pimpleFoam UEqn.h you will find the following code to solve the momentum equation:
Code:
tmp<fvVectorMatrix> UEqn
(
    fvm::ddt(U)
  + fvm::div(phi, U)
  + turbulence->divDevReff(U)
 ==
    fvOptions(U)
);
The last term is the "fvOptions(U)" file that consider lthe porosity and so on.

Try to find the same for icoFoam... but I think you will not find it because icoFoam behave a bit differently.

Hope it helps you.
I checked it and it is exactly as he said. I had no problems using pimpleFoam.
Tobi and mizzou like this.
yurifrey is offline   Reply With Quote

Old   November 29, 2013, 08:50
Default
  #3
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 18
samiam1000 is on a distinguished road
Hi guys,

I am trying to use fvOption, as well.

What I would like to do is to add a body-force in certain cells of my domain.

Actually, what I did is something like

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

momentumSource
{
    type            vectorExplicitSetValue;
    active          on;            //on/off switch
    selectionMode   all;       //cellSet // points //cellZone

    vectorExplicitSetValueCoeffs
    {
        injectionRate
        {
            F    ( 0.1335 0 0 );
        }
    }
}


// ************************************************************************* //
but I do not understand which are the right entries (I think that doing like what I did, I add a velocity, not a force).

Could you help, please?

Thanks a lot,
Samuele
samiam1000 is offline   Reply With Quote

Old   February 7, 2014, 11:05
Question Where's the porosity field?
  #4
Member
 
Hanniel Freitas
Join Date: Jan 2012
Location: Natal, Brazil
Posts: 34
Rep Power: 14
hfsf is on a distinguished road
Hello all,

I'm sorry for such a noob question, but recently I started to model a flow over a porous media in OpenFOAM. In the OpenFOAM website I've stumbled upon a new feature since OF 2.x: the fvOptions dictionary.

The problem is: I cannot see any reference to the porosity of the medium. The example of a fvOptions dictionary configuration (from the very own OpenFOAM website) is:

Code:
porosity1 
{ 
    type          explicitPorositySource;                                                                                                                                                        
    active        yes; 
    selectionMode cellZone; 
    cellZone      porosity; 

    explicitPorositySourceCoeffs 
    { 
        type DarcyForchheimer; 

        DarcyForchheimerCoeffs 
        { 
              d    d [0 -2 0 0 0 0 0] (5e7 -1000 -1000); 
              f    f [0 -1 0 0 0 0 0] (0 0 0); 

              coordinateSystem 
              { 
                  e1    (0.70710678 0.70710678 0); 
                  e2    (0 0 1); 
              } 
        } 
    } 
}
But there's no mention of the porosity of the medium, as you can see!!!

In a post of Alberto Passalacqua's blog, he posted a similar procedure concerning the version 1.5 of the OpenFOAM. The posted code is as follows:

Code:
1 
(     
   porosity    
   {         
       coordinateSystem         
       {             
                origin (0 0 0);
                e1  (1 0 0);
                e2  (0 1 0);
        }          
        
        porosity 0.5;          
        Darcy         
        {             
                d   d [0 -2 0 0 0 0 0] (-1 1e7 -1);             
                 f   f [0 -1 0 0 0 0 0] (0 0 0);         
         }     
    } 
 )
The porosity field is there, after coordinateSystem definition. What have changed in the 2.2 version? How can I define the porosity of the medium?

Thanks in advance.

Last edited by hfsf; February 7, 2014 at 11:09. Reason: Wrong code writting
hfsf is offline   Reply With Quote

Old   February 10, 2014, 06:01
Default
  #5
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 17
olivierG is on a distinguished road
Hello,

For pressure/velocity resolution, you don't need the porosity info (at least with Darcy model), only permeability.

However you need it for heat transfert, but in this case just add another fvOption for the heat transfert part (like "constantHeatTransfert" of "effectivenessHeatExchangerSource").

regards,
olivier
olivierG is offline   Reply With Quote

Old   February 22, 2016, 18:14
Default
  #6
Senior Member
 
Join Date: Jan 2013
Posts: 372
Rep Power: 14
openfoammaofnepo is on a distinguished road
Dear Olivier,

For fvOptions, for those tutorials without the dictionary "fvOptions", the "fvOptions" related terms appears in the source files of the solvers actually are useless. These terms are only active when we specify the parameter in the fvOptions dictionary. Is what I am saying correct? Thank you so much.
openfoammaofnepo is offline   Reply With Quote

Reply

Tags
fvoptions

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
TimeVaryingMappedFixedValue irishdave OpenFOAM Running, Solving & CFD 32 June 16, 2021 06:55
Porous region set braket FLUENT 4 November 18, 2010 02:09
What value shall I set for the Convergence criteria? steventay CFX 7 May 14, 2010 12:44
Install problem in linux navaladi OpenFOAM Installation 11 July 17, 2008 02:24
Ibm java gcc rrr OpenFOAM Installation 2 December 30, 2005 04:18


All times are GMT -4. The time now is 12:00.