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

Two-sided Wall Heat Transfer BC - No Separate Solid Mesh and No Heat Transfer Coeff

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes
  • 7 Post By swahono

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 15, 2010, 22:36
Default Two-sided Wall Heat Transfer BC - No Separate Solid Mesh and No Heat Transfer Coeff
  #1
Member
 
Stefano Wahono
Join Date: Aug 2010
Location: Melbourne, Australia
Posts: 42
Rep Power: 16
swahono is on a distinguished road
Dear Foamers and Experts,

I have been trying to perform a CFD for compressible internal flow (using rhoSimpleFoam). However, I have been having difficulty implementing the right BC for modelling heat transfer through a 'two-sided' thin wall.
The wall does not have thickness (only surface mesh). However, it needs to model heat transfer from one side to another side (this is similar to having a 'shadow wall' in Fluent), without having a separate solid mesh region.

Quote:
It is important that our mesh model does not need to incorporate a separate solid mesh region.

The heatflux through the wall must be computed based on local heat transfer coefficient calculated from local flow information.

The heat transfer coefficient must be calculated during runtime from local flow information.
In addition to the 'two-sided thin wall' BC, I would also like the ability for the heat conduction through the wall be specified in the BC dictionary, i.e. wall thickness, wall conductivity.

Additionally, the ability to compute 2D heat conduction in the thin shell is important.

All these will need to be achieved without the need to have a separate solid mesh region, and readily implementable with rhoSimpleFoam and rhoSonicFoam solver.

I believe no BC is readily available in OF that is able to do this without the need to have a separate solid mesh.

I have attempted to model the above requirements using wallHeatTransfer, groovyBC, and fixedGradient, all to no satisfactory result.

Could anyone please advice me if this is readily achievable in OpenFOAM without further development of a new BC?

Thank you very much in advanced for your response.

Best Regards,
Stefano Wahono
swahono is offline   Reply With Quote

Old   September 17, 2010, 03:09
Default
  #2
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18
ata is on a distinguished road
Hi Stefano
I think you are right. As I know there in no such a BC in OF.
Best regards
Good luck

Ata
ata is offline   Reply With Quote

Old   November 29, 2010, 04:42
Default thin wall conduction
  #3
New Member
 
majid
Join Date: Aug 2010
Posts: 6
Rep Power: 16
majas is on a distinguished road
hi
I have a problem with heat conduction through thin wall
i have square and in fluent in BC i put thickness and shell conduction for walls and i put heat generation in the square too
but after solving, in display contours of temperature i can't see contours of temp in the square and i can't see any thickness that i put for wall.why?
could any one help me
majas is offline   Reply With Quote

Old   November 30, 2010, 20:00
Default
  #4
Member
 
Stefano Wahono
Join Date: Aug 2010
Location: Melbourne, Australia
Posts: 42
Rep Power: 16
swahono is on a distinguished road
Hi Majas,

I believe you are describing your problem with Fluent. But, unfortunately, this is an OpenFOAM forum.
I think you stand better chance to get help if you post in the Fluent forum within the cfd-online.com.

Cheers,
Stefano
__________________
Stefano Wahono

Defence Science and Technology Organisation
Propulsion Systems
swahono is offline   Reply With Quote

Old   August 20, 2011, 13:35
Default
  #5
Member
 
ak
Join Date: May 2011
Posts: 64
Rep Power: 15
newOFuser is on a distinguished road
Hi Stefano,

Were you able to implement the Two-sided Wall Heat Transfer BC ?ak
newOFuser is offline   Reply With Quote

Old   August 21, 2011, 21:33
Default
  #6
Member
 
Stefano Wahono
Join Date: Aug 2010
Location: Melbourne, Australia
Posts: 42
Rep Power: 16
swahono is on a distinguished road
Hi ak,

Yes, OpenFOAM 2.0 comes with a two-sided wall BC. Several pre-processing steps are needed to set up this.
The following steps solve BOTH the normal heat transfer through the wall and the lateral heat transfer (or shell conduction).

Good luck trying. Let me know how you go.

Let's say the patch name of your two-sided wall is "wall_duct". Note the following steps work with mesh imported from Fluent format with a "shadow" wall already created in the mesh.

