CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (http://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   buoyantBoussinesqPimpleFoam - Heat capacity on wall BC (http://www.cfd-online.com/Forums/openfoam-pre-processing/101702-buoyantboussinesqpimplefoam-heat-capacity-wall-bc.html)

danvica May 11, 2012 07:25

buoyantBoussinesqPimpleFoam - Heat capacity on wall BC
 
Hello,
I'm working with buoyantBoussinesqPimpleFoam solver simulating the flow of water in pipes.
Is it possible to define the walls as having heat capacity ?

This could give a first approximation of how a warmer fluid is going to be cooled (and for how long) flowing in colder pipes. Without using multiple regions solvers, I mean.

Thanks,

danvica May 11, 2012 14:09

At the moment I'm trying to use groovyBC to create a relation between the temperature of each cell on the walls to the one of closer cell (but not of the walls).

Someone could indicate whether this could be the right (approximate) approach ?

Or do I definetely need a multiregion case ?

Thanks.

danvica May 13, 2012 05:02

1 Attachment(s)
I found a good BC... in CFX :(. Here enclosed you can see a picture I found on one of its paper (I hope one is allowed to reproduce them here).

The note on this picture is:
Quote:

Bulk Heat Transfer Coefficient / Heat Transfer Coefficient
Specify the heat flux at a Wall boundary implicitly using a solid side
heat transfer coefficient, hc , and an external temperature, Ts.
This boundary condition can be used to model several sources of
thermal resistance outside the computational domain. In the diagram
below, a lumped resistance consisting of the thermal resistance of an
external boundary layer and the bounding wall is modelled using a
single heat transfer coefficient and external temperature.


Tp is the temperature at the internal near-wall boundary element centre node.

I hope now it's more clear what I'd like to obtain. Is there any possibility to get the same result in OF ?
I know the answer is yes but my math capability are a little...rusty :o.

Any help ?

Aurelien Thinat May 14, 2012 07:09

I'm not sure I understood your question. But if you need a BC with a heat transfer coefficient and an external temperature you already have the BC named "externalWallHeatFluxTemperature" in OF.

The input is [h & T external] OR [q] with q = h * (T external - T internal).

danvica May 14, 2012 13:16

Thanks Aurelien, It seems what I need.

Unfortunately I don't have it as a BC choice...

Code:


--> FOAM FATAL IO ERROR:
Unknown patchField type externalWallHeatFluxTemperature for patch type wall
Valid patchField types are :
66
(
advective
atmBoundaryLayerInletEpsilon
buoyantPressure
calculated
codedFixedValue
codedMixed
cyclic
cyclicAMI
cyclicSlip
directionMixed
empty
epsilonWallFunction
fan
fanPressure
fixedFluxPressure
fixedGradient
fixedInternalValue
fixedPressureCompressibleDensity
fixedValue
freestream
freestreamPressure
inletOutlet
inletOutletTotalTemperature
kappatJayatillekeWallFunction
kqRWallFunction
mapped
mappedField
mappedFixedInternalValue
mappedFixedPushedInternalValue
mixed
nonuniformTransformCyclic
nutLowReWallFunction
nutTabulatedWallFunction
nutURoughWallFunction
nutUSpaldingWallFunction
nutUWallFunction
nutkAtmRoughWallFunction
nutkRoughWallFunction
nutkWallFunction
omegaWallFunction
oscillatingFixedValue
outletInlet
outletMappedUniformInlet
partialSlip
processor
processorCyclic
rotatingTotalPressure
sliced
slip
symmetryPlane
syringePressure
timeVaryingMappedFixedValue
totalPressure
totalTemperature
turbulentHeatFluxTemperature
turbulentInlet
turbulentIntensityKineticEnergyInlet
turbulentMixingLengthDissipationRateInlet
turbulentMixingLengthFrequencyInlet
uniformDensityHydrostaticPressure
uniformFixedValue
uniformTotalPressure
waveSurfacePressure
waveTransmissive
wedge
zeroGradient
)
 
file: F:/TAPS/CFD/f900buoyw/0/T::boundaryField::walls from line 41 to line 45.
    From function fvPatchField<Type>::New(const fvPatch&, const DimensionedField<Type, volMesh>&, const dictionary&)
    in file /home/bmss/OpenFOAM/OpenFOAM-2.1/src/finiteVolume/lnInclude/fvPatchFieldNew.C at line 135.
FOAM exiting

I have to check whether in last releases its name has been changed. I'll post any progress.

danvica May 14, 2012 13:28

Well, I think externalWallHeatFluxTemperature is just for compressible solvers.

Is there any way to have it using buoyantBoussinesqPimpleFoam ?

wyldckat May 14, 2012 17:38

Greetings to all!

@Daniele:
Quote:

Originally Posted by danvica (Post 361017)
Well, I think externalWallHeatFluxTemperature is just for compressible solvers.

Try this:
Code:

compressible::externalWallHeatFluxTemperature
If you go to the tutorials folder and run (in MSys) this command:
Code:

grep -r 'compressible::' *
You'll see several other tutorials where this is explicitly defined.

Best regards,
Bruno

danvica May 15, 2012 00:53

Thanks Bruno.

Unfortunately, it still returns the same errror.

BTW, my BC is:

Code:

walls
    {
        type            compressible::externalWallHeatFluxTemperature;
        Ta              uniform 300;
        h              uniform 3;          // test value
        value          uniform 300;
    }

Do I need to include some object/class ? I checked the tutorials but I wasn't able to find any info.

Aurelien Thinat May 15, 2012 05:20

I think I was using this BC with a "BasicRhoThermo" for the fluid. If you are using a BasicPsiThermo it could lead to an error.

Try to use it by modifying a tutorial. If it works, you will have to change the source code or your solver.

danvica May 16, 2012 00:45

Just a small update.
I checked what's inside externalWallHeatFluxTemperature and basically it's what I need:

Code:

00222    forAll (*this, i)
00223    {
00224        if (q[i] > 0) //in
00225        {
00226            this->refGrad()[i] = q[i]/K(*this)()[i];
00227            this->refValue()[i] = 0.0;
00228            this->valueFraction()[i] = 0.0;
00229        }
00230        else //out
00231        {
00232            this->refGrad()[i] = 0.0;
00233            this->refValue()[i] = KDelta[i]*q[i] + patchInternalField()()[i];
00234            this->valueFraction()[i] = 1.0;
00235        }
00236    }

where q is defined as q = (Ta_ - *this)*h_;


So, based on the direction of the Heat flux (q), externalWallHeatFluxTemperature sets the right BC.

In order to reproduce this behavior I used groovyBC in this way:
Code:


walls
    {
        type groovyBC;
        value uniform 300;
        gradientExpression "gradT";
        fractionExpression "0";
        variables "Text=300;hc=10000;gradT=(Text-T)*hc;";
        timelines ();
    }

Note:
- I'm just considering an entering flux.
- I still have to understand what physical value has hc (normally, heat transfer coefficient). In my BC it groups K too, that I think it rappresent specific heat.
- hc=10000 is just a test value.

Any comment or suggestion would be helpfull, thanks.

nakor November 20, 2012 05:41

Hello,
I have some problem with externalWallHeatFluxTemperature which is not working properly with OF2.1.0
I can not switch to OF211 because GroovyBC is not working with this new version.

Thus, I tried to replace externalWallHeatFluxTemperature with a groovy boundary condition.
Code:

walls
    {
        type groovyBC;
        value uniform 300;
        gradientExpression "gradT";
        fractionExpression "0";
        variables "Text=300;hc=10000;gradT=(Text-T)*hc;";
        timelines ();
    }

This boundary condition seems to work, but I have to use hc=hext/lambda, and I am not sure why. Can someone explain this ?

I was also using wallexternalHF as an entering heat flux.
Could it be also done with groovyBC ?

curiosity December 17, 2012 04:06

Quote:

Originally Posted by danvica (Post 361017)
Well, I think externalWallHeatFluxTemperature is just for compressible solvers.

Is there any way to have it using buoyantBoussinesqPimpleFoam ?

Hi,

Im having the same problem... did anyone manage to compile this for an incompressible solver?

Thanks,

Paula


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