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

Fixed Temperature in Porous Zone

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By Tempest
  • 1 Post By Tempest
  • 1 Post By Swagga5aur

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 4, 2017, 02:18
Default Fixed Temperature in Porous Zone
  #1
Member
 
Anirudh Kulkarni
Join Date: May 2016
Posts: 62
Rep Power: 10
Tempest is on a distinguished road
Dear Foamers,

I am trying to simulate flow across a heated porous cylinder. I wish to assign a fixed temperature to the cylinder. If I use toposetDict, it would assign a fixed temperature only for the initial phase, but update it as the simulation runs ahead.

Please help me out.

Basically, I would like to give a boundary condition to an entire cellzone i.e. fixed temperature.

Thanks in advance.
Kummi likes this.
Tempest is offline   Reply With Quote

Old   February 6, 2017, 00:44
Default Found it
  #2
Member
 
Anirudh Kulkarni
Join Date: May 2016
Posts: 62
Rep Power: 10
Tempest is on a distinguished road
We can do this by using fvOptions and

TEqn.H

Code:
{
    fvScalarMatrix TEqn
    (
        fvm::ddt(T)
      + (1/porosity)*fvm::div(phi, T)
      - fvm::laplacian(nu/Pr, T)
	==
	fvOptions(T)
    );

    TEqn.relax();

    fvOptions.constrain(TEqn);

    TEqn.solve();

    fvOptions.correct(T);

    rhok = 1.0 - beta*(T - TRef);
}
And in fvOptions we can add

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

s1
{
    type            scalarFixedValueConstraint;
    active          true;


    scalarFixedValueConstraintCoeffs
    {
	    selectionMode   cellZone;
            cellZone         porousZone;
        fieldValues
        {
            T              350; \\the fixed temperature value
        }
    }
}


// ************************************************************************* //
Kummi likes this.
Tempest is offline   Reply With Quote

Old   January 30, 2018, 06:01
Post ADDING POROSITY IN TEqn IN OPENFOAM
  #3
Member
 
Ramana
Join Date: Jul 2017
Location: India
Posts: 58
Rep Power: 9
svramana is on a distinguished road
Quote:
Originally Posted by Tempest View Post
We can do this by using fvOptions and

TEqn.H

Code:
{
    fvScalarMatrix TEqn
    (
        fvm::ddt(T)
      + (1/porosity)*fvm::div(phi, T)
      - fvm::laplacian(nu/Pr, T)
    ==
    fvOptions(T)
    );

    TEqn.relax();

    fvOptions.constrain(TEqn);

    TEqn.solve();

    fvOptions.correct(T);

    rhok = 1.0 - beta*(T - TRef);
}
And in fvOptions we can add

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

s1
{
    type            scalarFixedValueConstraint;
    active          true;


    scalarFixedValueConstraintCoeffs
    {
        selectionMode   cellZone;
            cellZone         porousZone;
        fieldValues
        {
            T              350; \\the fixed temperature value
        }
    }
}


// ************************************************************************* //
hi i am doing similar problem ,may i know how to define porosity apart from D and F coefficients in porosity properties
svramana is offline   Reply With Quote

Old   February 7, 2018, 15:49
Default
  #4
Senior Member
 
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11
Swagga5aur is on a distinguished road
Hello Ramana,

Currently, the only way to implement the flow effects of a porous media in a predefined solver is using the darcy forchheimer model.

The coefficients may be determined, depending on the case, using Erguns equation.

To use the porosity directly you have to make a usermade solver.

A basic approach describing the implementation of a porous medium model in an existing solver is described here:

https://www.slideshare.net/Cypiii/op...training-v51en

Regards Lasse
Kummi likes this.
Swagga5aur is offline   Reply With Quote

Old   February 11, 2018, 23:15
Default
  #5
Member
 
Ramana
Join Date: Jul 2017
Location: India
Posts: 58
Rep Power: 9
svramana is on a distinguished road
Quote:
Originally Posted by Swagga5aur View Post
Hello Ramana,

Currently, the only way to implement the flow effects of a porous media in a predefined solver is using the darcy forchheimer model.

The coefficients may be determined, depending on the case, using Erguns equation.

To use the porosity directly you have to make a usermade solver.

A basic approach describing the implementation of a porous medium model in an existing solver is described here:

https://www.slideshare.net/Cypiii/op...training-v51en

Regards Lasse
Dear Lasse,

