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

buoyantBoussinesqSimpleFoam with ExternalHeatFluxTemperature

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

Like Tree5Likes
  • 1 Post By Quadrolabs
  • 4 Post By tomf

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 3, 2017, 16:55
Default buoyantBoussinesqSimpleFoam with ExternalHeatFluxTemperature
  #1
New Member
 
Kasper De Geeter
Join Date: Mar 2016
Location: Brussels
Posts: 3
Rep Power: 10
mozeven is on a distinguished road
Dear Community,

I am trying to simulate the flow through a simple heat exchanger. What I am trying to simulate (simplified) is a peltier dumping heat into a heatexchanger. Below you can find a figure explaining the simplified setup.




I am using openFoam V5.0. My case is set up to use the buoyantBoussinesqSimpleFoam solver.
Please find the full case here:
Full case

My model is running and converging when using fixed temperature boundary conditions. However, I have not understood how to add a heat flux boundary condition. I tried to use the externalWallHeatFluxTemperature boundary condition, but was not able to set it up correctly.
checkMesh returns the following:
https://www.dropbox.com/s/hik8gp0oua...kMesh.log?dl=0


https://www.dropbox.com/s/2tioav0723...vSolution?dl=0

https://www.dropbox.com/s/t19m0dqd5t...fvSchemes?dl=0


The T file is as follows:
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       volScalarField;
    location    "0";
    object      T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 1 0 0 0];

internalField   uniform 275;

boundaryField
{
    wall
    {
      type          externalWallHeatFluxTemperature;
      mode          power;
      Q             500;
      kappaMethod	fluidThermo;
      kappaName		default;
      Ta            constant 350.0;
      value         uniform 350;
    }
    inlet
    {
        type	fixedValue;
        value	uniform 275;

    }
    outlet
    {
      type  zeroGradient;
    }
}


// ************************************************************************* //
The output (including the error) I get is the following:
Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5.0                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 5.0-dbb428a3a855
Exec   : buoyantBoussinesqSimpleFoam
Date   : Oct 02 2017
Time   : 23:52:47
Host   : "kasper-PC"
PID    : 16539
I/O    : uncollated
Case   : /home/kasper/OpenFOAM/kasper-5.0/run/HeatBlock_power
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

SIMPLE: convergence criteria
    field p_rgh	 tolerance 0.01
    field U	 tolerance 0.0001
    field T	 tolerance 0.001
    field "(k|epsilon|omega)"	 tolerance 0.001

Reading thermophysical properties

Reading field T

Reading field p_rgh

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Creating turbulence model

Selecting turbulence model type RAS
Selecting RAS turbulence model kEpsilon
RAS
{
    RASModel        kEpsilon;
    turbulence      on;
    printCoeffs     on;
    Cmu             0.09;
    C1              1.44;
    C2              1.92;
    C3              0;
    sigmak          1;
    sigmaEps        1.3;
}

Reading field alphat

Reading g

Reading hRef
Calculating field g.h

No MRF models present

Radiation model not active: radiationProperties not found
Selecting radiationModel none
No finite volume options present

Starting time loop

Time = 1

DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 0.0157593, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 1, Final residual = 0.0157414, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 1, Final residual = 0.0187311, No Iterations 1

--> FOAM FATAL ERROR: 
Kappa defined to employ fluidThermo method, but thermo package not available

    From function Foam::tmp<Foam::Field<double> > Foam::temperatureCoupledBase::kappa(const scalarField&) const
    in file turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C at line 135.
FOAM exiting

Can someone point me to a minimum working example using buoyantBoussinesqSimpleFoam and externalWallHeatFlux? Or tell me what I am doing wrong?

For information, my next step in this model will be to include the body of the heat exchanger as a solid and have the heatflux boundary condition on one of the walls of the solid. I intend to do that by changing the solver to chtMultiRegionSimpleFoam. This is why in my current model I did not separate a single wall to apply the heatflux to as the wall from the fluid domain will be touching the solid.

