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

generally defined boundary conditions

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 19, 2014, 08:21
Default generally defined boundary conditions
  #1
Senior Member
 
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 176
Rep Power: 16
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, 17:48
Default
  #2
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
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 offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Export boundary setting in Fluent 14.0 asal FLUENT 4 September 28, 2017 09:40
Low Mixing time Problem Mavier CFX 5 April 29, 2013 00:00
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00
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 04:30.