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

Local Nusselt Number Calculation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 12, 2019, 11:25
Default Local Nusselt Number Calculation
  #1
Member
 
Join Date: Apr 2019
Location: India
Posts: 81
Rep Power: 7
Pavithra is on a distinguished road
Hello Everyone,

I am trying to calculate the local nusselt number along the bottom of a cavity heated from below. Based on inputs from several posts, I have tried to modify buoyantBoussinessqPimpleFoam to calculate temperature gradient.

But, I am not sure if my procedure is right. Also I do not how to calculate the local Nusselt number. The values of grad T are unphysical.

Kindly please help me solve this problem. I have attached the modified solver and a testCase. I am using OpenFOAM v6.

The method of calculation of temperature gradient is as given below, which is added in the main file heatFoam.C
Code:
//wallGrad
         
        const fvPatchList& patches = mesh.boundary();

            forAll(wallGradT.boundaryField(), patchi)
            {
                const fvPatch& currPatch = patches[patchi];

                if (isA<wallFvPatch>(currPatch))
                {
                    wallGradT.boundaryFieldRef()[patchi] =
                        -T.boundaryFieldRef()[patchi].snGrad();
                }
            }
I add the following to the createFields.H
Code:
volScalarField wallGradT
            (
                IOobject
                (
                    "wallGradT",
                    runTime.timeName(),
                    mesh,
                    IOobject::NO_READ,
                    IOobject::AUTO_WRITE
                ),
                mesh,
                dimensionedScalar
                (
                    "wallGradT",
                    T.dimensions()/dimLength,
                    0
                )
            );
Thank You.

With Thanks & Regards,
Pavithra.
Attached Files
File Type: gz heatFoam.tar.gz (3.4 KB, 9 views)
File Type: gz hotRoom.tar.gz (2.4 KB, 4 views)
Pavithra is offline   Reply With Quote

Old   September 4, 2019, 11:28
Default
  #2
Senior Member
 
Hojatollah Gholami
Join Date: Jan 2019
Posts: 171
Rep Power: 7
Hgholami is on a distinguished road
Quote:
Originally Posted by Pavithra View Post
Hello Everyone,

I am trying to calculate the local nusselt number along the bottom of a cavity heated from below. Based on inputs from several posts, I have tried to modify buoyantBoussinessqPimpleFoam to calculate temperature gradient.

But, I am not sure if my procedure is right. Also I do not how to calculate the local Nusselt number. The values of grad T are unphysical.

Kindly please help me solve this problem. I have attached the modified solver and a testCase. I am using OpenFOAM v6.

The method of calculation of temperature gradient is as given below, which is added in the main file heatFoam.C
Code:
//wallGrad
         
        const fvPatchList& patches = mesh.boundary();

            forAll(wallGradT.boundaryField(), patchi)
            {
                const fvPatch& currPatch = patches[patchi];

                if (isA<wallFvPatch>(currPatch))
                {
                    wallGradT.boundaryFieldRef()[patchi] =
                        -T.boundaryFieldRef()[patchi].snGrad();
                }
            }
I add the following to the createFields.H
Code:
volScalarField wallGradT
            (
                IOobject
                (
                    "wallGradT",
                    runTime.timeName(),
                    mesh,
                    IOobject::NO_READ,
                    IOobject::AUTO_WRITE
                ),
                mesh,
                dimensionedScalar
                (
                    "wallGradT",
                    T.dimensions()/dimLength,
                    0
                )
            );
Thank You.

With Thanks & Regards,
Pavithra.
Dear Pavithra
Nu=hL/K Nusselt number calculated based on the definition. In some article uses Nu=-wallGradT/(T-T_init)*L (L or D_h) and for that, you can use paraview and calculator for definition. Or uses swak4Foam in controlDic
Quote:
NusseltNumber
{
functionObjectLibs
("libsimpleSwakFunctionObjects.so");
type patchExpression;
outputControlMode timeStep;
outputInterval 1;
patches(wall);
verbose true;
variables
(
"T_inf=300;"
"D=0.00762;"
);
expression "D*snGrad(T)/(T-T_inf)";
accumulations (average);
log true;
}
or
code base on this topic
Quote:
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.boundaryFieldRef(),patchi )
{
wall_localNusselt.boundaryFieldRef()[patchi] = wallGradT[patchi]/((T_hot-T_ini)*length);
}

wall_localNusselt.write();
}
Hgholami is offline   Reply With Quote

Old   September 23, 2019, 02:16
Default
  #3
Member
 
Join Date: Apr 2019
Location: India
Posts: 81
Rep Power: 7
Pavithra is on a distinguished road
Quote:
Originally Posted by Hgholami View Post
Dear Pavithra
Nu=hL/K Nusselt number calculated based on the definition. In some article uses Nu=-wallGradT/(T-T_init)*L (L or D_h) and for that, you can use paraview and calculator for definition. Or uses swak4Foam in controlDic

or
code base on this topic

Dear Sir,



Thank You somuch for your help and sorry for the late reply. I have used a similar method to calculate the Nusselt number.



Thank You once again.



- Pavithra
Pavithra is offline   Reply With Quote

Old   November 22, 2020, 21:43
Default Help
  #4
New Member
 
Raul Cesar de Andrade Soares
Join Date: Jul 2020
Posts: 1
Rep Power: 0
Raul Cesar is on a distinguished road
Quote:
Originally Posted by Pavithra View Post
Dear Sir,



Thank You somuch for your help and sorry for the late reply. I have used a similar method to calculate the Nusselt number.



Thank You once again.



- Pavithra
Could you give me the solver files with Nusselt's calculation? Did you have to change anything in the controldict? I also need to calculate the nusselt for the BuoyantBoussinesqPimpleFoam solver.
Raul Cesar is offline   Reply With Quote

Reply


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
pimpleDyMFoam computation randomly stops babapeti OpenFOAM Running, Solving & CFD 5 January 24, 2018 06:28
SigFpe when running ANY application in parallel Pj. OpenFOAM Running, Solving & CFD 3 April 23, 2015 15:53
Compressor Simulation using rhoPimpleDyMFoam Jetfire OpenFOAM Running, Solving & CFD 107 December 9, 2014 14:38
Micro Scale Pore, icoFoam gooya_kabir OpenFOAM Running, Solving & CFD 2 November 2, 2013 14:58
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 16:33


All times are GMT -4. The time now is 17:03.