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

Error importing CSV File as Boundary in OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By basecase
  • 1 Post By foamiste

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 27, 2021, 06:09
Default Error importing CSV File as Boundary in OpenFOAM
  #1
New Member
 
Join Date: Apr 2021
Posts: 2
Rep Power: 0
Aydan is on a distinguished road
Goodmorning,
i'm new to the forum and also to using OpenFOAM.

It's been three days that i'm trying to import a csv file as inlet boundary condition for my simulation.

I think to use the right code string, but i don't understand where can be the error.

The following is the code string:

inlet

{
type uniformFixedValue;
uniformValue

{
type csvFile;
nHeaderLine 0;
refColumn 0;
componentColumns (1);
separator ",";
mergeSeparators no;
file "inlet.csv";
{


}

And the following is the error when i try to run the analysis:

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

Valid Function1 types are:

17
(
coded
constant
halfCosineRamp
linearRamp
one
polynomial
quadraticRamp
quarterCosineRamp
quarterSineRamp
reverseRamp
scale
sine
square
table
tableFile
uniform
zero
)



From function static Foam::autoPtr<Foam::Function1<Type> > Foam::Function1<Type>::New(const Foam::word&, const Foam::dictionary&) [with Type = double]
in file /home/ubuntu/OpenFOAM/OpenFOAM-8/src/OpenFOAM/lnInclude/Function1New.C at line 48.

FOAM exiting

If someone has some solution he'll be gratefull.
Thank you, and sorry if someone in the forum has already posted the same question, but i didn't find it.
Aydan is offline   Reply With Quote

Old   May 27, 2021, 23:31
Default
  #2
New Member
 
John
Join Date: Jul 2019
Posts: 7
Rep Power: 7
basecase is on a distinguished road
Hi - you need to provide a bit more information on your problem and case. A good start would be your 0 folder files and some idea of the axial relationships in your geometry. Maybe a pic of your geometry - I assume you've meshed ok.


Regards


base
basecase is offline   Reply With Quote

Old   June 1, 2021, 08:29
Default
  #3
New Member
 
Join Date: Apr 2021
Posts: 2
Rep Power: 0
Aydan is on a distinguished road
I solved it. Thank you. It was a problem with the installed version of Openfoam.
Aydan is offline   Reply With Quote

Old   June 2, 2021, 00:24
Default
  #4
New Member
 
John
Join Date: Jul 2019
Posts: 7
Rep Power: 7
basecase is on a distinguished road
Quote:
Originally Posted by Aydan View Post
I solved it. Thank you. It was a problem with the installed version of Openfoam.
Hi Aydan - the idea of sharing in the forums is that if you ask for help and then solve the problem - you share that solution with others so they don't have to suffer the same torture - it's the community thing. Thanks, Regards
Tobermory likes this.
basecase is offline   Reply With Quote

Old   July 7, 2021, 08:45
Arrow [SOLVED] Read bundary condition from csv file
  #5
Senior Member
 
Asmaa
Join Date: Mar 2016
Posts: 102
Rep Power: 10
foamiste is on a distinguished road
Here is a working example of how to read velocity of a boundary condition from csv file:

Code:
 inlet    

{
        type       fixedProfile;
        profile    tableFile;

        profileCoeffs
        {
            format              csv;        // Input format
            nHeaderLine         1;          // Number of header lines
            refColumn           11;          // Reference column index
            componentColumns    (0 1 2);        // Component column indices
            separator           ",";        // Optional (defaults to ",")
            mergeSeparators     yes;        // Merge multiple separators
            outOfBounds         clamp;      // Optional out-of-bounds handling
            file                "input/U_k_epsilon.csv";
            interpolationScheme linear;     // Optional interpolation scheme
        }
        direction        (0 1 0);
        origin           0;
  }
Lennart.H likes this.
foamiste is offline   Reply With Quote

Reply

Tags
boundary, csv, import, openfoam


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
Using PengRobinsonGas EoS with sprayFoam Jabo OpenFOAM Running, Solving & CFD 36 July 16, 2024 04:52
[foam-extend.org] problem when installing foam-extend-1.6 Thomas pan OpenFOAM Installation 7 September 9, 2015 22:53
[swak4Foam] Problem installing swak_2.x for OpenFoam-2.4.0 towanda OpenFOAM Community Contributions 6 September 5, 2015 22:03
centOS 5.6 : paraFoam not working yossi OpenFOAM Installation 2 October 9, 2013 02:41
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 12:44


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