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

Modifying external heat loss coefficient from inside solver

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

Reply
 
LinkBack Thread Tools 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: 4
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): Mixed BC - heat transfer - laplacianFoam). 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, 02:14
Default Hi
  #2
Member
 
Akr
Join Date: Apr 2015
Location: India
Posts: 52
Rep Power: 3
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, 02:21
Default
  #3
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 1,163
Rep Power: 20
akidess will become famous soon enough
objectRegistry::lookupObject<scalar>
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
*Join the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oHPxcPqde7HtA2
akidess is offline   Reply With Quote

Reply

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

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
external wall heat transfer ashghan OpenFOAM Pre-Processing 16 October 27, 2015 21:29
Setting the height of the stream in the free channel kevinmccartin CFX 10 July 9, 2015 21:36
Convective heat loss out of a solar receiver construction Lionel Trébuchon CFX 10 April 6, 2014 20:25
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 06:28
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 16:55


All times are GMT -4. The time now is 07:55.