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

Modifying external heat loss coefficient from inside solver

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 18, 2015, 07:37
Default Modifying external heat loss coefficient from inside solver
  #1
Member
 
Nicole Andrew
Join Date: Sep 2014
Location: Pretoria, South Africa
Posts: 58
Rep Power: 12
Nicole is on a distinguished road
Hello foamers!

I have been searching and cannot figure out a solution to my problem.

I have a fixed domain, with no flow in or out that is heated by a volScalarField heat source (calculated in a separate solver for now) which I have added to TEqn in buoyantBoussinesqPimpleFoam.

I need a heat loss on the one face that is a function of the temperature in the cell below it, so I'd like to use either groovyBC or externalWallHeatFluxTemperature to calculate the heat flux (thanks to Raimonds Vilums for explaining a better way to formulate this in groovyBC here (see #19): http://www.cfd-online.com/Forums/ope...acianfoam.html). The challenge (I can't understand why this has been such a challenge!) is that I need to be able to update the heat transfer coefficient while my solver is running, so that I can enforce energy conservation (I am just solving for steady state but I have found the pimple solver much more stable).

I have added some variables to the createFields file to be read in from transportProperties as follows:

Code:
    IOdictionary transportProperties
    (
        IOobject
        (
            "transportProperties",
            runTime.constant(),
            mesh,
            IOobject::MUST_READ_IF_MODIFIED,
            IOobject::NO_WRITE
        )
    );

    dimensionedScalar rhoRef
    (
        transportProperties.lookup("rhoRef")
    );
However, when I try and call one of these variables in groovyBC I get the following error message:

Code:
--> FOAM FATAL ERROR: 
 Parser Error for driver PatchValueExpressionDriver at "1.10-15" :"field rhoRef not existing or of wrong type"
"alphaEff*rhoRef*cp"
           ^^^^^^
-----------|
I implemented the following boundary condition in the 0/T file:
Code:
    {
        type                groovyBC;
        variables          "htot=100.0;Tinf=393.0;cp=385.0;k=alphaEff*rhoRef*cp;";
        valueExpression     "Tinf";
        fractionExpression  "1.0/(1.0 + k/(mag(delta())*htot))";
    }
QUESTIONS:
I was hoping that I would be able to add the heat transfer coefficient to transportProperties, read it like I have for rhoRef and update it in my solver and have my solution. Is this feasible? If so, does anyone have any idea why I am getting this error message when I try to use rhoRef?

If this seems like a bad idea, can anyone suggest a better way to modify the heat transfer coefficient from inside the solver?
Nicole is offline   Reply With Quote

Old   April 7, 2016, 03:14
Default Hi
  #2
Member
 
Akr
Join Date: Apr 2015
Location: India
Posts: 53
Rep Power: 11
NightWing is on a distinguished road
I was trying to solve a similar problem using the groovyBC in BuoyantBoussinesqPimpleFOAM

Did u solve the problem?
NightWing is offline   Reply With Quote

Old   April 7, 2016, 03:21
Default
  #3
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
http://www.cfd-online.com/Forums/ope...ct-scalar.html
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Reply

Tags
boundary condition, convection heat flux, groovybc, heat tranfer coefficient


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
Setting the height of the stream in the free channel kevinmccartin CFX 12 October 13, 2022 22:43
external wall heat transfer ashghan OpenFOAM Pre-Processing 16 October 27, 2015 21:29
Convective heat loss out of a solar receiver construction Lionel Trébuchon CFX 10 April 6, 2014 21:25
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 07:28
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 16:55


All times are GMT -4. The time now is 13:04.