The pre-processing:

1. Create a setSet file with the following entries

Code:
faceSet fBaffle new patchToFace wall_duct
faceSet fBaffleShadow new patchToFace wall_duct-shadow
 
cellSet fBaffleCells new faceToCell fBaffle any
cellSet fBaffleShadowCells new faceToCell fBaffleShadow any
 
faceZoneSet fBaffle new setToFaceZone fBaffle
faceZoneSet fBaffleShadow new setToFaceZone fBaffleShadow
 
// You need to do above for each of you two-sided wall.
2. Then run:

Code:
$ setSet -batch setSet
3. make a new file system/extrudeToRegionMeshDict

Code:
region          baffleRegion;
faceZones       (fBaffle);
faceZonesShadow (fBaffleShadow);
oneD            false;
extrudeModel    linearNormal;
nLayers         10;  // Number of layers to solve the Conduction Eqn
expansionRatio  1;
adaptMesh       yes; // apply directMapped to both regions
linearNormalCoeffs
{
    thickness       0.005;  // virtual wall thickness in m
}
Run the following:

Code:
$ extrudeToRegionMesh -overwrite
3. Set the Boundary Condition files

in your 0/T file:
Code:
 
    wall_duct
    {
        type            compressible::thermoBaffle1DTemperature<constSolidThermoPhysics>;
        baffleActivated yes;
        thickness       uniform 0.005; // virtual baffle thickness
        Qs              uniform 0; // Heat flux [W/M2]
        transportProperties
        {
            K               202.4; // heat Conductance
        }
        radiativeProperties
        {
            sigmaS          0;
            kappa           0;
            emissivity      0;
        }
        thermoProperties
        {
            Hf              0;
            Cp              871;
        }
        densityProperties
        {
            rho             2719;
        }
        value           uniform 300;
    }
    wall_duct-shadow
    {
        $wall_duct
    }
You need to add the baffle patches in your BCs:

Add the following in 0/U
Code:
fBaffleShadow_top
{
    type    fixedValue;
    value   uniform (0 0 0);
}
"region0_.*"
{
 
    type    fixedValue;
    value   uniform (0 0 0);
}
Add the following in 0/p
Code:
fBaffleShadow_top
{
    type    zeroGradient;
}
"region0_.*"
{
 
    type    zeroGradient;
}
Add the following in 0/epsilon
Code:
fBaffleShadow_top
  {
        type            compressible::epsilonWallFunction;
    }
 
"region0_.*"
   {
        type            compressible::epsilonWallFunction;
    }
Add the following in 0/k
Code:
fBaffleShadow_top
  {
        type            compressible::kqRWallFunction;
    }
 
"region0_.*"
   {
        type            compressible::kqRWallFunction;
    }
Add the following in 0/alphat
Code:
fBaffleShadow_top
  {
        type            alphatWallFunction;
        value           uniform 0;
    }
 
"region0_.*"
   {
        type            alphatWallFunction;
        value           uniform 0;
    }
Make a new directory under the 0 directory:
Code:
$ mkdir 0/baffleRegion
Then, copy 0/T file into this new sub-directory.

Make a new directory under the system directory:
Code:
$ mkdir system/baffleRegion
Create a new file system/baffleRegion/changeDictionaryDict

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  dev                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      changeDictionaryDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dictionaryReplacement
{
    boundary
    {
        fBaffleShadow_top
        {
            type            directMappedWallVariableThickness;
            // This thickness is used if the baffle is 1D.
            thickness       uniform 0.005;
        }
        region0_to_baffleRegion_fBaffle
        {
            type            directMappedWallVariableThickness;
            // This thickness is used if the baffle is 1D.
            thickness       uniform 0.005;
        }
        symplanes
        {
            type        symmetryPlane; // (symmetryPlane:2D. wedge:1D)
        }
    }
    T
    {
        boundaryField
        {
            fBaffleShadow_top
            {
               type          compressible::turbulentTemperatureCoupledBaffleMixedNew;
                neighbourFieldName  T;
                K                   solidThermo;
                KName               none;
                //value               uniform 300; Don't want to spoil the old run
            }
            region0_to_baffleRegion_fBaffle
            {
                type         compressible::turbulentTemperatureCoupledBaffleMixedNew;
                neighbourFieldName  T;
                K                   solidThermo;
                KName               none;
                //value               uniform 300; Don't want to spoil the old run
            }
        }
    }
}
Create a new file system/changeDictionaryDict
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  dev                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      changeDictionaryDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dictionaryReplacement
{
    T
    {
        boundaryField
        {
            fBaffleShadow_top
            {
                type        compressible::turbulentTemperatureCoupledBaffleMixedNew;
                neighbourFieldName  T;
                K                   basicThermo;
                KName               none;
                //value               uniform 300; Don't want to spoil the old run
            }
            region0_to_baffleRegion_fBaffle
            {
                type        compressible::turbulentTemperatureCoupledBaffleMixedNew;
                neighbourFieldName  T;
                K                   basicThermo;
                KName               none;
                //value               uniform 300;
            }
        }
    }
}
Then run the following:
Code:
$ changeDictionary -literalRE
$ changeDictionary -region baffleRegion -literalRE
4. Add fvSchemes and fvSolution files in the system/baffleRegion

