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

How to use a nonuniform boundary consitions

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 28, 2017, 09:31
Default How to use a nonuniform boundary consitions
  #1
New Member
 
Qihao Jiang
Join Date: Dec 2017
Posts: 20
Rep Power: 9
Qihao is on a distinguished road
hello,

I am doing a simulation which the pressure in the top boundary is nonuniform, It varies with x direction and I calculated it use another software, it generate a file which consist the pressure value with different x direction values. the time is keep constant, the pressure just vary along x direction. Now I want to use this file as the boundary condition for another part. and try to use nonuniform List<Scalar>, but it has some errors, I do not why? can this method solve my problem? or I should consider another boundary conditions?

the error is wrong token type - expected Scalar, found on line 109 the punctuation token ')'

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 5.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [1 -1 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
front
{
type empty;
}
cyc_left
{
type cyclic;
}
top
{
type fixedValue;
value nonuniform List<scalar>
78
(
0.000
0.043
0.158
0.311
0.482
0.663
0.845
1.022
1.187
1.334
1.460
1.561
1.637
1.690
1.723
1.737
1.735
1.717
1.688
1.648
1.599
1.543
1.480
1.412
1.340
1.263
1.183
1.099
1.012
0.922
0.829
0.733
0.633
0.531
0.425
0.315
0.201
0.083
-0.041
-0.172
-0.310
-0.457
-0.615
-0.789
-0.982
-1.210
-1.469
-1.853
-2.185
-2.948
-2.923
-2.011
-1.717
-1.562
-1.437
-1.320
-1.209
-1.101
-0.996
-0.894
-0.797
-0.702
-0.610
-0.521
-0.437
-0.358
-0.285
-0.220
-0.152
-0.065
-0.017
);
}
bottom
{
type zeroGradient;
}
back
{
type empty;
}
cyc_right
{
type cyclic;
}
}


// ************************************************** *********************** //
Qihao is offline   Reply With Quote

Old   December 28, 2017, 11:17
Default
  #2
Senior Member
 
Taher Chegini
Join Date: Nov 2014
Location: Houston, Texas
Posts: 125
Rep Power: 13
Taataa is on a distinguished road
In the list you declared the number of values to 78 but there are 71 numbers, they should be the same.
Taataa is offline   Reply With Quote

Old   December 28, 2017, 11:23
Default
  #3
New Member
 
Qihao Jiang
Join Date: Dec 2017
Posts: 20
Rep Power: 9
Qihao is on a distinguished road
Quote:
Originally Posted by Taataa View Post
In the list you declared the number of values to 78 but there are 71 numbers, they should be the same.
I find this mistake, and when I increase the same number, it woks, but it still have some mistakes. and I want to consult you just now in the last questions you helped me,it will be more specific, and now I need to do interpolation of these discrete values, then use this as boundary conditions for another boundary, Do you have some methods about this?
Qihao is offline   Reply With Quote

Old   December 28, 2017, 11:42
Default
  #4
Senior Member
 
Join Date: Aug 2015
Posts: 494
Rep Power: 15
clapointe is on a distinguished road
swak4Foam is a great utility that can be used to generate boundary conditions.

http://openfoamwiki.net/index.php/Contrib/swak4Foam
clapointe 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
Centrifugal fan j0hnny CFX 13 October 1, 2019 14:55
Error - Solar absorber - Solar Thermal Radiation MichaelK CFX 12 September 1, 2016 06:15
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 07:20
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 08:00
domain imbalance for enrgy equation happy CFX 14 September 6, 2012 02:54


All times are GMT -4. The time now is 14:07.