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

max(mag(U) vs time

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By LVDH

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 21, 2019, 03:54
Default max(mag(U) vs time
  #1
Member
 
Join Date: Apr 2019
Location: India
Posts: 81
Rep Power: 7
Pavithra is on a distinguished road
Hello Everyone,

I am simulating natural convection in a deferentially heated square cavity. I wish to plot the maximum velocity in the domain with respect to time.

I tried to use sample dictionary as follows
Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      sample;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

type         surfaces;

libs            ("libsampling.so");

interpolationScheme         cellPoint;

surfaceFomart            raw;

    surfaces
    (
        internalfield
        {
            type            patchInternalField;
            patches            ("internalField");
            interpolate        true;
            offsetMode        normal;
            distance        0;
            
        }
    );

fields          (max(mag(U)));

// ************************************************************************* //
But, I get an error message stating that field max(mag(U) not found.

Kindly, please help me to plot max(mag(U)) vs time. Also, please let me know if it is possible to have a live plot of max(mag(U)) vs time using foamMonitor tool.

Thank You.

With Thanks,
Pavithra.
Pavithra is offline   Reply With Quote

Old   July 21, 2019, 23:04
Default libFieldFunctionObject Could Do This
  #2
Member
 
Peter Brady
Join Date: Apr 2014
Location: Sydney, NSW, Australia
Posts: 54
Rep Power: 11
pbrady2013 is on a distinguished road
Hey,


When I want to do this I use a functionObject instead. Try this sample snipped from one of my control dictionaries:


Code:
    fieldMinMax1
    {
        type                    fieldMinMax;
        libs                    ("libfieldFunctionObjects.so");
        writeControl            timeStep;
        writeInterval           1;
        writeToFile             yes;
        log                     yes;
        location                yes;
        mode                    magnitude;
        fields                  (U p_rgh);
    }
This will dump some text files that you can plot in your choice of application.


Hope that helps,
-pete
pbrady2013 is offline   Reply With Quote

Old   July 22, 2019, 02:34
Default
  #3
Member
 
Join Date: Apr 2019
Location: India
Posts: 81
Rep Power: 7
Pavithra is on a distinguished road
Respected Sir,



Thank you so much. It worked 100% perfect. functionObject is an wonderful tool.



Thank You.
Pavithra is offline   Reply With Quote

Old   September 16, 2021, 09:41
Default OF v9
  #4
Member
 
LVDH's Avatar
 
Andre Z
Join Date: Dec 2009
Posts: 75
Rep Power: 16
LVDH is on a distinguished road
Anyone have an idea how to use this in the new OF v9.0? Seems to have disappeared. I cannot even find a comment or anything in the git history.
Ship Designer likes this.
__________________
www.MantiumCAE.com
LVDH is offline   Reply With Quote

Old   October 15, 2021, 13:35
Default
  #5
Senior Member
 
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 6
Ship Designer is on a distinguished road
Quote:
Originally Posted by LVDH View Post
Anyone have an idea how to use this in the new OF v9.0? Seems to have disappeared. I cannot even find a comment or anything in the git history.

Same problem here. I haven't had the time yet to investigate, but it seems that volFieldValue has to be used now.
Ship Designer is offline   Reply With Quote

Reply

Tags
openfoam, paraview, time plot


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
courant number increases to rather large values 6863523 OpenFOAM Running, Solving & CFD 22 July 5, 2023 23:48
[solidMechanics] Support thread for "Solid Mechanics Solvers added to OpenFOAM Extend" bigphil OpenFOAM CC Toolkits for Fluid-Structure Interaction 686 December 22, 2022 09:10
simpleFoam error - "Floating point exception" mbcx4jc2 OpenFOAM Running, Solving & CFD 12 August 4, 2015 02:20
Micro Scale Pore, icoFoam gooya_kabir OpenFOAM Running, Solving & CFD 2 November 2, 2013 13:58
plot over time fferroni OpenFOAM Post-Processing 7 June 8, 2012 07:56


All times are GMT -4. The time now is 23:25.