|
[Sponsors] |
July 20, 2017, 06:58 |
Inlet velocity as parabolic function
|
#1 |
New Member
@cfd
Join Date: Jul 2017
Posts: 2
Rep Power: 0 |
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? |
|
July 20, 2017, 07:09 |
|
#2 |
Member
Brian Willis
Join Date: Mar 2011
Location: Cape Town, South Africa
Posts: 58
Rep Power: 15 |
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. |
|
July 29, 2017, 16:43 |
|
#3 |
New Member
@cfd
Join Date: Jul 2017
Posts: 2
Rep Power: 0 |
||
|
|
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 |