I hope to have given enough information for someone to be able to give me some pointers on what I am doing wrong. If more information is required, please ask.

Thanks in advance,

Kasper
mozeven is offline   Reply With Quote

Old   October 3, 2017, 22:00
Default
  #2
New Member
 
Quadros
Join Date: Sep 2017
Posts: 2
Rep Power: 0
Quadrolabs is on a distinguished road
Hello kasper.

Actually I dont know about fixedWallHeatFluxTemperature but for specifying heat flux from wall as boundary condition there is one way. You can specify it as fixedGradient in the temperature file. The gradient can be found from fourier law of heat conduction Q = -k(dT/dy). so you are calculating
dT/dy = -Q/k.

I hope this will solve your problem. In case if you find someother method kindly update.


Thank you.
sonGoku likes this.
Quadrolabs is offline   Reply With Quote

Old   October 4, 2017, 02:53
Default
  #3
New Member
 
Kasper De Geeter
Join Date: Mar 2016
Location: Brussels
Posts: 3
Rep Power: 10
mozeven is on a distinguished road
Quote:
Originally Posted by Quadrolabs View Post
Hello kasper.

Actually I dont know about fixedWallHeatFluxTemperature but for specifying heat flux from wall as boundary condition there is one way. You can specify it as fixedGradient in the temperature file. The gradient can be found from fourier law of heat conduction Q = -k(dT/dy). so you are calculating
dT/dy = -Q/k.

I hope this will solve your problem. In case if you find someother method kindly update.


Thank you.
Thanks for that tip. I will give that a try tonight.
However, I still don't see why the externalWallHeatFluxTemperature BC doesn't work. Looking at the documentation I don't see what I am doing wrong. Someone more experienced than me might find something obvious.

Kind regards,

Kasper
mozeven is offline   Reply With Quote

Old   October 4, 2017, 05:32
Default
  #4
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hello Kasper,

The problem you are facing stems from the fact that buoyantBoussinesqSimpleFoam is for incompressible fluids, while the externalWallHeatFluxTemperature boundary condition is for compressible fluids.

You may want to work with buoyantSimpleFoam and use the Boussinesq equation of state:

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

thermoType
{
    type            heRhoThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState Boussinesq;//perfectGas;
    specie          specie;
    energy          sensibleEnthalpy;
}

mixture
{
    specie
    {
        molWeight       28.96;
    }
    thermodynamics
    {
        Cp              1004.4;
        Hf              0;
    }
    transport
    {
        mu              1.831e-05;
        Pr              0.705;
    }
    equationOfState
    {
        rho0            1.225;
        T0              293.15;
        beta            3.411e-3;
    }
}


// ************************************************************************* //
tomf is offline   Reply With Quote

Old   October 5, 2017, 17:03
Default
  #5
New Member
 
Kasper De Geeter
Join Date: Mar 2016
Location: Brussels
Posts: 3
Rep Power: 10
mozeven is on a distinguished road
Hi Tom,

Thanks for your help. I tried it and indeed, everything is now working.

For some reason, when I decompose my case, I had an error, because the solver cannot find Ta, which according to the documentation (and when running single core) is not necessary. I solved it by manually adding it to the decomposed T files, but it's annoying...

Is there any way I could have known that this boundary condition only works on compressible solvers? I found no reference to it in the documentation.

Kind regards,

Kasper
mozeven is offline   Reply With Quote

Old   October 6, 2017, 04:20
Default
  #6
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

If you do a find in a terminal:

Code:
find $FOAM_SRC -iname *externalWallHeatFluxTemperature*
it shows that it is a derived boundary condition in compressible turbulencemodels:

Code:
src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature
.

That is usually a hint. I have not looked into the code or documentation for this.

Regards,
Tom
tomf is offline   Reply With Quote

Reply

Tags
boundaries condition, buoyantboussinesqsimple, heat exchanger, heat flux

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



All times are GMT -4. The time now is 17:19.