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

fixedProfile kOmega

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 9, 2019, 18:19
Default fixedProfile kOmega
  #1
New Member
 
Mazen Draw
Join Date: Sep 2018
Posts: 21
Rep Power: 7
MazenDraw is on a distinguished road
Hello everyone!


Lately, I have been working on implementing Omega profile in the inlet BC of an ABL flow that I've seen in some paper. The idea is to define Omega based on k and epsilon. So one has to go from k-epsilon model to k-omega model.
For modeling k in a previous k-epsilon case I used fixedProfile type in the inlet BC and imported data from csv.file and it worked without any errors. I want to do the same for omega, but I am getting the following exception:


Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5.x                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 5.x-68e8507efb72
Exec   : simpleFoam
Date   : Mar 10 2019
Time   : 00:03:46
Host   : "mazen"
PID    : 2281
I/O    : uncollated
Case   : /home/mazen/ownCloud/MasterThesis_WtG_ValidationCase/Mazen/14.09/simulations/Mazen/CukOmegaS2
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

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

Create mesh for time = 0


SIMPLE: convergence criteria
    field p     tolerance 1e-06
    field Ux     tolerance 1e-06
    field Uy     tolerance 1e-06
    field Uz     tolerance 1e-06
    field "(k|epsilon|omega)"     tolerance 1e-06

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type RAS
Selecting RAS turbulence model kOmega


--> FOAM FATAL IO ERROR: 
wrong token type - expected Scalar, found on line 0 the word '0.0001'

file: IStringStream.sourceFile at line 0.

    From function Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::doubleScalar&)
    in file lnInclude/Scalar.C at line 93.

FOAM exiting
Inlet BC in Omega file:
Code:
boundaryField

{

    IN

    {

        type            fixedProfile;

    profile        csvFile;//[Yang 2009]

        profileCoeffs

        {

            nHeaderLine     0;

            refColumn       0;

            componentColumns (1);

            separator       ",";

            mergeSeparators no;

            file            "0/Omegaprofile.csv";

        outOfBounds        clamp;

        interpolationScheme linear;

        }

        direction       (0 0 1);

        origin          0;

    }
I am using simpleFoam solver on OF v. 5.x
I wonder why I am getting this exception since the values in csv.file are of double scalar type which is what's needed.


Anyone has an idea?
Thanks in advance!
MazenDraw is offline   Reply With Quote

Old   March 10, 2019, 19:09
Default
  #2
Member
 
Join Date: Dec 2012
Posts: 33
Rep Power: 13
mechkween is on a distinguished road
Looks like the scalar entry is being treated as a string given it's reading it as '0.0001' instead of 0.0001. Maybe you need to check your csv file. Try opening it in a text editor like gedit, notepad or vim. Are there quotations around the numbers?
mechkween is offline   Reply With Quote

Old   January 23, 2023, 07:08
Default About fixedProfile kepsilon
  #3
New Member
 
Eren Kaya
Join Date: Jan 2023
Posts: 8
Rep Power: 3
erenbkaya is on a distinguished road
Hi MazenDraw, I wish you a good year.

I am working on an OpenFOAM CFD project for my graduation thesis. I want to implement k and epsilon values to specific locations using fixedProfile command and csvFile. My 0.k and 0.epsilon files are completely same with yours except the direction, which is (0 1 0) since it is in y-direction. After the iterations, when OpenFOAM begin to write the iteration results to timestep file, i.e. for my case 500, I am receiving an error message that is:

--> FOAM FATAL ERROR: (openfoam-2206)
unallocated autoPtr of type N4Foam9Function1INS_10SymmTensorIdEEEE

From T* Foam::autoPtr<T>:: operator->() [with T = Foam::Function1<Foam::SymmTensor<double> >]
in file /usr/src/packages/BUILD/src/OpenFOAM/lnInclude/autoPtrI.H at line 178.

FOAM aborting

I've searched the forum for this error but I could not find a solution. Can you give me any advice if you have encountered this error before? Thanks a lot.

Quote:
Originally Posted by MazenDraw View Post
Hello everyone!


Lately, I have been working on implementing Omega profile in the inlet BC of an ABL flow that I've seen in some paper. The idea is to define Omega based on k and epsilon. So one has to go from k-epsilon model to k-omega model.
For modeling k in a previous k-epsilon case I used fixedProfile type in the inlet BC and imported data from csv.file and it worked without any errors. I want to do the same for omega, but I am getting the following exception:


Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5.x                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 5.x-68e8507efb72
Exec   : simpleFoam
Date   : Mar 10 2019
Time   : 00:03:46
Host   : "mazen"
PID    : 2281
I/O    : uncollated
Case   : /home/mazen/ownCloud/MasterThesis_WtG_ValidationCase/Mazen/14.09/simulations/Mazen/CukOmegaS2
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

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

Create mesh for time = 0


SIMPLE: convergence criteria
    field p     tolerance 1e-06
    field Ux     tolerance 1e-06
    field Uy     tolerance 1e-06
    field Uz     tolerance 1e-06
    field "(k|epsilon|omega)"     tolerance 1e-06

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type RAS
Selecting RAS turbulence model kOmega


--> FOAM FATAL IO ERROR: 
wrong token type - expected Scalar, found on line 0 the word '0.0001'

file: IStringStream.sourceFile at line 0.

    From function Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::doubleScalar&)
    in file lnInclude/Scalar.C at line 93.

