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

[swak4Foam] groovyBC for defining heat influx at the boundary

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 25, 2014, 02:06
Default groovyBC for defining heat influx at the boundary
  #1
New Member
 
Delstat
Join Date: Apr 2013
Posts: 15
Rep Power: 12
pradeepramesh is on a distinguished road
Hi ,

I am using laplacianfoam for a heat-block case. I have gone thru the discussion - "Mixed BC - heat transfer - laplacianFoam"
http://www.cfd-online.com/Forums/ope...acianfoam.html.

From the forum discussions - "externalWallHeatFluxTemperature" and "groovyBC" were pointed out.

I am interested to apply heat influx at the boundary wall.Please find the attached snapshot for more info.

How to apply "groovyBC" for defining heat influx at the boundary in a heat-block?

Thank you,
Pradeep
Attached Images
File Type: jpg GroovyBC influx.JPG (65.7 KB, 107 views)
pradeepramesh is offline   Reply With Quote

Old   August 25, 2014, 18:38
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by pradeepramesh View Post
Hi ,

I am using laplacianfoam for a heat-block case. I have gone thru the discussion - "Mixed BC - heat transfer - laplacianFoam"
http://www.cfd-online.com/Forums/ope...acianfoam.html.

From the forum discussions - "externalWallHeatFluxTemperature" and "groovyBC" were pointed out.

I am interested to apply heat influx at the boundary wall.Please find the attached snapshot for more info.

How to apply "groovyBC" for defining heat influx at the boundary in a heat-block?

Thank you,
Pradeep
With "fractionExpression '0'" you're on the right track. What gradientExpression is supposed to to be depends on your physics (which heat-flux you want to prescribe). Rewrite it so that you get an expression "dT/dx = ....". Then you'll just have to take what is on the right hand side of that expression and write it down as a groovyBC-expression (Note: x in this case is not the x in the cartesian coordinates but normal to the wall)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   August 25, 2014, 23:33
Default
  #3
New Member
 
Delstat
Join Date: Apr 2013
Posts: 15
Rep Power: 12
pradeepramesh is on a distinguished road
Thank you very much Bernhard
pradeepramesh is offline   Reply With Quote

Old   August 26, 2014, 01:02
Default
  #4
New Member
 
Delstat
Join Date: Apr 2013
Posts: 15
Rep Power: 12
pradeepramesh is on a distinguished road
Dear Bernhard,

For a case, flux is ------------>>>> q = -(k) * (dT/dx)

(dT/dx) = - q /k

We have :

"q" is the heat flux : q = 10 (W/m2),

"k" is the thermal Conductivity of the material : k = 200 (W/mK)


HTML Code:
Outwall
{
        type                          groovyBC;
        value                         uniform 293;
        gradientExpression 	 “(-q)/k";
        fractionExpression 	 "0";
        variables 			 “q=10;k=200";
}
I would like request your feedback on the above mentioned BC.

Thank you!
pradeepramesh is offline   Reply With Quote

Old   August 26, 2014, 09:12
Default
  #5
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by pradeepramesh View Post
Dear Bernhard,

For a case, flux is ------------>>>> q = -(k) * (dT/dx)

(dT/dx) = - q /k

We have :

"q" is the heat flux : q = 10 (W/m2),

"k" is the thermal Conductivity of the material : k = 200 (W/mK)


HTML Code:
Outwall
{
        type                          groovyBC;
        value                         uniform 293;
        gradientExpression 	 “(-q)/k";
        fractionExpression 	 "0";
        variables 			 “q=10;k=200";
}
I would like request your feedback on the above mentioned BC.

Thank you!
That should work. Sign depends on your definition of the flux.

I usually limit myself to answers about the technical aspects of swak4Foam. Physics is your own responsibility
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   August 26, 2014, 20:54
Default
  #6
New Member
 
Delstat
Join Date: Apr 2013
Posts: 15
Rep Power: 12
pradeepramesh is on a distinguished road
Thank you very much. It worked!
pradeepramesh is offline   Reply With Quote

Old   November 13, 2014, 23:34
Default
  #7
New Member
 
