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

Setting boundary values for a volScalarField

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 25, 2016, 07:07
Default Setting boundary values for a volScalarField
  #1
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 20
Bloerb will become famous soon enough
I want to monitor some field values and write them out.
I created a volScalarField for that purpose
Code:
    Info<< "Reading field myField\n" << endl;
    volScalarField myField
    (
        IOobject
        (
            "myField",
            runTime.timeName(),
            mesh,
            IOobject::READ_IF_PRESENT,
            IOobject::AUTO_WRITE
        ),
        fieldA*fieldB
    );
And have a line inside my solver loop to set the values
Code:
 myField = fieldA*fieldB
I also want to set the boundary values of this field. The boundary should have the normal gradients of both fields multiplied with each other. I think i have to use myField.boundaryField() but how do I set it to equal fvc::snGrad(field1) & snGrad(field2) ?
I have no clue as to how to do this.
Bloerb 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
Radiation in semi-transparent media with surface-to-surface model? mpeppels CFX 11 August 22, 2019 07:30
Setting rotating frame of referece. RPFigueiredo CFX 3 October 28, 2014 04:59
Cells with t below lower limit Purushothama Siemens 2 May 31, 2010 21:58
Warning 097- AB Siemens 6 November 15, 2004 04:41
New topic on same subject - Flow around race car Tudor Miron CFX 15 April 2, 2004 06:18


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