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

How can I calculate T gradient

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 30, 2014, 11:13
Default
  #1
Member
 
sajad
Join Date: Apr 2014
Location: Iran
Posts: 36
Rep Power: 3
sajad6 is on a distinguished road
hi
I make gradient boundry for T as below:

Code:
 /*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.0.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    location    "0";
    object      gradient;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 -1 0 1 0 0 0];

internalField   uniform (0,0,0);

boundaryField
{
    floor
    {
        type            zeroGradient;
    }
    ceiling
    {
        type            zeroGradient;
    }
    inlet
    {
        type            fixedValue;
        value           uniform (0,0,0);
    }
    outlet
    {
        type            zeroGradient;
    }
    block
    {
        type            fixedValue;
        value           uniform (30,30,30);
    }
    frontback
    {
        type            empty;
    }
}
but when I run your solution I face with this error:

Code:
 /*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.1.0-0bc225064152
Exec   : wallGradT
Date   : Oct 30 2014
Time   : 18:43:10
Host   : "sajad-pc"
PID    : 13235
Case   : /home/sajad/Desktop/heatedCavity
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0



--> FOAM FATAL IO ERROR: 
wrong token type - expected Scalar, found on line 20 the punctuation token ','

file: /home/sajad/Desktop/heatedCavity/0/gradient::internalField at line 20.

    From function operator>>(Istream&, Scalar&)
    in file lnInclude/Scalar.C at line 91.

FOAM exiting
where is problem?

---------

edit: How can I set boundry for gradientT?

-----------

edit 2: how can I calculate gradT in wall?

Last edited by wyldckat; November 1, 2014 at 15:45. Reason: posted a few minutes apart... and added [CODE][/CODE] markers
sajad6 is offline   Reply With Quote

Old   November 1, 2014, 15:48
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi sajad6,

When it comes to OpenFOAM, every single detail, no matter how small, is more important than you might want to believe.

The error is related to the lines that are defined like this:
Code:
 value           uniform (0,0,0);
The correct way to do this in OpenFOAM is like this:
Code:
 value           uniform (0 0 0);
In other words, by using spaces instead of commas, for separating values in a vector.

Best regards,
Bruno

PS: When posting code and/our text output from a solver or utility, or the contents of a folder, please follow the instructions given here: Posting code and output with [CODE]
wyldckat 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
Gradient Computation: finite differences and adjoint method doan.nak SU2 1 June 24, 2014 16:37
calculate gradient tension in udf mohsenz_136 Fluent UDF and Scheme Programming 1 January 5, 2013 04:15
WSS and normal velocity gradient for the slanted pipe wanna88 FLUENT 2 October 1, 2012 22:34
Temperature Gradient at Wall sven OpenFOAM 7 November 1, 2010 18:25
calculate the temperature gradient on a profile arther FLUENT 0 April 19, 2006 23:12


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