|
[Sponsors] | |||||
Modifying external heat loss coefficient from inside solver |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
Member
Nicole Andrew
Join Date: Sep 2014
Location: Pretoria, South Africa
Posts: 58
Rep Power: 13 ![]() |
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")
);
Code:
--> FOAM FATAL ERROR:
Parser Error for driver PatchValueExpressionDriver at "1.10-15" :"field rhoRef not existing or of wrong type"
"alphaEff*rhoRef*cp"
^^^^^^
-----------|
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))";
}
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? |
|
|
|
|
|
|
|
|
#2 |
|
Member
Akr
Join Date: Apr 2015
Location: India
Posts: 53
Rep Power: 12 ![]() |
I was trying to solve a similar problem using the groovyBC in BuoyantBoussinesqPimpleFOAM
Did u solve the problem? |
|
|
|
|
|
![]() |
| Tags |
| boundary condition, convection heat flux, groovybc, heat tranfer coefficient |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
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 |