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

nuTilda profile Boundary Condition issue

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

Like Tree2Likes
  • 1 Post By dferrando
  • 1 Post By dferrando

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 28, 2017, 06:24
Default nuTilda profile Boundary Condition issue
  #1
New Member
 
Diego Ferrando
Join Date: Mar 2017
Location: Zaragoza
Posts: 19
Rep Power: 9
dferrando is on a distinguished road
Hi Foamer.
I'm testing a SpalartAllmaras RANS case, with velocity profile and nuTilda profile at the inlet. U fixedProfile works well but when i try to set this BC in nuTilda, OF brings me the next error.
Code:
--> FOAM FATAL ERROR: 
3(1 2 3) does not have the expected length of 1


    From function Foam::Function1Types::CSV<Type>::CSV(const Foam::word&, const Foam::dictionary&, const Foam::word&) [with Type = double]
    in file lnInclude/CSV.C at line 221.

FOAM exiting
Here are my U, Uprofile.csv, nuTilda and nuTildaProfile.csv:

U:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.x                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform (0 0 0);

boundaryField
{
    in
    {
        type            fixedProfile;
        profile         csvFile;

        profileCoeffs
        {
                nHeaderLine         0;          // number of header lines
                refColumn           0;          // reference column index
                componentColumns    (1 2 3);    // component column indices
                separator           ",";        // optional (defaults to ",")
                mergeSeparators     no;         // merge multiple separators
                fileName            "0/Uprofile.csv";  // name of csv data file
                outOfBounds         clamp;      // optional out-of-bounds handling
                interpolationScheme linear;     // optional interpolation scheme
        }
        direction        (0 0 1);
        origin           0;
    }

    out
    {
        type            pressureInletOutletVelocity;
        value           uniform (0 0 0);
    }

    laterales
    {
        type            noSlip;
    }

    techo
    {
        type            noSlip;
    }

    suelo
    {
        type            noSlip;
    }

    bloque
    {
        type            noSlip;
    }
}

// ************************************************************************* //
Uprofile.csv:
Code:
0,0,0,0
0.006,2.745,0,0
0.012,2.935,0,0
0.024,3.175,0,0
0.048,3.435,0,0
0.072,3.627,0,0
0.096,3.824,0,0
0.12,4.021,0,0
0.144,4.21,0,0
0.168,4.362,0,0
0.192,4.491,0,0
0.198,4.502,0,0
0.204,4.586,0,0
0.216,4.606,0,0
0.228,4.712,0,0
0.252,4.854,0,0
0.276,4.993,0,0
0.3,5.132,0,0
0.36,5.449,0,0
0.42,5.782,0,0
0.48,6.077,0,0
0.54,6.338,0,0
0.6,6.588,0,0
0.66,6.693,0,0
0.72,6.751,0,0
0.88,6.751,0,0
nuTilda:
Code:
*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.x                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform 0.3;

boundaryField
{

    in
    {
        type            fixedProfile;
        profile         csvFile;

        profileCoeffs
        {
                nHeaderLine         0;          // number of header lines
                refColumn           0;          // reference column index
                componentColumns    (1 2 3);    // component column indices
                separator           ",";        // optional (defaults to ",")
                mergeSeparators     no;         // merge multiple separators
                fileName            "0/nuTildaProfile.csv";  // name of csv data file
                outOfBounds         clamp;      // optional out-of-bounds handling
                interpolationScheme linear;     // optional interpolation scheme
        }
        direction        (0 0 1);
        origin           0;
    }

    out
    {
        type            freestream;
        freestreamValue uniform 0.3;
    }

    laterales
    {
        type            fixedValue;
        value           uniform 0;
    }

    techo
    { 
        type            fixedValue; 
        value           uniform 0;
    }    
 
    suelo
    {
        type            fixedValue;
        value           uniform 0;
    }

    bloque
    {
        type            fixedValue;
        value           uniform 0;
    }
}   
    