Thank you for your response.I have gone through above link and able to simulate basic flow and heat transfer approach in porous media.

Now coming to my simulation ,i want to simulate flow and heat transfer from porous square cylinder to a flowing wind.
The computational domain is as appended below
cfd.png

I have defined the porous cylinder as porous blockage( similar to the one in PisoFaom tutorial) and now i want to modify the governing equation to make a user-defined solver.

The governing equations for the above problem are GEqn.png

The governing equations for porous-media in OF are defined as DF Eqn.png

In predefined solver for porous media i.e PorousSimplefoam,There is no time derivative (as it is a steady state solver )and there is no entry to read porosity.

I have few questions regarding momentum and energy equations

1). How and where to define porosity (1 for fluid region & (0<porosity<1) for porous zone) as i am using single domain approach(single set of governing equations are utilized to solve both fluid and porous zones).

2). what are the modifications required in momentum equation to include porosity effect in it. (similar to the one in fluent solver Eqn. enclosed)
fluent Eqn.png
Thanks in advance,

Reagrds,
S.V.Ramana
svramana is offline   Reply With Quote

Old   February 13, 2018, 06:20
Default
  #6
Senior Member
 
Lasse Brams Vinther
Join Date: Oct 2015
Posts: 118
Rep Power: 11
Swagga5aur is on a distinguished road
Hello Ramana,

1) To my understanding the FLUENT porosity will never impact the flow velocity in the medium, its only used in the case of thermal modelling https://www.sharcnet.ca/Software/Ans...ous_media.html. No matter what value you set for porosity, FLUENT predicts that the flow velocity is the superficial velocity in the medium.

Some more on that here http://jullio.pe.kr/fluent6.1/help/html/ug/node237.htm

Using the Darcy-Forchheimer equation as described here: http://www.tfd.chalmers.se/~hani/kur...ukurReport.pdf

Some other Foamers, have had discussion about this such as Porosity and permeability in PorousInterFoam.

2) If you were to implement the porousity instead of using the Darcy-Forchheimer, you would need to apply the porousity into the momentum equation similarly to the FLUENT formulation, however, I would not be certain that the correct pressure loss is determined, as I would think you also would have to determine the pressure influence of the porous media using something like the Ergun equation.

Hope this makes sense, else please let me know and I will get back to you.

Regards Lasse.

Last edited by Swagga5aur; February 13, 2018 at 08:18.
Swagga5aur is offline   Reply With Quote

Old   April 27, 2018, 06:48
Default
  #7
Senior Member
 
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8
deepbandivadekar is on a distinguished road
Quote:
Originally Posted by Tempest View Post
We can do this by using fvOptions and

TEqn.H

Code:
{
    fvScalarMatrix TEqn
    (
        fvm::ddt(T)
      + (1/porosity)*fvm::div(phi, T)
      - fvm::laplacian(nu/Pr, T)
    ==
    fvOptions(T)
    );

    TEqn.relax();

    fvOptions.constrain(TEqn);

    TEqn.solve();

    fvOptions.correct(T);

    rhok = 1.0 - beta*(T - TRef);
}
And in fvOptions we can add

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

s1
{
    type            scalarFixedValueConstraint;
    active          true;


    scalarFixedValueConstraintCoeffs
    {
        selectionMode   cellZone;
            cellZone         porousZone;
        fieldValues
        {
            T              350; \\the fixed temperature value
        }
    }
}


// ************************************************************************* //

Hello Anirudh,

I have used this approach in last few months and I've come to a conclusion that this doesn't really "initialise" the porous zone as it should. At least in my simulations I found that the temperature in the porous zone is maintained at the value supplied through fixedTemperatureConstraint throughout the timespan and doesn't change with respect to flow over the consecutive timesteps as it ideally should.

I am looking for any alternative.
deepbandivadekar is offline   Reply With Quote

Reply

Tags
openfoam 4.1, porous cell zone, temperature bc


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
[openSmoke] libOpenSMOKE Tobi OpenFOAM Community Contributions 562 January 25, 2023 09:21
Error in solution using "Grid Interface" agustinvo FLUENT 4 January 20, 2015 12:03
Cluster ID's not contiguous in compute-nodes domain. ??? Shogan FLUENT 1 May 28, 2014 15:03
Fixed mean temperature boundary condition for developing flow mohsen cheraghi OpenFOAM 2 July 24, 2011 13:06
Fluent incident radiation problem Michael Schwarz Main CFD Forum 0 October 21, 1999 05:56


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