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

[swak4Foam] groovyBC - non uniform gradient problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 5, 2015, 16:40
Default groovyBC - non uniform gradient problem
  #1
Member
 
Luca
Join Date: Mar 2011
Location: Italy
Posts: 62
Rep Power: 15
marluc is on a distinguished road
Hallo,

I am solving a three dimensional pipe flow with a non-uniform applied gradient on half its surface. I am using the following groovyBC:
Code:
     wallHeat
     {
         type                    groovyBC;
         gradientExpression      "2e5/4*pi*cosTheta";
         fractionExpression      "0";
         variables               "r=sqrt(sqr(pos().x)+sqr(pos().y));cosTheta=mag(pos().x/r);";
         refGradient             uniform 50000;
         refValue                   uniform 50000;
         value                   uniform 50000;
     }
solve for a volScalarField T and from it I calculate a volScalarField T1.

The internalField values of T1 are correct but the boundary values on the above patch are not because they are always set at the specified uniform value and not as a nonUniform List as for the field T:

For T1:
Code:
 wallHeat
    {
        type            groovyBC;
        refValue        uniform 50000;
        refGradient     uniform 50000;
        valueFraction   uniform 1;
        value           uniform 50000;
        valueExpression "0";
        gradientExpression "2e5/4*pi*cosTheta";
        fractionExpression "0";
        evaluateDuringConstruction 0;
        variables       
2
(
"r=sqrt(sqr(pos().x)+sqr(pos().y));"
"cosTheta=mag(pos().x/r);"
)
;
        timelines       (
);
        lookuptables    (
);
For T:
Code:
  wallHeat
 {
     type            groovyBC;
     refValue        uniform 0;
     refGradient     nonuniform List<scalar>
400
(
157049
156807
156323
155598
.
.
.       
 valueFraction   uniform 0;
 value           nonuniform List<scalar>
 400
(
479.485
479.069
478.242
477.005
.
.
.
)
;
         valueExpression "0";
         gradientExpression "2e5/4*pi*cosTheta";
         fractionExpression "0";
         evaluateDuringConstruction 0;
         variables
 2
(
 "r=sqrt(sqr(pos().x)+sqr(pos().y));"
 "cosTheta=mag(pos().x/r);"
 )
 ;
         timelines       (
);
         lookuptables    (
 );
As you can see it seems that the non-uniform gradient BC is not evaluated for T1. But why? Is it because I don't solve any equation for that field but I just derive it from T? But if I use a fixedGradient BC then everything works finr and I obtain the correct T1 values at the wall.

Can someone help?

Thank you in advance,
Luca
marluc 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
wallHeatFlux utility for an incompressible case Mr.Jingles OpenFOAM Post-Processing 67 April 6, 2023 03:25
multiphaseEulerFoam/tank discharge ves OpenFOAM Running, Solving & CFD 8 December 31, 2017 14:59
Wrong Boundary Conditions (maximum number of iterations) in compressibleInterDyMFoam silencebreak OpenFOAM Running, Solving & CFD 0 September 11, 2017 07:05
Boundary Conditions MtnRunBeachBum OpenFOAM Pre-Processing 1 April 30, 2015 16:33
Need help with boundary conditions: open to atmosphere Wolle OpenFOAM 2 April 11, 2011 07:32


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