dferrando |
June 28, 2017 06:24 |
nuTilda profile Boundary Condition issue
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.
|