// ************************************************************************* //
nuTildaProfile.csv:
Code:
0,0,0,0
0.006,0.334,0,0
0.012,0.346,0,0
0.024,0.362,0,0
0.048,0.384,0,0
0.072,0.401,0,0
0.096,0.414,0,0
0.12,0.4189,0,0
0.144,0.433,0,0
0.168,0.436,0,0
0.192,0.442,0,0
0.198,0.439,0,0
0.204,0.444,0,0
0.216,0.441,0,0
0.228,0.444,0,0
0.252,0.445,0,0
0.276,0.442,0,0
0.3,0.433,0,0
0.36,0.421,0,0
0.42,0.395,0,0
0.48,0.361,0,0
0.54,0.325,0,0
0.6,0.276,0,0
0.66,0.229,0,0
0.72,0.178,0,0
0.88,0.178,0,0
Thanks a lot and excuse my poor english.

Diego.
Yann Scott likes this.

Last edited by dferrando; July 3, 2017 at 04:37.
dferrando is offline   Reply With Quote

Old   July 4, 2017, 07:00
Default
  #2
New Member
 
Diego Ferrando
Join Date: Mar 2017
Location: Zaragoza
Posts: 19
Rep Power: 9
dferrando is on a distinguished road
I have already fixed the problem. I was setting nuTilda as a vector, not as a scalar.
dferrando is offline   Reply With Quote

Old   December 4, 2017, 22:19
Default
  #3
New Member
 
Bingchuan
Join Date: Dec 2017
Posts: 16
Rep Power: 8
bingchuan is on a distinguished road
Hi, Diego.

Could you please post the new nuTilda setting file along with the csv file? I think I have meet the same problem. And I am not sure about the meaning of the four columns in the csv file, the column one to four are related to the x, y, z, t direction? could you please give me more explain about it?
Many Thanks.

Bingchuan
bingchuan is offline   Reply With Quote

Old   February 22, 2018, 08:55
Default
  #4
Member
 
Chris Schäfer
Join Date: Apr 2017
Posts: 34
Rep Power: 8
Chris123 is on a distinguished road
This would be also interested for me.
I'am looking for a BC for T which varies with height.
But I do not know how can i specify the height dependence like

Inlet

type fixedProfile;
profile table

(
0m 295K
50m 290K
...
...
);
But this of coure doesn't work, OF expectet just one Value for a scalar!
Chris123 is offline   Reply With Quote

Old   February 22, 2018, 14:24
Default
  #5
New Member
 
Diego Ferrando
Join Date: Mar 2017
Location: Zaragoza
Posts: 19
Rep Power: 9
dferrando is on a distinguished road
Hi!
The problem with my nuTilda BC is that the componentColums line must be (1) since nuTilda is a scalar parameter not a vector.

Chris, try using profile csvFile.
In the csvFile write the height in column 0 and temperature in column1 just like i did with velocity but just write 2 columns, not 4, because temperature it's a scalar parameter.

Sorry for replying so late bingchuan and for my bad english.
Yann Scott likes this.
dferrando is offline   Reply With Quote

Old   February 23, 2018, 05:57
Default
  #6
Member
 
Chris Schäfer
Join Date: Apr 2017
Posts: 34
Rep Power: 8
Chris123 is on a distinguished road
Hi Diego, thank you it works.

Chris
Chris123 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
map outlet boundary profile as an inlet condition using UDF Daniel_Khazaei Fluent UDF and Scheme Programming 2 June 20, 2016 11:53
Time dependant pressure boundary condition yosuke1984 OpenFOAM Verification & Validation 3 May 6, 2015 06:16
CFX fails to calculate a diffuser pipe flow shenying0710 CFX 7 March 26, 2013 04:13
Pressure Inlet Boundary Condition Profile arapha FLUENT 0 April 4, 2011 16:23
External Radiation Boundary Condition (Two sided wall), Grid Interface CFD XUE FLUENT 0 July 8, 2010 06:49


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