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

csvFile type missing in OpenFOAM v8

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

Like Tree4Likes
  • 1 Post By clapointe
  • 1 Post By clapointe
  • 1 Post By Marpole
  • 1 Post By HPE

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 26, 2021, 13:19
Default csvFile type missing in OpenFOAM v8
  #1
Senior Member
 
Charles
Join Date: Aug 2016
Location: Vancouver, Canada
Posts: 151
Rep Power: 10
Marpole is on a distinguished road
With OpenFOAM v8, when running a case, which works fine with OpenFOAM v7, it failed with an error message that uniformValue doesn't have type csvFile. Does anyone have the same issue? I attach the inlet boundary condition below.


Code:
 
inlet { type uniformFixedValue; uniformValue { type csvFile; nHeaderLine 4; // number of header lines refColumn 0; // time column index componentColumns (1); // data column index separator ","; // optional (defaults to ",") mergeSeparators no; // merge multiple separators file "dataTable.csv"; } }
__________________
Charles L.
Marpole is offline   Reply With Quote

Old   June 26, 2021, 16:33
Default
  #2
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
Hi,

Could you try to reproduce the issue with a standard tutorial? If it can be reproduced by others, would be nice to submit a bug ticket.

Thanks for your time.
HPE is offline   Reply With Quote

Old   June 26, 2021, 21:20
Default
  #3
Senior Member
 
Charles
Join Date: Aug 2016
Location: Vancouver, Canada
Posts: 151
Rep Power: 10
Marpole is on a distinguished road
Thanks Herpes,

Attached is a pitzDaily of pimpleFoam. I revised the inlet of U to include csvFile.

The model runs fine with OpenFOAM v7. When it is run with OpenFOAM v8, it failed with the following error message.

Please check and confirm. Note, in OpenFOAM v8 User Guide page U-150, csvFile is listed as an option.

Code:
Reading field U

--> FOAM FATAL ERROR: 
Unknown Function1 type csvFile for Function1 uniformValue

Valid Function1 types are:

11
(
coded
constant
one
polynomial
scale
sine
square
table
tableFile
uniform
zero
)
Attached Files
File Type: gz pitzDaily.tar.gz (2.6 KB, 8 views)
__________________
Charles L.
Marpole is offline   Reply With Quote

Old   June 28, 2021, 13:24
Default
  #4
Senior Member
 
Join Date: Aug 2015
Posts: 494
Rep Power: 15
clapointe is on a distinguished road
The convention for specifying data from a csv changed, see e.g. the fixedProfile.H file (fixedProfile). You'll now use the tableFile option with format csv.

Caelan
Marpole likes this.
__________________
Public git repository : https://github.com/clapointe2011/public
clapointe is offline   Reply With Quote

Old   June 28, 2021, 15:33
Default
  #5
Senior Member
 
Charles
Join Date: Aug 2016
Location: Vancouver, Canada
Posts: 151
Rep Power: 10
Marpole is on a distinguished road
Thanks for your check, Caelan.

As you can see, I'm using csvFile for boundary condition type uniformFixedValue, which is different from fixedProfile. Both can read csv file but one is a profile over time and the other is a profile over space.

Is it a bug that Function1 uniformValue misses the type csvFile?
__________________
Charles L.
Marpole is offline   Reply With Quote

Old   June 28, 2021, 16:12
Default
  #6
Senior Member
 
Join Date: Aug 2015
Posts: 494
Rep Power: 15
clapointe is on a distinguished road
The fixedProfile was just an example of how the code changed -- it is clear, I think, that tableFile has replaced csvFile in version 8.

Caelan
Marpole likes this.
__________________
Public git repository : https://github.com/clapointe2011/public
clapointe is offline   Reply With Quote

Old   June 28, 2021, 18:00
Default
  #7
Senior Member
 
Charles
Join Date: Aug 2016
Location: Vancouver, Canada
Posts: 151
Rep Power: 10
Marpole is on a distinguished road
Thanks Caelan. Yes, you are right and I made it work per your instruction.

In version 8, there is no csvFile type. Below is the script to use tableFile.

Code:
    inlet
    {
        type      uniformFixedValue;
        uniformValue   tableFile;
        uniformValueCoeffs
        {
            format              csv;
            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
            file                "data/velocity.csv";  // name of csv data file
            outOfBounds         clamp;      // optional out-of-bounds handling
            interpolationScheme linear;     // optional interpolation scheme
        }
    }
In order to use tableFile, we do in the following way as being told in How to use 2 tableFile?
Code:
<entryName> tableFile;
<entryName>Coeffs
         {
             ...
         }
In my case, the <entryName> is uniformValue.
ashvinc9 likes this.
__________________
Charles L.
Marpole is offline   Reply With Quote

Old   July 1, 2021, 16:00
Default
  #8
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
Happy that Caelan could act before me (thanks) - sorry for being late.

Having said that I couldn't find any particular commit in the .org repo which deprecated the "csvFile" option (or at least stating it in a commit message). Might be worth to double check if necessary.
HPE is offline   Reply With Quote

Old   July 1, 2021, 16:27
Default
  #9
Senior Member
 
Charles
Join Date: Aug 2016
Location: Vancouver, Canada
Posts: 151
Rep Power: 10
Marpole is on a distinguished road
Thanks again, Herpes, for paying attention to this thread.

The User Guide (v8) still have type csvFile printed. This could cause some confusions. I installed OpenFOAM v8 a few months ago. Because of this, I moved back to OpenFOAM v7 to work on my projects until I have time now to investigate this issue.
__________________
Charles L.
Marpole is offline   Reply With Quote

Old   July 1, 2021, 16:30
Default
  #10
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
I would stick with v8 (or even the develop branch) instead of v7 just merely because of bug fixes involving in the newer version. Just my humble opinion.

Good luck.
Marpole likes this.
HPE 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
p_rgh devergence with chtMutiRegionFoam in first iteration Liz1219 OpenFOAM Running, Solving & CFD 0 March 5, 2021 22:49
Trying to convert a case from laminar to turbulent (K-OmegaSST) EternalSeekerX OpenFOAM Running, Solving & CFD 7 November 1, 2020 16:16
Film cooling problem arun1994 OpenFOAM 0 October 26, 2020 09:08
Floating point exception error lpz_michele OpenFOAM Running, Solving & CFD 53 October 19, 2015 02:50
Time step continuity error lpz_michele OpenFOAM Running, Solving & CFD 0 October 12, 2015 06:05


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