CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Convective Heat transfer in laplacianFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 24, 2018, 16:18
Default Convective Heat transfer in laplacianFoam
  #1
Member
 
Fridrik Magnusson
Join Date: Aug 2017
Location: Denmark
Posts: 34
Rep Power: 8
Fridrik is on a distinguished road
Hallo everyone

i'm simulating some fins in laplacianfoam, and would like to make a convective boundary condition, but i can't seem to find the right one to impose. Does anybody have any experience with such a BC - and can push me in the right direction ?

- Fridrik Magnusson
Fridrik is offline   Reply With Quote

Old   July 25, 2018, 04:49
Default Further investigation
  #2
Member
 
Fridrik Magnusson
Join Date: Aug 2017
Location: Denmark
Posts: 34
Rep Power: 8
Fridrik is on a distinguished road
Tobi [1] suggest to use "laserConvection"[2] but i dont really know what all the fields mean, if you guys has any ideas please fill me in

Code:
    myPatch
    {
        type            laserConvection; //Type of BC
        value           uniform 300;     //Unknown (maybe initial condition)

        HTCheating      150;             //Heat transfer cofficient at heating
        HTCquenching    150;             //Heat transfer cofficient at cooling

        TfH             300;             //Referance temperature at heating
        TfQ             300;             //Referance temperature at cooling 

        heatingTime     10;              //Unknown (maybe the start time of heating/cooling)
        kValue          0;               //Unknown (maybe constant conduction)
    };

[1] Mixed BC - heat transfer - laplacianFoam
[2] https://bitbucket.org/shor-ty/laserconvectionbc
Fridrik is offline   Reply With Quote

Old   July 25, 2018, 08:12
Default
  #3
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
Hi!


Have you seen the convectiveHeatTransfer... BC? I think this is for flat plate, but if you know your equation for the nusselt number in your case (if not a flat plate), you can simply create your BC based on it (Just rewrite the equation and compile it).

https://cpp.openfoam.org/v6/classFoa...d.html#details


BTW the 1st unknown ("value") is the initial condition. I don't know the others, but you can check them in the code. (the beauty of OF.)
simrego is offline   Reply With Quote

Old   July 25, 2018, 09:48
Default
  #4
Member
 
Fridrik Magnusson
Join Date: Aug 2017
Location: Denmark
Posts: 34
Rep Power: 8
Fridrik is on a distinguished road
Hi Simrego, i would like to decide the htc, then this might work. It seems like Nu, Re and Pr are calculated from a vectorfield, but im not that good at reading source files. Where does convectiveHeatTransfer get the Nu, Re and Pr from ?
Fridrik is offline   Reply With Quote

Old   July 25, 2018, 15:55
Default
  #5
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
Re and Pr are calculated from the velocity, mat props, etc.

Pr, Re: line 136, 143.
https://cpp.openfoam.org/v6/convecti...8C_source.html


