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

[swak4Foam] Warning running groovyBC: "min ... max ... differ, I will use the average"

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

Like Tree2Likes
  • 1 Post By mick223
  • 1 Post By gschaider

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 15, 2015, 23:39
Default Warning running groovyBC: "min ... max ... differ, I will use the average"
  #1
New Member
 
Mick McGill
Join Date: Jun 2015
Posts: 16
Rep Power: 10
mick223 is on a distinguished road
Hi everyone,

I'm running a case where heat loss is calculated through the walls using a groovyBC gradientExpression. The code used for this in 0/T is:

Code:
leftWall
    {
        type            groovyBC;
        refValue        uniform 1680;
        refGradient     uniform 0;
        valueFraction   uniform 1;
        value           uniform 1680;
        valueExpression "0";
        gradientExpression "(Toutlet > 1680) ? ((-(h*A*(Toutlet-T_inf)+esp*A*sig*(pow(Toutlet,4)-pow(T_surr,4))))/kl) : ((-(h*A*(Toutlet-T_inf)+esp*A*sig*(pow(Toutlet,4)-pow(T_surr,4))))/ks) ";
        fractionExpression "0";
        evaluateDuringConstruction 0;
        variables       
9
(
"h=10.0;"
"A=0.00845561879;"
"T_inf=297.0;"
"T_surr=297.0;"
"esp=0.3;"
"sig=5.67e-8;"
"ks=20;"
"kl=60;"
"Toutlet{leftWall}=oldTime(T);"
)
;
        timelines       (
);
        lookuptables    (
);
    }
The case runs and the results are similar to what is expected, however the warning:

Code:
--> FOAM Warning : 
    From function ExpressionResult::getUniformInternal(const label size,bool noWarn)
    in file ExpressionResult/ExpressionResultI.H at line 350
    The minimum value 1674.98 and the maximum 1675.21 differ. I will use the average 1675.14
--> FOAM Warning : 
    From function ExpressionResult::getUniformInternal(const label size,bool noWarn)
    in file ExpressionResult/ExpressionResultI.H at line 350
    The minimum value 1682.8 and the maximum 1959.02 differ. I will use the average 1838.05
--> FOAM Warning : 
    From function ExpressionResult::getUniformInternal(const label size,bool noWarn)
    in file ExpressionResult/ExpressionResultI.H at line 350
    The minimum value 1682.8 and the maximum 1957.31 differ. I will use the average 1838.05
Any advice would be greatly appreciated. I have a feeling that it may be because of how Toutlet{backwall} is specified, it is looking to take data from another patch which would be required to be a uniform field, however I am not sure.

Thanks,

Mick.
mick223 is offline   Reply With Quote

Old   September 21, 2015, 11:52
Default
  #2
New Member
 
Mick McGill
Join Date: Jun 2015
Posts: 16
Rep Power: 10
mick223 is on a distinguished road
For anyone that comes accross this wanting to know what the warning was for, the use of the {} bracketed terms eg
Code:
Toutlet{leftWall}=oldTime(T)
Indicates to the solver that the boundary condition is being taken from a remote patch, which must have a uniform condition, hence the average temperature is taken. To have it instead calculate the boundary condition on a cell by cell basis, simple remove the {} term (in this case {leftWall} ).
wyldckat likes this.
mick223 is offline   Reply With Quote

Old   July 28, 2017, 13:21
Default
  #3
Senior Member
 
Alejandro
Join Date: Jan 2014
Location: Argentina
Posts: 128
Rep Power: 12
ancolli is on a distinguished road
Quote:
Originally Posted by mick223 View Post
For anyone that comes accross this wanting to know what the warning was for, the use of the {} bracketed terms eg
Code:
Toutlet{leftWall}=oldTime(T)
Indicates to the solver that the boundary condition is being taken from a remote patch, which must have a uniform condition, hence the average temperature is taken. To have it instead calculate the boundary condition on a cell by cell basis, simple remove the {} term (in this case {leftWall} ).
But, if u remove that term, how u get access to the remote patch?
ancolli is offline   Reply With Quote

Old   July 30, 2017, 09:55
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by ancolli View Post
But, if u remove that term, how u get access to the remote patch?
General interpolation from one patch to another is tricky and would need additional specifications (especially if the patches are not conformal) so swak4Foam doesn't bother to even try and only accepts uniform patches. If the patches are coupled or mapped the functions neighbourField(T) or mapped(T) give the corresponding values. But oldTime won't work in these cases
the_ichthyologist likes this.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   February 7, 2023, 09:48
Default
  #5
Member
 
Mohammad Reza
Join Date: Sep 2015
Posts: 44
Rep Power: 10
Bana is on a distinguished road
Quote:
Originally Posted by gschaider View Post
General interpolation from one patch to another is tricky and would need additional specifications (especially if the patches are not conformal) so swak4Foam doesn't bother to even try and only accepts uniform patches. If the patches are coupled or mapped the functions neighbourField(T) or mapped(T) give the corresponding values. But oldTime won't work in these cases
Too bad, I have been exactly looking for this application for groovyBC! Value on another patch for the oldTime()...

Seems there is no way other than doing it in C++
Bana is offline   Reply With Quote

Reply

Tags
groovybc, heat loss, warnings

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
Cavitation around NACA hydrofoil using interPhaseChangeFoam Kozan OpenFOAM Running, Solving & CFD 28 March 12, 2023 00:30
multiphaseEulerFoam (OF2.3.0) : Courant number explodes when running in parallel Mehrez OpenFOAM Running, Solving & CFD 10 May 18, 2016 12:44
Sudden jump in Courant number NJG OpenFOAM Running, Solving & CFD 7 May 15, 2014 14:52
[Gmsh] discretizer - gmshToFoam Andyjoe OpenFOAM Meshing & Mesh Conversion 13 March 14, 2012 05:35
Warning 097- AB Siemens 6 November 15, 2004 05:41


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