The system/baffleRegion/fvSchemes look like this:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  dev                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system/baffleRegion";
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
    default     steadyState;
}
divSchemes
{
     default        none;
}
gradSchemes
{
    default         Gauss linear;
}
laplacianSchemes
{
    default         none;
    laplacian(K,T)  Gauss linear corrected;
}

// ************************************************************************* //
The system/baffleRegion/fvSolution file looks like this:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  dev                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system/baffleRegion";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
    T
    {
        /*
        solver          PCG;
        preconditioner
        {
            preconditioner  GAMG;
            tolerance       1e-05;
            relTol          0;
            smoother        DICGaussSeidel;
            nPreSweeps      0;
            nPostSweeps     2;
            nFinestSweeps   2;
            cacheAgglomeration false;
            nCellsInCoarsestLevel 10;
            agglomerator    faceAreaPair;
            mergeLevels     1;
        }
        tolerance       1e-05;
        relTol          0;
        maxIter         100;
        */
        solver           PCG;
        preconditioner   DIC;//GaussSeidel;
        smoother         DILU;
        tolerance        1e-06;
        relTol           0;
    }
}
nNonOrthCorr    0;
relaxationFactors
{
    T       1;
}
// ************************************************************************* //
5. Add a dictionary for the baffle

Create a new file constant/thermoBaffleProperties
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.7.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      thermoBaffleProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoBaffleModel  thermoBaffle2D;
active          yes;
regionName      baffleRegion;
thermoBaffle2DCoeffs
{
}
noThermoCoeffs
{
}
// ************************************************************************* //
Create a new directory "constant/baffleRegion"
Create a new file inside this new subdirectory
constant/baffleRegion/solidThermophysicalProperties
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.7.x                                 |
|   \\  /    A nd           | Web:      http://www.OpenFOAM.com               |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      solidThermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType constSolidThermo;

constSolidThermoCoeffs
{
    //- thermo properties
    rho rho [1 -3  0  0 0 0 0]              2719;
    Cp  Cp  [0  2 -2 -1 0 0 0]              871;
    K   K   [1  1 -3 -1 0 0 0]              202.4;
    //- radiative properties
    kappa kappa [0 -1 0 0 0 0 0]            0;
    sigmaS sigmaS [0 -1 0 0 0 0 0]          0;
    emissivity  emissivity  [0 0 0 0 0 0 0] 1;
    //- chemical properties
    Hf  Hf  [0  2 -2  0 0 0 0]              0;
}

// ************************************************************************* //
6. Modify your solver to solve for the baffle
In this example I use rhoSimpleFoam

Copy the entire directory of $FOAM_SOLVERS/compressible/rhoSimpleFoam into a new directory
$FOAM_SOLVERS/compressible/rhoSimpleBaffleFoam

Add the following line in your $FOAM_SOLVERS/compressible/rhoSimpleBaffleFoam/rhoSimpleBaffleFoam.C

Code:
#include "simpleControl.H"
#include "thermoBaffleModel.H"
Add the following line in your $FOAM_SOLVERS/compressible/rhoSimpleBaffleFoam/createFields.H

