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

 June 23, 2009, 13:48 Temperature Gradient at Wall #1 Member   Sven Winkler Join Date: May 2009 Posts: 70 Rep Power: 9 I am simulating a laminar channel flow with heated walls. To calculate y nusselt number I first want to calculate the temperature gradient at the wall. Unfortunately I couldnt find some function similar to "WallGradU" which is able to calculate the wall temperature gradient, like "WallGradU" does it for the velocity gradient. Has anyone an idea how I could get the temperature gradient out of OpenFOAM? Can the "WallGradU" function be edited to get the temperature gradient?

 June 23, 2009, 22:18 #2 Member   Jitao Liu Join Date: Mar 2009 Location: Jinan , China Posts: 64 Rep Power: 9 Hi sven, I am interested in this problem too. I am new to OpenFOAM. I want to simulate the filling process of non-newtonian fluids into a heated cavity.The energy equation was added to the interFoam solver to calculate the temperature field. At the heated wall: 1) The temperature of non-newtonian fluid is assumed equal to the wall's (in my case，the thermal conductivity of the wall is much larger than that of the non-newtonian fluid ). 2) A coupled solver such as chtMultiRegionFoam can be created to solve this problem. Combination of heatConductionFoam and interHeatFoam (interFoam with energy equation) for conjugate heat transfer between a solid region and fluid region. I am working on the second part. If there is any development, please let me know. Best regards, Jitao Last edited by awacs; July 20, 2009 at 04:42.

June 24, 2009, 04:27
#3
Senior Member

Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 10
Hi Sven,

Make a copy of wallGradU, replace U with T, volVectorField with volScalarField and dimensionedVector with dimensionedScalar. It should work!

Regards,
Jose Santos

Quote:
 Originally Posted by sven I am simulating a laminar channel flow with heated walls. To calculate y nusselt number I first want to calculate the temperature gradient at the wall. Unfortunately I couldnt find some function similar to "WallGradU" which is able to calculate the wall temperature gradient, like "WallGradU" does it for the velocity gradient. Has anyone an idea how I could get the temperature gradient out of OpenFOAM? Can the "WallGradU" function be edited to get the temperature gradient?

 June 24, 2009, 12:16 #4 Member   Sven Schweikert Join Date: Jun 2009 Posts: 38 Rep Power: 9 Hi Santos - thanks for your reply. I have the same intention like sven and tried your advise. Sadly I received some errors while creating the new wallGradT: Line 80 - error: Expected primary-expressions before '(' token Line 83 - error: 'scalar' is not a class of namespace PHP Code: ``` #include "fvCFD.H"// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //int main(int argc, char *argv[]){    timeSelector::addOptions();    #include "setRootCase.H"#   include "createTime.H"    instantList timeDirs = timeSelector::select0(runTime, args);#   include "createMesh.H"    forAll(timeDirs, timeI)    {        runTime.setTime(timeDirs[timeI], timeI);        Info<< "Time = " << runTime.timeName() << endl;        IOobject Theader        (            "T",            runTime.timeName(),            mesh,            IOobject::MUST_READ        );        // Check U exists        if (Theader.headerOk())        {            mesh.readUpdate();            Info<< "    Reading T" << endl;            volScalarField T(Theader, mesh);            Info<< "    Calculating wallGradT" << endl;            volScalarField wallGradT            (                IOobject                (                    "wallGradT",                    runTime.timeName(),                    mesh,                    IOobject::NO_READ,                    IOobject::AUTO_WRITE                ),                mesh,                dimensionedScalar                (                                                 <- line 80                    "wallGradT",                    T.dimensions()/dimLength,                    scalar::zero                              <- line 83                )            );            forAll(wallGradT.boundaryField(), patchi)            {                wallGradT.boundaryField()[patchi] =                    -T.boundaryField()[patchi].snGrad();            }            wallGradT.write();        }        else        {            Info<< "    No T" << endl;        }    }    Info<< "End" << endl;    return 0;}  ``` I am an absolutely beginner and I didn't find a solution for these errors so far. About some additional help I would be really helpful. Thanks a lot & regards svens

 June 24, 2009, 12:20 #5 Senior Member     Jose Luis Santos Join Date: Mar 2009 Location: Portugal Posts: 215 Rep Power: 10 Replace scalar::zero with 0 and all should be well. Regards, Jose Santos Hamoon and stathisk like this.

 June 24, 2009, 15:23 #6 Member   Sven Schweikert Join Date: Jun 2009 Posts: 38 Rep Power: 9 It works! Perfect - thanks so much.

 July 23, 2010, 05:04 #7 Senior Member   n/a Join Date: Sep 2009 Posts: 198 Rep Power: 9 Question: I am able to compute the mean temperature gradient at a specified patch of my choosing. The is essentially 3D, hence the I have a 2D plane wall temperature gradient. Can anyone give me any feedback or advice as to how I can average the temperature gradient along a wall direction, so that I end with an output that comprises two columns such as: x dTmean/dn x1 ***** x2 ***** Thanks. Deji

November 1, 2010, 18:25
#8
Member

Join Date: Nov 2009
Posts: 48
Rep Power: 9
Hello Jitao,

I would like to know if you were successful with your implementation. I am interested in such a coupled solver ( combination of heatConductionFoam and interHeatFoam ). I would be so grateful if you can help me.

Thanks,

Mehran

Quote:
 Originally Posted by awacs Hi sven, I am interested in this problem too. I am new to OpenFOAM. I want to simulate the filling process of non-newtonian fluids into a heated cavity.The energy equation was added to the interFoam solver to calculate the temperature field. At the heated wall: 1) The temperature of non-newtonian fluid is assumed equal to the wall's (in my case，the thermal conductivity of the wall is much larger than that of the non-newtonian fluid ). 2) A coupled solver such as chtMultiRegionFoam can be created to solve this problem. Combination of heatConductionFoam and interHeatFoam (interFoam with energy equation) for conjugate heat transfer between a solid region and fluid region. I am working on the second part. If there is any development, please let me know. Best regards, Jitao

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Daniel Tanner FLUENT 6 September 20, 2015 13:10 shoeb CD-adapco 2 November 30, 2004 14:44 Andrea CFX 2 October 11, 2004 05:12 jwt FLUENT 0 August 17, 2002 08:17 J.W.Ryu FLUENT 5 December 27, 2001 07:39

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