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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 1, 2021, 05:47
Default fixed temperature in porous zone
  #1
Senior Member
 
Alan w
Join Date: Feb 2021
Posts: 260
Rep Power: 6
boffin5 is on a distinguished road
In a previous post regarding how to specify a temperature in a porous zone, TEMPEST answers his own question as follows. But as a relative newbie, I don't understand how to implement the TEqn.H file. Where does it go, and are there any programming changes that need to accompany it?


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
        }
    }
}


// ************************************************************************* //
boffin5 is offline   Reply With Quote

Old   August 1, 2021, 07:48
Default
  #2
Member
 
Petros Ampatzidis
Join Date: Oct 2018
Location: Bath, UK
Posts: 64
Rep Power: 7
petros is on a distinguished road
Hi,

All files ending in "<>Eqn.H" contain source code that defines a mathematical model that the solver will solve. All these files are included and compiled in the solver's application folder. For example, see buoyantBoussinesqSimpleFoam and the respective TEqn.H file, which you can use as a template for your own implementation.

Best,
Petros
petros is offline   Reply With Quote

Old   August 1, 2021, 10:00
Default
  #3
Senior Member
 
Alan w
Join Date: Feb 2021
Posts: 260
Rep Power: 6
boffin5 is on a distinguished road
Thanks Petros!
From my quick look at buoyantBoussinesqSimpleFoam, it seems like it address liquids, not air. My need is to simulate airflow through a heated porous media.
Am I incorrect in my observation about the solver, or is there another more appropriate one?
boffin5 is offline   Reply With Quote

Old   August 2, 2021, 10:39
Default
  #4
Member
 
Petros Ampatzidis
Join Date: Oct 2018
Location: Bath, UK
Posts: 64
Rep Power: 7
petros is on a distinguished road
Hi,

Air is a fluid itself so it makes no difference.

I don't know what you want to simulate exactly, not to mention what assumptions your case involves, but you can have a brief description of every solver if you search for solvers dedicating to heat transfer. See here for example for heat transfer solvers in v2012.
petros 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
[openSmoke] libOpenSMOKE Tobi OpenFOAM Community Contributions 562 January 25, 2023 09:21
Porous jump and Porous Zone difference Qkarl FLUENT 3 April 29, 2020 11:33
[mesh manipulation] refineMesh Error mohsen.boojari OpenFOAM Meshing & Mesh Conversion 3 March 1, 2018 22:07
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


All times are GMT -4. The time now is 22:09.