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

Code for Nusselt number

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

Like Tree1Likes
  • 1 Post By Goutam

Reply
 
LinkBack Thread Tools Display Modes
Old   February 29, 2012, 12:20
Default Code for Nusselt number
  #1
Member
 
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 91
Rep Power: 3
Goutam is on a distinguished road
I have used the following code created by Johan Magnusson. It creates the tool NusseltCalc. Only problem is, when I run NusseltCalc then I got the error:

Command not found. Could you please help me?

I am adding the code as an attachment.
Attached Images
File Type: jpg 1.jpg (88.8 KB, 136 views)
File Type: jpg 2.jpg (92.1 KB, 125 views)
File Type: jpg 3.jpg (85.9 KB, 98 views)
File Type: jpg 4.jpg (78.6 KB, 86 views)
Goutam is offline   Reply With Quote

Old   March 1, 2012, 12:18
Default
  #2
Senior Member
 
Markus Rehm
Join Date: Mar 2009
Location: Erlangen (Germany)
Posts: 155
Rep Power: 6
markusrehm is on a distinguished road
Hi,

have you correctly compiled the tool? You need to do a "wmake", see the Wiki for more information on that topic.

Markus
markusrehm is offline   Reply With Quote

Old   March 1, 2012, 12:28
Default
  #3
Member
 
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 91
Rep Power: 3
Goutam is on a distinguished road
Dear Members,

This is the code for local Nusselt number:

volScalarField wall_localNusselt
(
IOobject
(
"wall_localNusselt",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("wall_localNusselt ",dimless,0.0)
);

forAll(wall_localNusselt.boundaryField(),patchi)
{
wall_localNusselt.boundaryField()[patchi] = length*patchHeatFlux[patchi]/((T_hot-T_ini)*k);
}

wall_localNusselt.write();
}

I want to write a code for Average Nusselt Number.
EhsanM likes this.

Last edited by Goutam; March 3, 2012 at 08:32.
Goutam is offline   Reply With Quote

Old   March 1, 2012, 12:48
Default Solved !!!
  #4
Member
 
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 91
Rep Power: 3
Goutam is on a distinguished road
The code was correct. NusseltCalc is working now.
Goutam is offline   Reply With Quote

Old   March 1, 2012, 13:07
Default Problem !!!
  #5
Member
 
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 91
Rep Power: 3
Goutam is on a distinguished road
How to calculate average Nusselt number?

Last edited by Goutam; March 3, 2012 at 08:03.
Goutam is offline   Reply With Quote

Old   March 2, 2012, 03:21
Default
  #6
Senior Member
 
Markus Rehm
Join Date: Mar 2009
Location: Erlangen (Germany)
Posts: 155
Rep Power: 6
markusrehm is on a distinguished road
DearGoutam,

I have not used the code but it would be helpful to see the error message.

Markus
markusrehm is offline   Reply With Quote

Old   March 2, 2012, 04:35
Default
  #7
Member
 
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 91
Rep Power: 3
Goutam is on a distinguished road
Looking for a response?

Last edited by Goutam; March 3, 2012 at 08:28.
Goutam is offline   Reply With Quote

Old   March 5, 2012, 07:10
Default
  #8
Senior Member
 
Markus Rehm
Join Date: Mar 2009
Location: Erlangen (Germany)
Posts: 155
Rep Power: 6
markusrehm is on a distinguished road
Hello Goutam,

please be a bit more precise. As far as I understand, the code you posted above calculates the patch-averaged Nusselt number.

Because patchHeatFlux should be the heat flux over the patch in [W/m2], right?

Markus
markusrehm is offline   Reply With Quote

Old   March 5, 2012, 07:16
Default Average Nusselt Number
  #9
Member
 
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 91
Rep Power: 3
Goutam is on a distinguished road
Dear Markus,

This code will calculate heat flux and Local Nusselt NUmber at each patch. I am using this code and its working properly.

If you want to calculate average Nusselt number, then just write in the terminal window:

patchAverage wall_localNusselt your_patch_name

You will get your average Nusselt number.

Cheers !!!

Last edited by Goutam; March 7, 2012 at 05:29.
Goutam is offline   Reply With Quote

Old   April 9, 2012, 08:27
Default How can I alter your code?
  #10
New Member
 
giovanni silva
Join Date: Jul 2010
Posts: 14
Rep Power: 4
giovanni10 is on a distinguished road
Quote:
Originally Posted by Goutam View Post
Dear Members,

This is the code for local Nusselt number:

volScalarField wall_localNusselt
(
IOobject
(
"wall_localNusselt",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("wall_localNusselt ",dimless,0.0)
);

forAll(wall_localNusselt.boundaryField(),patchi)
{
wall_localNusselt.boundaryField()[patchi] = length*patchHeatFlux[patchi]/((T_hot-T_ini)*k);
}

wall_localNusselt.write();
}

I want to write a code for Average Nusselt Number.
What does (T_hot-T_ini) stand for ?
-- wall_localNusselt.boundaryField()[patchi] = length*patchHeatFlux[patchi]/((T_hot-T_ini)*k); --

I want to calculate the localNusselt number at a wall which is called "right". I have a rectangular cavity which has 4 walls with the following names: bottom, right, left and top. So, the Nusselt number is calculated as the integration of dT/dx for limits from y=0 to 1, at x=0, which is the "right" wall.
How can I alter your code?
I am using an incompressible Magnetohydrodynamics` solver.
Thanks a lot for your help!
giovanni10 is offline   Reply With Quote

Reply

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
Mesh Refinement Luiz Eduardo Bittencourt Sampaio (Sampaio) OpenFOAM Mesh Utilities 41 January 17, 2013 02:43
Problem with decomposePar tool vinz OpenFOAM Pre-Processing 18 January 26, 2011 02:17
Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 July 15, 2005 04:15
What is the Better Way to Do CFD? John C. Chien Main CFD Forum 54 April 23, 2001 08:10
State of the art in CFD technology Juan Carlos GARCIA SALAS Main CFD Forum 39 November 1, 1999 14:34


All times are GMT -4. The time now is 02:44.