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 Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 21, 2019, 04:54
Default max(mag(U) vs time
  #1
Member
 
Join Date: Apr 2019
Location: India
Posts: 52
Rep Power: 2
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 22, 2019, 00:04
Default libFieldFunctionObject Could Do This
  #2
Member
 
Peter Brady
Join Date: Apr 2014
Location: Sydney, NSW, Australia
Posts: 54
Rep Power: 7
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, 03:34
Default
  #3
Member
 
Join Date: Apr 2019
Location: India
Posts: 52
Rep Power: 2
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

Reply

Tags
openfoam, paraview, time plot

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
[solidMechanics] Support thread for "Solid Mechanics Solvers added to OpenFOAM Extend" bigphil OpenFOAM CC Toolkits for Fluid-Structure Interaction 470 Yesterday 13:27
courant number increases to rather large values 6863523 OpenFOAM Running, Solving & CFD 21 November 10, 2019 11:14
simpleFoam error - "Floating point exception" mbcx4jc2 OpenFOAM Running, Solving & CFD 12 August 4, 2015 03:20
Micro Scale Pore, icoFoam gooya_kabir OpenFOAM Running, Solving & CFD 2 November 2, 2013 14:58
plot over time fferroni OpenFOAM Post-Processing 7 June 8, 2012 08:56


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