Chris Ostrom
Join Date: Jul 2014
Posts: 4
Rep Power: 11
costrom is on a distinguished road
would it be possible to use a 'q' file that is the output from a different solver instead of defining one constant value for q on the boundary?
costrom is offline   Reply With Quote

Old   November 14, 2014, 06:01
Default
  #8
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by costrom View Post
would it be possible to use a 'q' file that is the output from a different solver instead of defining one constant value for q on the boundary?
Currently no. Unless the data is a 1D-function q(s). Then you can use a lookup

I've explained it a number of times in different places: it is not THAT easy to do it in a general way (fileformats, different discretizations, error handling, parallel etc)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   November 14, 2014, 06:52
Default
  #9
New Member
 
Chris Ostrom
Join Date: Jul 2014
Posts: 4
Rep Power: 11
costrom is on a distinguished road
I apologize for asking a question that has been answered elsewhere, but...

I have a qMean file resulting from a dsmcFoam run, and I would like to use the heat fluxes from that as a boundary condition for a laplacianFoam runcase. is this currently possible in openFOAM 2.3.x without editing the *.h, *.c files?
costrom is offline   Reply With Quote

Old   November 14, 2014, 08:16
Default
  #10
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by costrom View Post
I apologize for asking a question that has been answered elsewhere, but...

I have a qMean file resulting from a dsmcFoam run, and I would like to use the heat fluxes from that as a boundary condition for a laplacianFoam runcase. is this currently possible in openFOAM 2.3.x without editing the *.h, *.c files?
I'm not familiar with that solver. qMean is average in time or average in space as a function of time or space?

Depending on that timeVaryingMappedFixedValue might be able to help you
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   January 14, 2019, 07:38
Default
  #11
Senior Member
 
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 7
calf.Z is on a distinguished road
Quote:
Originally Posted by gschaider View Post
With "fractionExpression '0'" you're on the right track. What gradientExpression is supposed to to be depends on your physics (which heat-flux you want to prescribe). Rewrite it so that you get an expression "dT/dx = ....". Then you'll just have to take what is on the right hand side of that expression and write it down as a groovyBC-expression (Note: x in this case is not the x in the cartesian coordinates but normal to the wall)
Thank you for your hints. If my case doesn't consider the materials of the Wall, just having the internal mesh in fluid, how should I know about k and dT/dx? I want to give the constant heat flux on wall and I just know q. Thank you.
calf.Z is offline   Reply With Quote

Old   January 15, 2019, 06:47
Default
  #12
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by calf.Z View Post
Thank you for your hints. If my case doesn't consider the materials of the Wall, just having the internal mesh in fluid, how should I know about k and dT/dx? I want to give the constant heat flux on wall and I just know q. Thank you.

There are boundary conditions that implement constant heat-flux in OpenFOAM. If your heat-flux has no spatial or temporal distribution then I'd recommend using these.
If you want to/have to use groovyBC the heat conductivity of the fluid is sufficient information to calculate the temperature gradient
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   January 15, 2019, 22:55
Default
  #13
Senior Member
 
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 7
calf.Z is on a distinguished road
Quote:
Originally Posted by gschaider View Post
There are boundary conditions that implement constant heat-flux in OpenFOAM. If your heat-flux has no spatial or temporal distribution then I'd recommend using these.
If you want to/have to use groovyBC the heat conductivity of the fluid is sufficient information to calculate the temperature gradient
Thank you for your reply.

I think I know the thermo conductivity of fluid in my case but I am using tabular method to get these thermopropertities. So kappa is changing with T and P and read from tabulated table.

And I am using externalWallHeatFluxTemperature BC to give the constant heat flux. But I am not sure if kappaMethod : fluidThermo is suitable for my case.

I use wallHeatFlux to check the heat flux after simulation. The result is far diffrernt from the setting one. But when I use #include wallHeatFlux to check heat flux during running, it give other heat flux values which are closer to the setting one in BC.
So I am confused about the different behaviors of the utility. I just use it in different moments and it gives me different values.

Any hint is highly appreciated.
calf.Z is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Centrifugal fan j0hnny CFX 13 October 1, 2019 14:55
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 06:21
natural convection mehrdadeng CFX 10 February 25, 2011 06:25
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 05:05
CFX doesn't continue calculation... mactech001 CFX 6 November 15, 2009 22:25


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