Nu is the ration between convective and conductive heat transfer: Nu = h * L / k, which can be written as:
h = Nu * k / L
You use this equation in line 145-152. Where the Nu is some fancy function depending on Pr, and Re, and the end of the equation you can find that multiplication with kappa, and division with L. In the code you can find it for flat plate (i think, i'm not sure, you should check it). You can find Nu for many applications on the internet.
So if you have something else (not flat plate), you should rewrite the code between line 145-152.
simrego is offline   Reply With Quote

Old   July 25, 2018, 16:03
Default
  #6
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
Or i don't know what is your goal exactly, but maybe externalWallHeatFlux could be good for you:
https://cpp.openfoam.org/v6/classFoa...d.html#details
This is a boundary condition which can operate in three modes. Details in the link.
simrego is offline   Reply With Quote

Old   July 25, 2018, 16:28
Thumbs up Fixed h
  #7
Member
 
Fridrik Magnusson
Join Date: Aug 2017
Location: Denmark
Posts: 34
Rep Power: 8
Fridrik is on a distinguished road
Code:
dud
dud

Last edited by Fridrik; July 25, 2018 at 16:33. Reason: Double post
Fridrik is offline   Reply With Quote

Old   July 25, 2018, 16:29
Thumbs up Fixed h
  #8
Member
 
Fridrik Magnusson
Join Date: Aug 2017
Location: Denmark
Posts: 34
Rep Power: 8
Fridrik is on a distinguished road
Hi again Simrego, thanks for your suggestions.

I think it is possible to make a rewrite the "convectiveHeatTransfer" to get the "htc" from the ./0/T BC something from:

Code:
{
         label celli = patch().faceCells()[facei];
 
         scalar Re = rhow[facei]*mag(Uc[celli] - Uw[facei])*L_/muw[facei];
 
         if (Re < 5.0E+05)
         {
             htc[facei] = 0.664*sqrt(Re)*cbrt(Pr[facei])*kappaw[facei]/L_;
         }
         else
         {
             htc[facei] = 0.037*pow(Re, 0.8)*cbrt(Pr[facei])*kappaw[facei]/L_;
         }
}

to

Code:
{
         label celli = patch().faceCells()[facei];
         
             htc[facei] = Get constant from file; //psudocode
}
Do you know how i can make a "link" to another file ?

If i use the "externalWallHeatFlux" like this

Code:
    internalSurface
    {
        type            externalWallHeatFluxTemperature;
    mode        coefficient;

        Ta        uniform 273;         // fluid temperature
        h        uniform 2000;     //convective heat rate
    thicknessLayers (0.1 0.2 0.3 0.4);  //unknown
    kappaLayers    (1 2 3 4);        // unknown

    kappaMethod    fluidThermo;  // unknown (Seems to be the cause for error)

    value        uniform 300;    // initial value

    }


i get the following error:

Code:
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : 6-e05f780ebc87
Exec   : laplacianFoam
Date   : Jul 25 2018
Time   : 22:17:45
Host   : "fridrik-VirtualBox"
PID    : 1624
I/O    : uncollated
Case   : /home/fridrik/OpenFOAM/HeatTransfer/Bracket
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: No convergence criteria found

Reading field T

Reading transportProperties

Reading diffusivity DT

No finite volume options present

Calculating temperature distribution

Time = 0.005

--> FOAM FATAL ERROR: 
kappaMethod 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 171.

FOAM exiting
What does this error mean ?
Fridrik is offline   Reply With Quote

Old   July 25, 2018, 16:52
Default
  #9
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
1. what do you mean under "link to another file"?


2. You use laplacianFoam, you have no thermo package there.
Now I'm a bit lost, didn't noticed it cannot be used in laplacianFoam. The not so elegant but working solution can be if you use chtMultiRegion with only one region (maybe there are other solutions too)


3. I should did it much much earlier, but what is your problem description? What do you have, what do you want, etc.
simrego is offline   Reply With Quote

Old   July 26, 2018, 13:52
Default
  #10
Member
 
Fridrik Magnusson
Join Date: Aug 2017
Location: Denmark
Posts: 34
Rep Power: 8
Fridrik is on a distinguished road
ill start from the back

3. I want to make a code which can generate the best cross sectional fin array, which must remain closed. By utilizing topology optimization.



Since working with very limited computational power. The i think the best starting point is to just solve the steady state heat equation for a 2-D cross section. Where the boundary convective condition is based on empirical approximations [Nu(Re,Pr)].
Step one will be to solve a basic case, by applying the correct BC which is what we are discussing
Step two will be to setup the topological stuff (which is really hard)

2. Ill look into using chtMultiRegion instead of laplacianFoam

1. i mean i want to reference to a constant maybe in transportProperties.

I hope this makes sense
Fridrik is offline   Reply With Quote

Reply

Tags
boundary condition, convection, thermal analysis


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
Thermal non-equilibrium porous media model with conjugate heat transfer Hexahedron FLUENT 9 February 22, 2023 02:55
Interphase mass transfer of a reaction cfx_ws1992 Main CFD Forum 0 May 15, 2017 21:42
Error - Solar absorber - Solar Thermal Radiation MichaelK CFX 12 September 1, 2016 05:15
(Convective Heat Transfer Coefficient) idefix STAR-CCM+ 0 July 27, 2016 05:18
Convective & conductive heat transfer gimmetwofingers OpenFOAM 7 January 31, 2012 09:36


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