|
[Sponsors] |
June 28, 2017, 07:24 |
nuTilda profile Boundary Condition issue
|
#1 |
New Member
Diego Ferrando
Join Date: Mar 2017
Location: Zaragoza
Posts: 19
Rep Power: 9 |
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 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; } } // ************************************************************************* // 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 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; } } // ************************************************************************* // 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 Diego. Last edited by dferrando; July 3, 2017 at 05:37. |
|
July 4, 2017, 08:00 |
|
#2 |
New Member
Diego Ferrando
Join Date: Mar 2017
Location: Zaragoza
Posts: 19
Rep Power: 9 |
I have already fixed the problem. I was setting nuTilda as a vector, not as a scalar.
|
|
December 4, 2017, 23:19 |
|
#3 |
New Member
Bingchuan
Join Date: Dec 2017
Posts: 16
Rep Power: 8 |
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 |
|
February 22, 2018, 09:55 |
|
#4 |
Member
Chris Schäfer
Join Date: Apr 2017
Posts: 34
Rep Power: 9 |
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! |
|
February 22, 2018, 15:24 |
|
#5 |
New Member
Diego Ferrando
Join Date: Mar 2017
Location: Zaragoza
Posts: 19
Rep Power: 9 |
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. |
|
February 23, 2018, 06:57 |
|
#6 |
Member
Chris Schäfer
Join Date: Apr 2017
Posts: 34
Rep Power: 9 |
Hi Diego, thank you it works.
Chris |
|
|
|
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 12:53 |
Time dependant pressure boundary condition | yosuke1984 | OpenFOAM Verification & Validation | 3 | May 6, 2015 07:16 |
CFX fails to calculate a diffuser pipe flow | shenying0710 | CFX | 7 | March 26, 2013 05:13 |
Pressure Inlet Boundary Condition Profile | arapha | FLUENT | 0 | April 4, 2011 17:23 |
External Radiation Boundary Condition (Two sided wall), Grid Interface | CFD XUE | FLUENT | 0 | July 8, 2010 07:49 |