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

Inlet velocity as parabolic function

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By @cfd

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 20, 2017, 06:58
Default Inlet velocity as parabolic function
  #1
New Member
 
@cfd
Join Date: Jul 2017
Posts: 2
Rep Power: 0
@cfd is on a distinguished road
hi guys. i am new foamer. i am really struggling to specify the inlet velocity as a parabolic function depending from space (so not from time!). Say for parabolic function as

v = -1.3 + 2.3x^2
I have tried two approaches that are explained in https://openfoam.org/release/2-1-0/b...me-dependent/:



First Approach:
i have computed v by matlab and created a two column data.csv file with in the 0th column have steps and in the 1st column having the value of v. After that i have done the following in 0/U in openfoam to read the csv file:



Code:
boundaryField
{
    inlet
    {
        type            uniformFixedValue;
        uniformValue    csvFile;
        uniformValueCoeffs
        {
                refColumns              0;
                componentColumns        (1);
                separator               ",";
                fileName                "data.csv";
        }
    }


After running the icoFoam, i get the following error:


Code:
Create time
  
Create mesh for time = 0
  
  
PISO: Operating solver in PISO mode
  
Reading transportProperties
  
Reading field p
  
Reading field U
  
  
  
--> FOAM FATAL IO ERROR: 
keyword nHeaderLine is undefined in dictionary "/home/laptop/OpenFOAM/of-dev/run/assignmentFlow/0/U.boundaryField.inlet.uniformValueCoeffs"
  
file: /home/laptop/OpenFOAM/of-dev/run/assignmentFlow/0/U.boundaryField.inlet.uniformValueCoeffs from line 29 to line 32.
  
From function const Foam::entry& Foam::dictionary::lookupEntry(const Foam::word&, bool, bool) const in file db/dictionary/dictionary.C at line 566.

Second Approach:



Code:
boundaryField
{
    inlet
    {
            type        uniformFixedValue;
            uniformValue    polynomial ((-1.3 0.0) (2.3 2.0));
    }

After running icoFoam, the following error is produced:



Code:
Create time
  
Create mesh for time = 0
  
  
PISO: Operating solver in PISO mode
  
Reading transportProperties
  
Reading field p
  
Reading field U
  
  
  
--> FOAM FATAL IO ERROR: 
Expected a '(' while reading VectorSpace<Form, Cmpt, Ncmpts>, found on line 26 the doubleScalar 0.1
  
file: /home/laptop/OpenFOAM/op-dev/run/assignmentFlow/0/U.boundaryField.inlet.uniformValue at line 26.
  
    From function Foam::Istream& Foam::Istream::readBegin(const char*)
    in file db/IOstreams/IOstreams/Istream.C at line 92.
  
FOAM exiting

can someone please help to debug these error?

is there any other way to insert inlet velocity as function of x in OpenFoam?
@cfd is offline   Reply With Quote

Old   July 20, 2017, 07:09
Default
  #2
Member
 
Brian Willis
Join Date: Mar 2011
Location: Cape Town, South Africa
Posts: 58
Rep Power: 15
Dipsomaniac is on a distinguished road
Have a look at using groovyBC.

Last edited by Dipsomaniac; July 20, 2017 at 07:12. Reason: I actually don't think codedFixedValue was a good suggestion.
Dipsomaniac is offline   Reply With Quote

Old   July 29, 2017, 16:43
Default
  #3
New Member
 
@cfd
Join Date: Jul 2017
Posts: 2
Rep Power: 0
@cfd is on a distinguished road
Quote:
Originally Posted by Dipsomaniac View Post
Have a look at using groovyBC.
bit of a late reaction but groovyBC works fine! Thanx a lot!
Dipsomaniac likes this.
@cfd is offline   Reply With Quote

Reply


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
codeDict Error Parabolic Power Law Inlet Velocity Profile Sindibad OpenFOAM Running, Solving & CFD 0 January 1, 2017 20:53
Multiphase flow - incorrect velocity on inlet Mike_Tom CFX 6 September 29, 2016 02:27
[swak4Foam] installation problem with version 0.2.3 Claudio87 OpenFOAM Community Contributions 9 May 8, 2013 11:20
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 07:42
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 15:00


All times are GMT -4. The time now is 10:38.