FOAM exiting
Inlet BC in Omega file:
Code:
boundaryField

{

    IN

    {

        type            fixedProfile;

    profile        csvFile;//[Yang 2009]

        profileCoeffs

        {

            nHeaderLine     0;

            refColumn       0;

            componentColumns (1);

            separator       ",";

            mergeSeparators no;

            file            "0/Omegaprofile.csv";

        outOfBounds        clamp;

        interpolationScheme linear;

        }

        direction       (0 0 1);

        origin          0;

    }
I am using simpleFoam solver on OF v. 5.x
I wonder why I am getting this exception since the values in csv.file are of double scalar type which is what's needed.


Anyone has an idea?
Thanks in advance!
erenbkaya is offline   Reply With Quote

Old   January 23, 2023, 07:45
Default
  #4
New Member
 
Mazen Draw
Join Date: Sep 2018
Posts: 21
Rep Power: 7
MazenDraw is on a distinguished road
Hello Eren,

This has been long time ago and I don't really have the files for this case anymore. If I remember correctly it is similar to your data, z coordinates in the first column and k values in the second.

To give you something to work with, you can check out the boundary condition specifications of this tutorial https://github.com/OpenFOAM/OpenFOAM.../0/T.particles


And here you can find the data file they used for it: https://github.com/OpenFOAM/OpenFOAM...allTemperature


I know you are using a different version of OpenFOAM, but this boundary condition is so old that I can imagine it is almost identical in both versions.


Finally pay attention to the entries: "nHeaderLin", "refColumn" and "componentColumns". They tell the solver where to start parsing the data from the data file.
MazenDraw is offline   Reply With Quote

Old   January 23, 2023, 07:54
Default
  #5
New Member
 
Eren Kaya
Join Date: Jan 2023
Posts: 8
Rep Power: 3
erenbkaya is on a distinguished road
Thanks for your quick responding Mazen! Have a good day.

Quote:
Originally Posted by MazenDraw View Post
Hello Eren,

This has been long time ago and I don't really have the files for this case anymore. If I remember correctly it is similar to your data, z coordinates in the first column and k values in the second.

To give you something to work with, you can check out the boundary condition specifications of this tutorial https://github.com/OpenFOAM/OpenFOAM.../0/T.particles


And here you can find the data file they used for it: https://github.com/OpenFOAM/OpenFOAM...allTemperature


I know you are using a different version of OpenFOAM, but this boundary condition is so old that I can imagine it is almost identical in both versions.


Finally pay attention to the entries: "nHeaderLin", "refColumn" and "componentColumns". They tell the solver where to start parsing the data from the data file.
erenbkaya is offline   Reply With Quote

Reply

Tags
expected scalar, fixedprofile, inlet bc omega, omega profile


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
How to implement kOmega turbulent model in to DPMFoam amilachandra OpenFOAM Programming & Development 3 October 22, 2018 22:48
fully developed channel flow with kOmega, wrong results boshynova OpenFOAM Programming & Development 1 April 20, 2016 10:54
SimpleFoam with Komega turbulence model? tareqkh OpenFOAM Post-Processing 5 December 11, 2014 16:38
Inheriting kOmega: why can't I change the constructor? AlmostSurelyRob OpenFOAM 4 October 27, 2011 04:34
Difference in velocity prediction by kepsilon and komega Chander CFX 3 September 19, 2011 19:11


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