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

[swak4Foam] minimum value

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 27, 2014, 05:24
Default minimum value
  #1
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27
RodriguezFatz will become famous soon enough
Hi,

I need to get the minimum and maximum pressure value in my domain for each time step. I tryed

Code:
prMin
    {
        type swakExpression;
        valueType cellZone;
        zoneName FLUID;
        accumulations (
            average
        );
        expression "min(p)";
        verbose true;
    }
prMax
    {
        type swakExpression;
        valueType cellZone;
        zoneName FLUID;
        accumulations (
            average
        );
        expression "max(p)";
        verbose true;
    }
in my controlDict but I am not sure, if that is the correct way. I get slightly different values in paraFoam, but I am not sure if that is just some interpolation problem.
Can someone confirm the code or tell me how to do it right?
Philipp.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   May 28, 2014, 04:55
Default
  #2
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 647
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

I do not think you need to use swak (unless you need additional functionality I am not aware of). The standard functionobject should work as well:

Code:
    
minMax     
{
         // Type of functionObject
         type            fieldMinMax;
          // Where to load it from (if not already in solver)
         functionObjectLibs ("libfieldFunctionObjects.so");
          // Function object enabled flag
         enabled         true;
          // Log to output (default: false)
         log             false;
          // Write information to file (default: true)
         write           true;
          // Fields to be monitored - runTime modifiable
         fields
         (
             p
         );
}
Regards,
Tom

Last edited by tomf; May 28, 2014 at 04:57. Reason: Improving indentation in code part
tomf is offline   Reply With Quote

Old   May 28, 2014, 04:56
Default
  #3
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27
RodriguezFatz will become famous soon enough
Great, I am going to try that! Thanks

Edit: Alright, I'm getting the same values. Thank you again!
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   May 28, 2014, 13:22
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 RodriguezFatz View Post
Hi,

I need to get the minimum and maximum pressure value in my domain for each time step. I tryed

Code:
prMin
    {
        type swakExpression;
        valueType cellZone;
        zoneName FLUID;
        accumulations (
            average
        );
        expression "min(p)";
        verbose true;
    }
prMax
    {
        type swakExpression;
        valueType cellZone;
        zoneName FLUID;
        accumulations (
            average
        );
        expression "max(p)";
        verbose true;
    }
in my controlDict but I am not sure, if that is the correct way. I get slightly different values in paraFoam, but I am not sure if that is just some interpolation problem.
Can someone confirm the code or tell me how to do it right?
Philipp.
Just do
Code:
prMin
    {
        type swakExpression;
        valueType cellZone;
        zoneName FLUID;
        accumulations (
            min
            weightedAverage
            max
        );
        expression "p";
        verbose true;
    }
(weightedAverage is an added bonus)
__________________
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

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
Skewness , Minimum Edge Length and Mesh Quality in FLuent ViLaks FLUENT 2 March 2, 2017 06:57
Minimum PDF enthalpy exceeded during injection, without physical explanation Daveo643 FLUENT 1 November 2, 2015 12:47
Get the maximum and minimum pressure in the domain(In parallel calculation) xh110120 Fluent UDF and Scheme Programming 4 October 10, 2014 09:06
AMI: Minimum patch weight decreases with time lordvon OpenFOAM Running, Solving & CFD 2 September 3, 2013 13:39
Setting a minimum temperature value WillemvdM OpenFOAM Running, Solving & CFD 0 February 3, 2010 03:37


All times are GMT -4. The time now is 01:37.