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 Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread 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: 176
Rep Power: 17
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: Copenhagen, Denmark
Posts: 1,902
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


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 10:40
Low Mixing time Problem Mavier CFX 5 April 29, 2013 01:00
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 08:00
Fluent accuracy and boundary conditions Paolo Lampitella FLUENT 0 June 12, 2008 07:25
A problem about setting boundary conditions lyang Main CFD Forum 0 September 19, 1999 19:29


All times are GMT -4. The time now is 04:45.