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

Problem with nonuniform boundary conditions

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By frackowi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 23, 2007, 14:11
Default Dear all, I am trying to s
  #1
Member
 
Quinn Tian
Join Date: Mar 2009
Posts: 62
Rep Power: 17
qtian is on a distinguished road
Dear all,

I am trying to specify nonuniform boundary conditions at "inlet". For some reason, I am keep geting this error message when I try to access the 0/U file. Can anyone give me some help and advise? Thank you very much.

--> FOAM FATAL IO ERROR : attempt to read beyond EOF

file: /home/qtian/OpenFOAM/qtian-1.4/run/tutorials/simpleFoam//bump1/0/U::value at line 58.

From function ITstream::read(token& t)
in file db/IOstreams/Tstreams/ITread.C at line 70.

FOAM exiting

U file look like this,

internalField uniform (0 0 0);
boundaryField
{
Bottom
{
type fixedValue;
value uniform (0 0 0);
}

leftwall
{
type slip;
}

outlet
{
type zeroGradient;
}

rightwall
{
type slip;
}

inlet
{
type fixedValue;
value nonuniform; Line 58
}

top
{
type slip;
}
}
qtian is offline   Reply With Quote

Old   July 23, 2007, 15:46
Default Hello, if you want to specify
  #2
frackowi
Guest
 
Posts: n/a
Hello,
if you want to specify a non uniform boundary condition, you should specify the field values inside the 0/U file. In my case, I dealt with non uniform velocity fields (vector field) and temperature fields (scalar field) at a boundary called "goutte" (droplet in english)
Here are my 0/U and 0/T files as example. Good luck. Bruno
/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.4 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class volVectorField;
object U;
}

// ************************************************** *********************** //

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

internalField uniform ( 15. 0. 0. );

boundaryField
{
inlet
{
type fixedValue;
value uniform ( 15. 0. 0. );
}
inlet1
{
type fixedValue;
value uniform ( 15. 0. 0. );
}
goutte
{
type fixedValue;
value nonuniform List<vector>
32
(
( 0.125901997 0.138911426 0. )
( 0.128139153 0.172775626 0. )
( 0.126960248 0.211820379 0. )
( 0.120514534 0.254806578 0. )
( 0.107431941 0.30025211 0. )
( 0.0867254138 0.346227229 0. )
( 0.0579536967 0.390691847 0. )
( 0.0212141946 0.431824267 0. )
( 0.138057172 0.00678228773 0. )
( 0.135565937 0.0201092884 0. )
( 0.131116718 0.0328430161 0. )
( 0.126068711 0.0451080948 0. )
( 0.121914245 0.0576611347 0. )
( 0.11977531 0.0717905611 0. )
( 0.120108962 0.0890788361 0. )
( 0.122550257 0.111073039 0. )
( -0.461236358 0.508895934 0. )
( -0.393406957 0.530447841 0. )
( -0.32478264 0.541867137 0. )
( -0.257232815 0.543873072 0. )
( -0.192155391 0.537038386 0. )
( -0.130680457 0.521705806 0. )
( -0.0739541948 0.498558581 0. )
( -0.0230022091 0.468220979 0. )
( -0.802104294 0.0394048579 0. )
( -0.788241446 0.116924562 0. )
( -0.764009297 0.191374391 0. )
( -0.73147279 0.261725157 0. )
( -0.690910041 0.326776087 0. )
( -0.642638564 0.385182768 0. )
( -0.587392509 0.435639977 0. )
( -0.526437223 0.477134943 0. )
);
}
outlet
{
type zeroGradient;
}
def1
{
type wedge;
}
def2
{
type wedge;
}
}
// ********************************************** //

/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.4 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class volScalarField;
object T;
}

// ************************************************** *********************** //

dimensions [ 0 0 0 1 0 0 0 ];

internalField uniform 873.;

boundaryField
{
inlet
{
type fixedValue;
value uniform 873.;
}
inlet1
{
type fixedValue;
value uniform 873.;
}
goutte
{
type fixedValue;
value nonuniform List<scalar>
32
(
316.607025
317.104828
317.483337
317.741577
317.88974
317.944489
317.9245
317.849274
312.305328
312.442383
312.751709
313.243347
313.877991
314.591553
315.318268
316.003143
316.917969
316.997284
317.094482
317.207031
317.332245
317.467346
317.606018
317.737732
316.933899
316.903168
316.853973
316.808655
316.785156
316.787842
316.81308
316.856873
);
}
outlet
{
type zeroGradient;
}
def1
{
type wedge;
}
def2
{
type wedge;
}
}
// ********************************************** //
babakflame likes this.
  Reply With Quote

Old   July 25, 2007, 16:30
Default Frackowiak, Thanks for your
  #3
Member
 
Quinn Tian
Join Date: Mar 2009
Posts: 62
Rep Power: 17
qtian is on a distinguished road
Frackowiak,

Thanks for your help. It works right now.

QT
qtian is offline   Reply With Quote

Old   May 11, 2017, 08:32
Default Expression for non uniform value?
  #4
New Member
 
Join Date: Mar 2017
Posts: 3
Rep Power: 9
siemons.sk is on a distinguished road
Hi All,

I am looking for a method to update my partialSlip boundary condition from a uniform slip fraction to an expression (Maxwellian slip) in rhoSimpleFoam for OF 2.2.0. So currently I have in my U file:

wall
{
type partialSlip;
valueFraction uniform 0.01;
}

and want something like this

wall
{
type partialSlip;
valueFraction DynViscousity/Density*pow(PI/2*Density/Pressure,1/2);
}

Can I implement this within the U file? I am looking for a solution that does not involve compiling a new BC.

Thanks in advance!
siemons.sk is offline   Reply With Quote

Old   January 12, 2018, 16:03
Default
  #5
New Member
 
Wei Meng
Join Date: May 2017
Posts: 12
Rep Power: 9
Tomko is on a distinguished road
Hi Bruno,

I am a new foamer. Can I ask how do you extract the vector list of your boundary "goutte" from face label?

Thank you very much!
Tomko 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
Specifying nonuniform boundary condition maka OpenFOAM Running, Solving & CFD 59 October 22, 2014 15:52
Nonuniform boundary syntax juho OpenFOAM Running, Solving & CFD 1 December 11, 2008 17:13
Set nonuniform boundary values nikwin OpenFOAM Running, Solving & CFD 1 November 30, 2008 08:12
Nonuniform gradient boundary condition ankgupta8um OpenFOAM Running, Solving & CFD 1 March 14, 2006 02:34
Nonuniform initial conditions nico OpenFOAM Pre-Processing 2 January 4, 2006 07:37


All times are GMT -4. The time now is 23:26.