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

Writing a wallGradT

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 19, 2010, 09:38
Default Writing a wallGradT
  #1
New Member
 
Join Date: Oct 2010
Posts: 3
Rep Power: 16
Frithjof is on a distinguished road
Hello fellow openfoam-users,

I'm trying to modify wallGradU to write the sn-gradient of scalar T at the wall calculated by scalarTransportFoam.

It seems to be very straightforward, it compiles and runs but I want to make sure the results are correct.
Here is what I did:

Im creating an IOObject,
and an object wallGradT:
Code:
            volScalarField wallGradT
            (
                IOobject
                (
                    "wallGradT",
                    runTime.timeName(),
                    mesh,
                    IOobject::NO_READ,
                    IOobject::AUTO_WRITE
                ),
                mesh,
                dimensionedScalar
                (
                    "wallGradT",
                    T.dimensions()/dimLength,
                    0
                )
            );
and calculating the surface-normal gradient just as in wallGradU:
Code:
wallGradT.boundaryField()[patchi] = -T.boundaryField()[patchi].snGrad();
Is this the right way?
I want to make sure I'm getting correct results..

Thanks in advance!
Frithjof is offline   Reply With Quote

Old   November 20, 2010, 10:47
Default
  #2
Senior Member
 
David Boger
Join Date: Mar 2009
Location: Penn State Applied Research Laboratory
Posts: 146
Rep Power: 17
boger is on a distinguished road
That looks believable. You can find almost the same logic in applications/utilities/postProcessing/wall/wallGradU/wallGradU.C
__________________
David A. Boger
boger 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
solid to fluid heattransfer with chtMultiRegionFoam nakor OpenFOAM 11 March 21, 2011 09:28
Writing data from monitors L3munoz FLUENT 0 July 24, 2009 06:27
An error has occurred when Writing backup file tian CFX 0 June 28, 2007 22:29
journal file command for writing mass flow rate James FLUENT 0 July 26, 2006 11:51
Fatal error error writing to tmp No space left on device maka OpenFOAM Installation 2 April 3, 2006 09:48


All times are GMT -4. The time now is 23:04.