CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

generally defined boundary conditions

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   March 19, 2014, 09:21
Default generally defined boundary conditions
  #1
Senior Member
 
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 174
Rep Power: 8
linch is on a distinguished road
Hi foamers,

Following problem: I want to create a volScalarField with a given boundary condition on all the boundaries of this field. The implementation should be general and valid regardless of the number and the type of the boundaries defined elsewhere.

Here's an example. In createFields.H I want to create a field someField with boundaries
Code:
    {
        type            fixedValue;
        value           uniform 0;
    }
prescribed everywhere. Something looking like this

Code:
    volScalarField someField
    (
        IOobject
        (
            "someField",
            runTime.timeName(),
            mesh,
            IOobject::NO_READ,
            IOobject::AUTO_WRITE
        ),
        mesh,
        dimensionedScalar("someField", dimensionSet(0,1,0,0,0,0,0), 0.0),
        ???? boundaries ????
    );
The red marked piece is what I'm looking for
linch is offline   Reply With Quote

Old   March 21, 2014, 18:48
Default
  #2
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,619
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Hi Linch,

Replacing the red text with

Code:
"fixedValue"
should do the trick.

Good luck,

Nield
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is online now   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Low Mixing time Problem Mavier CFX 5 April 29, 2013 00:00
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00
Export boundary setting in Fluent 14.0 asal FLUENT 3 February 10, 2013 09:07
Fluent accuracy and boundary conditions Paolo Lampitella FLUENT 0 June 12, 2008 06:25
A problem about setting boundary conditions lyang Main CFD Forum 0 September 19, 1999 18:29


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