Code:
    autoPtr<regionModels::thermoBaffleModels::thermoBaffleModel> baffles
    (
        regionModels::thermoBaffleModels::thermoBaffleModel::New(mesh)
    );
Add the following line in your $FOAM_SOLVERS/compressible/rhoSimpleBaffleFoam/hEqn.H

Code:
    baffles->evolve();

    thermo.correct();
7. Recompile the code.

Change the Make/files
Code:
rhoSimpleBaffleFoam.C
EXE = $(FOAM_APPBIN)/rhoSimpleBaffleFoam
Add the following libraries in the the Make/options
Code:
EXE_INC = \
    -I$(LIB_SRC)/regionModels/regionModel/lnInclude \
    -I$(LIB_SRC)/regionModels/thermoBaffleModels/lnInclude
EXE_LIBS = \
    -lthermoBaffleModels \
    -lregionModels
Compile the code
Code:
$ Allwmake
8. Run the case using the new solver rhoSimpleBaffleFoam.

I hope that helps!

Kind regards,
Stefano
mirko, kaifu, suh and 4 others like this.
__________________
Stefano Wahono

Defence Science and Technology Organisation
Propulsion Systems
swahono is offline   Reply With Quote

Old   August 23, 2011, 13:03
Default
  #7
Member
 
ak
Join Date: May 2011
Posts: 64
Rep Power: 15
newOFuser is on a distinguished road
Hi Stefano,

Thanks so much for the detailed reply! This should be very useful!
Currently I am using OF 1.7.1 but will be upgrading to the newer version, and will post once I have results.

Thanks again,
ak
newOFuser is offline   Reply With Quote

Old   March 26, 2014, 07:12
Default
  #8
New Member
 
Karla Mora Ulate
Join Date: Jan 2014
Posts: 5
Rep Power: 12
karlamora is on a distinguished road
Hi,

I am following a similar process but when I use extrudeToRegionMesh -overwrite I got the following error:

--> FOAM FATAL ERROR:
Zone walls is not consistently all internal or all boundary faces. Face 107868 at (-4 0.1 -3.9) is the first occurrence.

From function checkZoneInside(..)
in file extrudeToRegionMesh.C at line 439.

FOAM exiting

Do you have an idea about how can I solve this?

Regards,

Karla
karlamora is offline   Reply With Quote

Old   February 26, 2015, 05:30
Default two sided wall in openfoam
  #9
Member
 
Naresh Yathuru
Join Date: Feb 2015
Posts: 66
Rep Power: 11
Naresh yathuru is on a distinguished road
Hi karla mora

I m new to openfoam. I m using openfoam 2.3 i would like to know if u could able to solve the error and procceed further. Its a very interesting topic to simulate two sided walls in openfoam . could you please share your experience and challenges u faced. it would be a real contribution. Thank you.

regards,
Naresh
Naresh yathuru is offline   Reply With Quote

Old   May 22, 2017, 17:27
Default Two Sided Wall Heat Transfer for Incompressible Flow
  #10
New Member
 
Brian Schwartz
Join Date: Jul 2016
Location: Lancaster,Pa
Posts: 1
Rep Power: 0
theSchwartz is on a distinguished road
I was initially excited when I stumbled upon this post, however I don't think this solution works for my case. I am trying to implement a baffle into a meshed region, and have the baffle affect the flow (act as a wall) but then not affect heat transfer between fluids; I am also using incompressible flow.
Basically, I have added heat transfer to pimpleFoam and I want to track heat transfer across the baffle assuming it is of near zero thickness (no conduction thermal resistance). I successfully added a baffle into the fluid, and have the baffle redirecting flow. However, I had to make the temperature BC zeroGradient for the simulation to run, so it isn't calculating heat transfer across the baffle. I experimented with mapping the baffle master to slave, but didn't really get anywhere with that.
Does anyone know of a way in which to do this?
theSchwartz is offline   Reply With Quote

Old   October 15, 2018, 06:43
Default
  #11
Member
 
Kai
Join Date: May 2010
Location: Shanghai
Posts: 61
Blog Entries: 1
Rep Power: 16
kaifu is on a distinguished road
Brian,

I dont think you need to apply baffle BC. Two separate wall BC should work in your case.
__________________
Kai
kaifu 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



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